summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/profileconfig.cpp10
-rw-r--r--noncore/apps/opie-console/profileconfig.h4
-rw-r--r--noncore/apps/opie-console/profilemanager.cpp5
3 files changed, 18 insertions, 1 deletions
diff --git a/noncore/apps/opie-console/profileconfig.cpp b/noncore/apps/opie-console/profileconfig.cpp
index 8b16920..bd089c8 100644
--- a/noncore/apps/opie-console/profileconfig.cpp
+++ b/noncore/apps/opie-console/profileconfig.cpp
@@ -33,3 +33,13 @@ void ProfileConfig::clearGroup( const QString& str ) {
33 Config::clearGroup(); 33 Config::clearGroup();
34 setGroup( cur ); 34 setGroup( cur );
35} 35}
36QMap<QString, QString> ProfileConfig::items( const QString& group )const {
37 QMap<QString, QString> map;
38 QMap<QString, ConfigGroup>::ConstIterator it;
39 it = Config::groups.find( group );
40
41 if (it != Config::groups.end() )
42 map = it.data();
43
44 return map;
45}
diff --git a/noncore/apps/opie-console/profileconfig.h b/noncore/apps/opie-console/profileconfig.h
index e2e149c..f371ead 100644
--- a/noncore/apps/opie-console/profileconfig.h
+++ b/noncore/apps/opie-console/profileconfig.h
@@ -10,6 +10,10 @@ public:
10 ProfileConfig( const QString& prof ); 10 ProfileConfig( const QString& prof );
11 ~ProfileConfig(); 11 ~ProfileConfig();
12 QStringList groups()const; 12 QStringList groups()const;
13 /**
14 * return the items in the group
15 */
16 QMap<QString, QString> items(const QString& group)const;
13 void clearGroup( const QString& ); 17 void clearGroup( const QString& );
14 void clearAll(); 18 void clearAll();
15 19
diff --git a/noncore/apps/opie-console/profilemanager.cpp b/noncore/apps/opie-console/profilemanager.cpp
index db36686..54b184d 100644
--- a/noncore/apps/opie-console/profilemanager.cpp
+++ b/noncore/apps/opie-console/profilemanager.cpp
@@ -38,6 +38,9 @@ void ProfileManager::load() {
38 } 38 }
39 39
40} 40}
41void ProfileManager::clear() {
42 m_list.clear();
43}
41Profile::ValueList ProfileManager::all()const { 44Profile::ValueList ProfileManager::all()const {
42 return m_list; 45 return m_list;
43} 46}
@@ -55,8 +58,8 @@ Session* ProfileManager::fromProfile( const Profile& prof) {
55 return session; 58 return session;
56} 59}
57void ProfileManager::save( ) { 60void ProfileManager::save( ) {
58 m_list.clear();
59 ProfileConfig conf("opie-console-profiles"); 61 ProfileConfig conf("opie-console-profiles");
62 conf.clearAll();
60 Session* se= 0l; 63 Session* se= 0l;
61 // FIXME save 64 // FIXME save
62} 65}