diff options
Diffstat (limited to 'utils/themeeditor/configdocument.cpp')
-rw-r--r-- | utils/themeeditor/configdocument.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/utils/themeeditor/configdocument.cpp b/utils/themeeditor/configdocument.cpp index c212cc52ce..5bc4b77504 100644 --- a/utils/themeeditor/configdocument.cpp +++ b/utils/themeeditor/configdocument.cpp | |||
@@ -116,6 +116,7 @@ void ConfigDocument::saveAs() | |||
116 | 116 | ||
117 | saved = toPlainText(); | 117 | saved = toPlainText(); |
118 | emit titleChanged(title()); | 118 | emit titleChanged(title()); |
119 | emit configFileChanged(file()); | ||
119 | 120 | ||
120 | } | 121 | } |
121 | 122 | ||
@@ -150,7 +151,7 @@ bool ConfigDocument::requestClose() | |||
150 | return false; | 151 | return false; |
151 | } | 152 | } |
152 | } | 153 | } |
153 | return false; | 154 | return true; |
154 | } | 155 | } |
155 | 156 | ||
156 | QString ConfigDocument::toPlainText() const | 157 | QString ConfigDocument::toPlainText() const |
@@ -185,6 +186,11 @@ void ConfigDocument::addRow(QString key, QString value) | |||
185 | QObject::connect(delButton, SIGNAL(clicked()), | 186 | QObject::connect(delButton, SIGNAL(clicked()), |
186 | this, SLOT(deleteClicked())); | 187 | this, SLOT(deleteClicked())); |
187 | 188 | ||
189 | QObject::connect(keyEdit, SIGNAL(textChanged(QString)), | ||
190 | this, SLOT(textChanged())); | ||
191 | QObject::connect(valueEdit, SIGNAL(textChanged(QString)), | ||
192 | this, SLOT(textChanged())); | ||
193 | |||
188 | ui->configBoxes->addLayout(layout); | 194 | ui->configBoxes->addLayout(layout); |
189 | 195 | ||
190 | containers.append(layout); | 196 | containers.append(layout); |
@@ -219,3 +225,11 @@ void ConfigDocument::addClicked() | |||
219 | { | 225 | { |
220 | addRow(tr("Key"), tr("Value")); | 226 | addRow(tr("Key"), tr("Value")); |
221 | } | 227 | } |
228 | |||
229 | void ConfigDocument::textChanged() | ||
230 | { | ||
231 | if(toPlainText() != saved) | ||
232 | emit titleChanged(title() + "*"); | ||
233 | else | ||
234 | emit titleChanged(title()); | ||
235 | } | ||