summaryrefslogtreecommitdiff
path: root/libopie2/opiedb/osqlbackendmanager.cpp
authorzecke <zecke>2004-03-13 19:51:45 (UTC)
committer zecke <zecke>2004-03-13 19:51:45 (UTC)
commit6d08277737e22b7a1527124623f3571969073ddf (patch) (unidiff)
tree4129e674e21df767b31299e873dd44e33a308e1b /libopie2/opiedb/osqlbackendmanager.cpp
parent8e28911f7199f4450ac5eef09482069f9b9caea2 (diff)
downloadopie-6d08277737e22b7a1527124623f3571969073ddf.zip
opie-6d08277737e22b7a1527124623f3571969073ddf.tar.gz
opie-6d08277737e22b7a1527124623f3571969073ddf.tar.bz2
Move XML class to internal PIM
Add namespaces!!! Opie::Core and Opie::Core::Private Opie::Net and Opie::Net::Private Opie::Ui and Opie::Ui::Private Opie::MM and Opie::MM::Private Opie::DB and Opie::DB::Private PIM classes are not yet converted because we will do other work on it as well
Diffstat (limited to 'libopie2/opiedb/osqlbackendmanager.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiedb/osqlbackendmanager.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/libopie2/opiedb/osqlbackendmanager.cpp b/libopie2/opiedb/osqlbackendmanager.cpp
index 95ed77b..fc18e07 100644
--- a/libopie2/opiedb/osqlbackendmanager.cpp
+++ b/libopie2/opiedb/osqlbackendmanager.cpp
@@ -1,17 +1,21 @@
1#include <qdir.h> 1#include <qdir.h>
2#include <qmap.h> 2#include <qmap.h>
3 3
4#include "osqlbackendmanager.h" 4#include "osqlbackendmanager.h"
5 5
6/**
7 * \todo FIXME CONFIG!!!
8 */
9
6namespace { 10namespace {
7 class Config { 11 class Config {
8 typedef QMap<QString, QString> List; 12 typedef QMap<QString, QString> List;
9 public: 13 public:
10 Config( const QString& fileName ); 14 Config( const QString& fileName );
11 /** 15 /**
12 * Quite simple layout in nature 16 * Quite simple layout in nature
13 * BeginFile 17 * BeginFile
14 * Key = Value 18 * Key = Value
15 */ 19 */
16 bool load(); 20 bool load();
17 QString value( const QString& key ); 21 QString value( const QString& key );
@@ -35,24 +39,28 @@ namespace {
35 for (it = list.begin(); it != list.end(); ++it ) { 39 for (it = list.begin(); it != list.end(); ++it ) {
36 line = (*it).stripWhiteSpace(); 40 line = (*it).stripWhiteSpace();
37 qWarning("Anonymous::Config:" + line ); 41 qWarning("Anonymous::Config:" + line );
38 QStringList test = QStringList::split(' ', line ); 42 QStringList test = QStringList::split(' ', line );
39 m_list.insert( test[0], test[2] ); 43 m_list.insert( test[0], test[2] );
40 } 44 }
41 return true; 45 return true;
42 } 46 }
43 QString Config::value( const QString& key ) { 47 QString Config::value( const QString& key ) {
44 return m_list[key]; 48 return m_list[key];
45 } 49 }
46}; 50};
51
52
53using namespace Opie::DB;
54
47OSQLBackEndManager::OSQLBackEndManager( const QStringList& path ) 55OSQLBackEndManager::OSQLBackEndManager( const QStringList& path )
48 :m_path( path ) 56 :m_path( path )
49{ 57{
50} 58}
51OSQLBackEndManager::~OSQLBackEndManager() { 59OSQLBackEndManager::~OSQLBackEndManager() {
52} 60}
53/** 61/**
54 * scan dirs 62 * scan dirs
55 */ 63 */
56OSQLBackEnd::ValueList OSQLBackEndManager::scan() { 64OSQLBackEnd::ValueList OSQLBackEndManager::scan() {
57 OSQLBackEnd::ValueList list; 65 OSQLBackEnd::ValueList list;
58 if (!m_path.isEmpty() ) { 66 if (!m_path.isEmpty() ) {