Diffstat (limited to 'libopie2/opiedb/osqlitedriver.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiedb/osqlitedriver.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/libopie2/opiedb/osqlitedriver.cpp b/libopie2/opiedb/osqlitedriver.cpp index 6141504..47bc250 100644 --- a/libopie2/opiedb/osqlitedriver.cpp +++ b/libopie2/opiedb/osqlitedriver.cpp @@ -31,24 +31,27 @@ #include "osqlquery.h" #include "osqlitedriver.h" #include <opie2/odebug.h> #include <stdlib.h> // fromLocal8Bit() does not work as expected. Thus it // is replaced by fromLatin1() (eilers) #define __BUGGY_LOCAL8BIT_ +using namespace Opie::DB; +using namespace Opie::DB::Private; + namespace { struct Query { OSQLError::ValueList errors; OSQLResultItem::ValueList items; OSQLiteDriver *driver; }; } OSQLiteDriver::OSQLiteDriver( QLibrary *lib ) : OSQLDriver( lib ) { @@ -77,33 +80,33 @@ void OSQLiteDriver::setUrl( const QString& url ) { void OSQLiteDriver::setOptions( const QStringList& ) { } /* * try to open a db specified via setUrl * and options */ bool OSQLiteDriver::open() { char *error; - odebug << "OSQLiteDriver::open: about to open" << oendl; + qDebug("OSQLiteDriver::open: about to open"); m_sqlite = sqlite_open(m_url.local8Bit(), 0, &error ); /* failed to open */ if (m_sqlite == 0l ) { // FIXME set the last error - owarn << "OSQLiteDriver::open: " << error << oendl; + qWarning("OSQLiteDriver::open: %s", error ); free( error ); return false; } return true; } /* close the db * sqlite closes them without * telling failure or success */ bool OSQLiteDriver::close() { @@ -117,25 +120,25 @@ bool OSQLiteDriver::close() { /* Query */ OSQLResult OSQLiteDriver::query( OSQLQuery* qu) { if ( !m_sqlite ) { // FIXME set error code OSQLResult result( OSQLResult::Failure ); return result; } 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 ) { - owarn << "OSQLiteDriver::query: Error while executing" << oendl; + qWarning("OSQLiteDriver::query: Error while executing"); free(err ); // FixMe Errors } OSQLResult result(OSQLResult::Success, query.items, query.errors ); return result; } OSQLTable::ValueList OSQLiteDriver::tables() const { |