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,8 +1,14 @@
+
+#include "osqlbackendmanager.h"
+
+/* OPIE */
+#include <opie2/odebug.h>
+
+/* QT */
#include <qdir.h>
#include <qmap.h>
-#include "osqlbackendmanager.h"
/**
* \todo FIXME CONFIG!!!
*/
@@ -37,9 +43,9 @@ namespace {
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;
@@ -91,9 +97,9 @@ 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") );
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
@@ -123,17 +123,17 @@ void rlikeFunc(sqlite_func *context, int arg, const char **argv){
*/
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)
@@ -173,9 +173,9 @@ OSQLResult OSQLiteDriver::query( OSQLQuery* qu) {
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
}