summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiedb/opiedb.pro3
-rw-r--r--libopie2/opiedb/osqlitedriver.cpp22
2 files changed, 18 insertions, 7 deletions
diff --git a/libopie2/opiedb/opiedb.pro b/libopie2/opiedb/opiedb.pro
index 3612f0e..bf547ab 100644
--- a/libopie2/opiedb/opiedb.pro
+++ b/libopie2/opiedb/opiedb.pro
@@ -1,3 +1,4 @@
1TEMPLATE = lib 1TEMPLATE = lib
2CONFIG += qt warn_on debug 2#CONFIG += qt warn_on debug
3CONFIG += qt warn_on release
3DESTDIR = $(OPIEDIR)/lib 4DESTDIR = $(OPIEDIR)/lib
diff --git a/libopie2/opiedb/osqlitedriver.cpp b/libopie2/opiedb/osqlitedriver.cpp
index 9214ad3..99fd218 100644
--- a/libopie2/opiedb/osqlitedriver.cpp
+++ b/libopie2/opiedb/osqlitedriver.cpp
@@ -6,2 +6,6 @@
6 6
7// fromLocal8Bit() does not work as expected. Thus it
8// is replaced by fromLatin1() (eilers)
9#define __BUGGY_LOCAL8BIT_
10
7 11
@@ -82,3 +86,3 @@ OSQLResult OSQLiteDriver::query( OSQLQuery* qu) {
82 } 86 }
83 qWarning("Item count is %d", query.items.count() ); 87 // qWarning("Item count is %d", query.items.count() );
84 OSQLResult result(OSQLResult::Success, 88 OSQLResult result(OSQLResult::Success,
@@ -104,3 +108,3 @@ int OSQLiteDriver::call_back( void* voi, int argc,
104 char** argv, char** columns) { 108 char** argv, char** columns) {
105 qWarning("Callback with %d items", argc ); 109 // qWarning("Callback with %d items", argc );
106 Query* qu = (Query*)voi; 110 Query* qu = (Query*)voi;
@@ -111,7 +115,13 @@ int OSQLiteDriver::call_back( void* voi, int argc,
111 for (int i = 0; i < argc; i++ ) { 115 for (int i = 0; i < argc; i++ ) {
112 qWarning("%s|%s", columns[i], argv[i] ); 116 //qWarning("%s|%s", columns[i], argv[i] );
113 tableInt.insert( i, QString::fromLocal8Bit(argv[i] ) );
114 tableString.insert( QString::fromLocal8Bit( columns[i]),
115 QString::fromLocal8Bit( argv[i] ) );
116 117
118#ifdef __BUGGY_LOCAL8BIT_
119 tableInt.insert( i, QString::fromLatin1( argv[i] ) );
120 tableString.insert( QString::fromLatin1( columns[i] ),
121 QString::fromLatin1( argv[i] ) );
122#else
123 tableInt.insert( i, QString::fromLocal8Bit( argv[i] ) );
124 tableString.insert( QString::fromLocal8Bit( columns[i] ),
125 QString::fromLocal8Bit( argv[i] ) );
126#endif
117 } 127 }