summaryrefslogtreecommitdiff
path: root/libopie2/opiedb
Side-by-side diff
Diffstat (limited to 'libopie2/opiedb') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opiedb/osqlbackendmanager.cpp12
-rw-r--r--libopie2/opiedb/osqlitedriver.cpp6
2 files changed, 12 insertions, 6 deletions
diff --git a/libopie2/opiedb/osqlbackendmanager.cpp b/libopie2/opiedb/osqlbackendmanager.cpp
index fc18e07..bbfbf3d 100644
--- a/libopie2/opiedb/osqlbackendmanager.cpp
+++ b/libopie2/opiedb/osqlbackendmanager.cpp
@@ -1,10 +1,16 @@
+
+#include "osqlbackendmanager.h"
+
+/* OPIE */
+#include <opie2/odebug.h>
+
+/* QT */
#include <qdir.h>
#include <qmap.h>
-#include "osqlbackendmanager.h"
/**
* \todo FIXME CONFIG!!!
*/
namespace {
@@ -35,13 +41,13 @@ namespace {
return false;
QStringList list = QStringList::split( '\n', file.readAll() );
QStringList::Iterator it;
QString line;
for (it = list.begin(); it != list.end(); ++it ) {
line = (*it).stripWhiteSpace();
- qWarning("Anonymous::Config:" + line );
+ owarn << "Anonymous::Config:" + line << oendl;
QStringList test = QStringList::split(' ', line );
m_list.insert( test[0], test[2] );
}
return true;
}
QString Config::value( const QString& key ) {
@@ -89,13 +95,13 @@ OSQLBackEnd::ValueList OSQLBackEndManager::scanDir( const QString& dirName ) {
/**
* read a config file and convert it to a OSQLBackEnd
*/
OSQLBackEnd OSQLBackEndManager::file2backend( const QString& file ) {
OSQLBackEnd end;
- qWarning("fileName: " + file );
+ owarn << "fileName: " + file << oendl;
Config cfg( file );
if (cfg.load() ) {
end.setName( cfg.value( "Name") );
end.setVendor( cfg.value("Vendor") );
end.setLicense( cfg.value("License") );
end.setLibrary( cfg.value("Library").local8Bit() );
diff --git a/libopie2/opiedb/osqlitedriver.cpp b/libopie2/opiedb/osqlitedriver.cpp
index 588fc8f..69eddfe 100644
--- a/libopie2/opiedb/osqlitedriver.cpp
+++ b/libopie2/opiedb/osqlitedriver.cpp
@@ -121,21 +121,21 @@ void rlikeFunc(sqlite_func *context, int arg, const char **argv){
* try to open a db specified via setUrl
* and options
*/
bool OSQLiteDriver::open() {
char *error;
- qDebug("OSQLiteDriver::open: about to open");
+ odebug << "OSQLiteDriver::open: about to open" << oendl;
m_sqlite = sqlite_open(m_url.local8Bit(),
0,
&error );
/* failed to open */
if (m_sqlite == 0l ) {
// FIXME set the last error
- qWarning("OSQLiteDriver::open: %s", error );
+ owarn << "OSQLiteDriver::open: " << error << "" << oendl;
free( error );
return false;
}
if (sqlite_create_function(m_sqlite,"rlike",2,rlikeFunc,&sqreg) != 0)
odebug << "Unable to create user defined function!" << oendl;
if (sqlite_function_type(m_sqlite,"rlike",SQLITE_NUMERIC) != 0)
@@ -171,13 +171,13 @@ OSQLResult OSQLiteDriver::query( OSQLQuery* qu) {
}
Query query;
query.driver = this;
char *err;
/* SQLITE_OK 0 if return code > 0 == failure */
if ( sqlite_exec(m_sqlite, qu->query(),&call_back, &query, &err) > 0 ) {
- qWarning("OSQLiteDriver::query: Error while executing %s",err);
+ owarn << "OSQLiteDriver::query: Error while executing " << err << "" << oendl;
free(err );
// FixMe Errors
}
OSQLResult result(OSQLResult::Success,
query.items,