Diffstat (limited to 'libopie2/opiedb/osqlmanager.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | libopie2/opiedb/osqlmanager.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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 | |||
@@ -12,60 +12,60 @@ OSQLManager::OSQLManager() { | |||
12 | OSQLBackEnd::ValueList OSQLManager::queryBackEnd() { | 12 | OSQLBackEnd::ValueList OSQLManager::queryBackEnd() { |
13 | m_list.clear(); | 13 | m_list.clear(); |
14 | QString opie = QString::fromLatin1( getenv("OPIEDIR") ); | 14 | QString opie = QString::fromLatin1( getenv("OPIEDIR") ); |
15 | QString qpe = QString::fromLatin1( getenv("QPEDIR") ); | 15 | QString qpe = QString::fromLatin1( getenv("QPEDIR") ); |
16 | 16 | ||
17 | if ( !m_path.contains(opie) && !opie.isEmpty() ) | 17 | if ( !m_path.contains(opie) && !opie.isEmpty() ) |
18 | m_path << opie; | 18 | m_path << opie; |
19 | if ( !m_path.contains(qpe) && !qpe.isEmpty() ) | 19 | if ( !m_path.contains(qpe) && !qpe.isEmpty() ) |
20 | m_path << qpe; | 20 | m_path << qpe; |
21 | 21 | ||
22 | OSQLBackEndManager mng( m_path ); | 22 | OSQLBackEndManager mng( m_path ); |
23 | m_list = mng.scan(); | 23 | m_list = mng.scan(); |
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 | */ |
32 | OSQLDriver* OSQLManager::load( const QString& name ) { | 32 | OSQLDriver* 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 | */ |
43 | OSQLDriver* OSQLManager::load( const OSQLBackEnd& end) { | 43 | OSQLDriver* 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 | */ |
54 | OSQLDriver* OSQLManager::standard() { | 54 | OSQLDriver* 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 ) { |
60 | if ( (*it).isDefault() && | 60 | if ( (*it).isDefault() && |
61 | back.preference() < (*it).preference() ) { | 61 | back.preference() < (*it).preference() ) { |
62 | back = (*it); | 62 | back = (*it); |
63 | } | 63 | } |
64 | } | 64 | } |
65 | driver = load( back ); | 65 | driver = load( back ); |
66 | return driver; | 66 | return driver; |
67 | } | 67 | } |
68 | void OSQLManager::registerPath( const QString& path ) { | 68 | void OSQLManager::registerPath( const QString& path ) { |
69 | m_path << path; | 69 | m_path << path; |
70 | } | 70 | } |
71 | bool OSQLManager::unregisterPath( const QString& path ) { | 71 | bool OSQLManager::unregisterPath( const QString& path ) { |