summaryrefslogtreecommitdiff
Side-by-side diff
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
@@ -35 +35,11 @@ void ProfileConfig::clearGroup( const QString& str ) {
}
+QMap<QString, QString> ProfileConfig::items( const QString& group )const {
+ QMap<QString, QString> map;
+ QMap<QString, ConfigGroup>::ConstIterator it;
+ it = Config::groups.find( group );
+
+ if (it != Config::groups.end() )
+ map = it.data();
+
+ return map;
+}
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
@@ -12,2 +12,6 @@ public:
QStringList groups()const;
+ /**
+ * return the items in the group
+ */
+ QMap<QString, QString> items(const QString& group)const;
void clearGroup( const QString& );
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
@@ -40,2 +40,5 @@ void ProfileManager::load() {
}
+void ProfileManager::clear() {
+ m_list.clear();
+}
Profile::ValueList ProfileManager::all()const {
@@ -57,4 +60,4 @@ Session* ProfileManager::fromProfile( const Profile& prof) {
void ProfileManager::save( ) {
- m_list.clear();
ProfileConfig conf("opie-console-profiles");
+ conf.clearAll();
Session* se= 0l;