Diffstat (limited to 'libopie2/opiedb/osqlmanager.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiedb/osqlmanager.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libopie2/opiedb/osqlmanager.cpp b/libopie2/opiedb/osqlmanager.cpp index a6498df..f093766 100644 --- a/libopie2/opiedb/osqlmanager.cpp +++ b/libopie2/opiedb/osqlmanager.cpp | |||
@@ -1,20 +1,21 @@ | |||
1 | 1 | ||
2 | #include <stdlib.h> | 2 | #include <stdlib.h> |
3 | 3 | ||
4 | #include "osqlmanager.h" | 4 | #include "osqlmanager.h" |
5 | #include "osqlbackendmanager.h" | 5 | #include "osqlbackendmanager.h" |
6 | #include "osqlitedriver.h" | 6 | #include "osqlitedriver.h" |
7 | 7 | ||
8 | using namespace Opie::DB; | 8 | namespace Opie { |
9 | namespace DB { | ||
9 | 10 | ||
10 | OSQLManager::OSQLManager() { | 11 | OSQLManager::OSQLManager() { |
11 | } | 12 | } |
12 | OSQLBackEnd::ValueList OSQLManager::queryBackEnd() { | 13 | OSQLBackEnd::ValueList OSQLManager::queryBackEnd() { |
13 | m_list.clear(); | 14 | m_list.clear(); |
14 | QString opie = QString::fromLatin1( getenv("OPIEDIR") ); | 15 | QString opie = QString::fromLatin1( getenv("OPIEDIR") ); |
15 | QString qpe = QString::fromLatin1( getenv("QPEDIR") ); | 16 | QString qpe = QString::fromLatin1( getenv("QPEDIR") ); |
16 | 17 | ||
17 | if ( !m_path.contains(opie) && !opie.isEmpty() ) | 18 | if ( !m_path.contains(opie) && !opie.isEmpty() ) |
18 | m_path << opie; | 19 | m_path << opie; |
19 | if ( !m_path.contains(qpe) && !qpe.isEmpty() ) | 20 | if ( !m_path.contains(qpe) && !qpe.isEmpty() ) |
20 | m_path << qpe; | 21 | m_path << qpe; |
@@ -72,12 +73,16 @@ bool OSQLManager::unregisterPath( const QString& path ) { | |||
72 | m_path.remove( path ); | 73 | m_path.remove( path ); |
73 | return true; | 74 | return true; |
74 | } | 75 | } |
75 | OSQLBackEnd::ValueList OSQLManager::builtIn()const { | 76 | OSQLBackEnd::ValueList OSQLManager::builtIn()const { |
76 | OSQLBackEnd::ValueList list; | 77 | OSQLBackEnd::ValueList list; |
77 | // create the OSQLiteBackend | 78 | // create the OSQLiteBackend |
78 | OSQLBackEnd back("SQLite","Opie e.V.","GPL", "builtin" ); | 79 | OSQLBackEnd back("SQLite","Opie e.V.","GPL", "builtin" ); |
79 | back.setDefault( true ); | 80 | back.setDefault( true ); |
80 | back.setPreference( 50 ); | 81 | back.setPreference( 50 ); |
81 | list.append( back ); | 82 | list.append( back ); |
82 | return list; | 83 | return list; |
83 | } | 84 | } |
85 | |||
86 | |||
87 | } | ||
88 | } | ||