Diffstat (limited to 'libopie2/opiedb/osqlbackendmanager.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiedb/osqlbackendmanager.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/libopie2/opiedb/osqlbackendmanager.cpp b/libopie2/opiedb/osqlbackendmanager.cpp index fc18e07..bbfbf3d 100644 --- a/libopie2/opiedb/osqlbackendmanager.cpp +++ b/libopie2/opiedb/osqlbackendmanager.cpp | |||
@@ -1,10 +1,16 @@ | |||
1 | |||
2 | #include "osqlbackendmanager.h" | ||
3 | |||
4 | /* OPIE */ | ||
5 | #include <opie2/odebug.h> | ||
6 | |||
7 | /* QT */ | ||
1 | #include <qdir.h> | 8 | #include <qdir.h> |
2 | #include <qmap.h> | 9 | #include <qmap.h> |
3 | 10 | ||
4 | #include "osqlbackendmanager.h" | ||
5 | 11 | ||
6 | /** | 12 | /** |
7 | * \todo FIXME CONFIG!!! | 13 | * \todo FIXME CONFIG!!! |
8 | */ | 14 | */ |
9 | 15 | ||
10 | namespace { | 16 | namespace { |
@@ -35,13 +41,13 @@ namespace { | |||
35 | return false; | 41 | return false; |
36 | QStringList list = QStringList::split( '\n', file.readAll() ); | 42 | QStringList list = QStringList::split( '\n', file.readAll() ); |
37 | QStringList::Iterator it; | 43 | QStringList::Iterator it; |
38 | QString line; | 44 | QString line; |
39 | for (it = list.begin(); it != list.end(); ++it ) { | 45 | for (it = list.begin(); it != list.end(); ++it ) { |
40 | line = (*it).stripWhiteSpace(); | 46 | line = (*it).stripWhiteSpace(); |
41 | qWarning("Anonymous::Config:" + line ); | 47 | owarn << "Anonymous::Config:" + line << oendl; |
42 | QStringList test = QStringList::split(' ', line ); | 48 | QStringList test = QStringList::split(' ', line ); |
43 | m_list.insert( test[0], test[2] ); | 49 | m_list.insert( test[0], test[2] ); |
44 | } | 50 | } |
45 | return true; | 51 | return true; |
46 | } | 52 | } |
47 | QString Config::value( const QString& key ) { | 53 | QString Config::value( const QString& key ) { |
@@ -89,13 +95,13 @@ OSQLBackEnd::ValueList OSQLBackEndManager::scanDir( const QString& dirName ) { | |||
89 | 95 | ||
90 | /** | 96 | /** |
91 | * read a config file and convert it to a OSQLBackEnd | 97 | * read a config file and convert it to a OSQLBackEnd |
92 | */ | 98 | */ |
93 | OSQLBackEnd OSQLBackEndManager::file2backend( const QString& file ) { | 99 | OSQLBackEnd OSQLBackEndManager::file2backend( const QString& file ) { |
94 | OSQLBackEnd end; | 100 | OSQLBackEnd end; |
95 | qWarning("fileName: " + file ); | 101 | owarn << "fileName: " + file << oendl; |
96 | Config cfg( file ); | 102 | Config cfg( file ); |
97 | if (cfg.load() ) { | 103 | if (cfg.load() ) { |
98 | end.setName( cfg.value( "Name") ); | 104 | end.setName( cfg.value( "Name") ); |
99 | end.setVendor( cfg.value("Vendor") ); | 105 | end.setVendor( cfg.value("Vendor") ); |
100 | end.setLicense( cfg.value("License") ); | 106 | end.setLicense( cfg.value("License") ); |
101 | end.setLibrary( cfg.value("Library").local8Bit() ); | 107 | end.setLibrary( cfg.value("Library").local8Bit() ); |