author | tille <tille> | 2002-07-08 14:12:26 (UTC) |
---|---|---|
committer | tille <tille> | 2002-07-08 14:12:26 (UTC) |
commit | c92049007eaf6615a059425073b03a827d11831e (patch) (unidiff) | |
tree | 6d4d0b05a597d46eb6969cd728174fa6345a1099 | |
parent | 0d6ff4c6b10524943b43240489182138694f2759 (diff) | |
download | opie-c92049007eaf6615a059425073b03a827d11831e.zip opie-c92049007eaf6615a059425073b03a827d11831e.tar.gz opie-c92049007eaf6615a059425073b03a827d11831e.tar.bz2 |
parse files when needed
an other oipkg test ;)
-rw-r--r-- | noncore/apps/confedit/listviewitemconffile.cpp | 15 | ||||
-rw-r--r-- | noncore/apps/confedit/mainwindow.cpp | 1 |
2 files changed, 13 insertions, 3 deletions
diff --git a/noncore/apps/confedit/listviewitemconffile.cpp b/noncore/apps/confedit/listviewitemconffile.cpp index 1f85095..ce6504c 100644 --- a/noncore/apps/confedit/listviewitemconffile.cpp +++ b/noncore/apps/confedit/listviewitemconffile.cpp | |||
@@ -91,8 +91,7 @@ void ListViewItemConfFile::remove() | |||
91 | void ListViewItemConfFile::revert() | 91 | void ListViewItemConfFile::revert() |
92 | { | 92 | { |
93 | if (_changed) | 93 | if (!_changed) |
94 | { | 94 | { |
95 | parseFile(); | 95 | // read the backup file |
96 | }else{ | ||
97 | QFile conf(confFileInfo->absFilePath()); | 96 | QFile conf(confFileInfo->absFilePath()); |
98 | QFile back(backupFileName()); | 97 | QFile back(backupFileName()); |
@@ -107,4 +106,6 @@ void ListViewItemConfFile::revert() | |||
107 | back.close(); | 106 | back.close(); |
108 | } | 107 | } |
108 | parseFile(); | ||
109 | expand(); | ||
109 | } | 110 | } |
110 | 111 | ||
@@ -148,4 +149,12 @@ QString ListViewItemConfFile::backupFileName() | |||
148 | void ListViewItemConfFile::expand() | 149 | void ListViewItemConfFile::expand() |
149 | { | 150 | { |
151 | QListViewItem *subItem = firstChild(); | ||
152 | QListViewItem *toDel; | ||
153 | while(subItem) | ||
154 | { | ||
155 | toDel = subItem; | ||
156 | subItem = subItem->nextSibling(); | ||
157 | delete toDel; | ||
158 | } | ||
150 | parseFile(); | 159 | parseFile(); |
151 | } | 160 | } |
diff --git a/noncore/apps/confedit/mainwindow.cpp b/noncore/apps/confedit/mainwindow.cpp index 6de8741..c91c846 100644 --- a/noncore/apps/confedit/mainwindow.cpp +++ b/noncore/apps/confedit/mainwindow.cpp | |||
@@ -74,4 +74,5 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f ) : | |||
74 | 74 | ||
75 | setCurrent(0); | 75 | setCurrent(0); |
76 | editor->layoutType(EditWidget::File); | ||
76 | } | 77 | } |
77 | 78 | ||