summaryrefslogtreecommitdiff
path: root/noncore/apps/confedit/listviewitemconfigentry.cpp
Side-by-side diff
Diffstat (limited to 'noncore/apps/confedit/listviewitemconfigentry.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/confedit/listviewitemconfigentry.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/noncore/apps/confedit/listviewitemconfigentry.cpp b/noncore/apps/confedit/listviewitemconfigentry.cpp
index 16be46e..77ce17d 100644
--- a/noncore/apps/confedit/listviewitemconfigentry.cpp
+++ b/noncore/apps/confedit/listviewitemconfigentry.cpp
@@ -12,2 +12,3 @@
#include "listviewitemconffile.h"
+#include <qtextstream.h>
@@ -106,2 +107,22 @@ void ListViewItemConfigEntry::changed()
_fileItem->changed();
+}
+
+void ListViewItemConfigEntry::save(QTextStream *t)
+{
+ QString s;
+ if (isGroup())
+ {
+ s += "["+_group+"]";
+ _type = Group;
+ }else{
+ s += _key+" = "+_value;
+ _type = Key;
+ }
+ s += "\n";
+ (*t) << s;
+ _changed = false;
+ for (QListViewItem *it = firstChild(); it!=0;it = it->nextSibling())
+ {
+ ((ListViewItemConfigEntry*)it)->save(t);
+ }
} \ No newline at end of file