summaryrefslogtreecommitdiff
path: root/libopie2/opiedb
Unidiff
Diffstat (limited to 'libopie2/opiedb') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiedb/osqlitedriver.cpp2
-rw-r--r--libopie2/opiedb/osqlitedriver.h2
-rw-r--r--libopie2/opiedb/osqlmanager.cpp4
3 files changed, 4 insertions, 4 deletions
diff --git a/libopie2/opiedb/osqlitedriver.cpp b/libopie2/opiedb/osqlitedriver.cpp
index 47bc250..2c53248 100644
--- a/libopie2/opiedb/osqlitedriver.cpp
+++ b/libopie2/opiedb/osqlitedriver.cpp
@@ -32,25 +32,25 @@
32#include "osqlitedriver.h" 32#include "osqlitedriver.h"
33 33
34#include <opie2/odebug.h> 34#include <opie2/odebug.h>
35 35
36#include <stdlib.h> 36#include <stdlib.h>
37 37
38// fromLocal8Bit() does not work as expected. Thus it 38// fromLocal8Bit() does not work as expected. Thus it
39// is replaced by fromLatin1() (eilers) 39// is replaced by fromLatin1() (eilers)
40#define __BUGGY_LOCAL8BIT_ 40#define __BUGGY_LOCAL8BIT_
41 41
42 42
43using namespace Opie::DB; 43using namespace Opie::DB;
44using namespace Opie::DB::Private; 44using namespace Opie::DB::Internal;
45 45
46namespace { 46namespace {
47 struct Query { 47 struct Query {
48 OSQLError::ValueList errors; 48 OSQLError::ValueList errors;
49 OSQLResultItem::ValueList items; 49 OSQLResultItem::ValueList items;
50 OSQLiteDriver *driver; 50 OSQLiteDriver *driver;
51 }; 51 };
52} 52}
53 53
54 54
55OSQLiteDriver::OSQLiteDriver( QLibrary *lib ) 55OSQLiteDriver::OSQLiteDriver( QLibrary *lib )
56 : OSQLDriver( lib ) 56 : OSQLDriver( lib )
diff --git a/libopie2/opiedb/osqlitedriver.h b/libopie2/opiedb/osqlitedriver.h
index 3e1325b..9064e52 100644
--- a/libopie2/opiedb/osqlitedriver.h
+++ b/libopie2/opiedb/osqlitedriver.h
@@ -1,24 +1,24 @@
1#ifndef OSQL_LITE_DRIVER_H 1#ifndef OSQL_LITE_DRIVER_H
2#define OSQL_LITE_DRIVER_H 2#define OSQL_LITE_DRIVER_H
3 3
4#include <sqlite.h> 4#include <sqlite.h>
5 5
6#include "osqldriver.h" 6#include "osqldriver.h"
7#include "osqlerror.h" 7#include "osqlerror.h"
8#include "osqlresult.h" 8#include "osqlresult.h"
9 9
10namespace Opie { 10namespace Opie {
11namespace DB { 11namespace DB {
12namespace Private { 12namespace Internal {
13 13
14class OSQLiteDriver : public OSQLDriver { 14class OSQLiteDriver : public OSQLDriver {
15 Q_OBJECT 15 Q_OBJECT
16public: 16public:
17 OSQLiteDriver( QLibrary *lib = 0l ); 17 OSQLiteDriver( QLibrary *lib = 0l );
18 ~OSQLiteDriver(); 18 ~OSQLiteDriver();
19 QString id()const; 19 QString id()const;
20 void setUserName( const QString& ); 20 void setUserName( const QString& );
21 void setPassword( const QString& ); 21 void setPassword( const QString& );
22 void setUrl( const QString& url ); 22 void setUrl( const QString& url );
23 void setOptions( const QStringList& ); 23 void setOptions( const QStringList& );
24 bool open(); 24 bool open();
diff --git a/libopie2/opiedb/osqlmanager.cpp b/libopie2/opiedb/osqlmanager.cpp
index 990d258..a6498df 100644
--- a/libopie2/opiedb/osqlmanager.cpp
+++ b/libopie2/opiedb/osqlmanager.cpp
@@ -24,36 +24,36 @@ OSQLBackEnd::ValueList OSQLManager::queryBackEnd() {
24 m_list += builtIn(); 24 m_list += builtIn();
25 25
26 return m_list; 26 return m_list;
27} 27}
28/* 28/*
29 * loading dso's is currently not enabled due problems with QLibrary 29 * loading dso's is currently not enabled due problems with QLibrary
30 * beeing in libqpe and not libqte 30 * beeing in libqpe and not libqte
31 */ 31 */
32OSQLDriver* OSQLManager::load( const QString& name ) { 32OSQLDriver* OSQLManager::load( const QString& name ) {
33 OSQLDriver* driver = 0l; 33 OSQLDriver* driver = 0l;
34 34
35 if ( name == "SQLite" ) { 35 if ( name == "SQLite" ) {
36 driver = new Opie::DB::Private::OSQLiteDriver; 36 driver = new Opie::DB::Internal::OSQLiteDriver;
37 } 37 }
38 return driver; 38 return driver;
39} 39}
40/* 40/*
41 * same as above 41 * same as above
42 */ 42 */
43OSQLDriver* OSQLManager::load( const OSQLBackEnd& end) { 43OSQLDriver* OSQLManager::load( const OSQLBackEnd& end) {
44 OSQLDriver *driver = 0l; 44 OSQLDriver *driver = 0l;
45 if ( end.library() == "builtin" && 45 if ( end.library() == "builtin" &&
46 end.name() == "SQLite" ) 46 end.name() == "SQLite" )
47 driver = new Opie::DB::Private::OSQLiteDriver; 47 driver = new Opie::DB::Internal::OSQLiteDriver;
48 48
49 return driver; 49 return driver;
50} 50}
51/* 51/*
52 * let's find the a default with the highes preference 52 * let's find the a default with the highes preference
53 */ 53 */
54OSQLDriver* OSQLManager::standard() { 54OSQLDriver* OSQLManager::standard() {
55 OSQLDriver* driver =0l; 55 OSQLDriver* driver =0l;
56 if ( m_list.isEmpty() ) queryBackEnd(); 56 if ( m_list.isEmpty() ) queryBackEnd();
57 OSQLBackEnd::ValueList::Iterator it; 57 OSQLBackEnd::ValueList::Iterator it;
58 OSQLBackEnd back; 58 OSQLBackEnd back;
59 for ( it = m_list.begin(); it != m_list.end(); ++it ) { 59 for ( it = m_list.begin(); it != m_list.end(); ++it ) {