diff options
Diffstat (limited to 'utils/themeeditor/skindocument.cpp')
-rw-r--r-- | utils/themeeditor/skindocument.cpp | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/utils/themeeditor/skindocument.cpp b/utils/themeeditor/skindocument.cpp index 3fb7d4871b..aada24daac 100644 --- a/utils/themeeditor/skindocument.cpp +++ b/utils/themeeditor/skindocument.cpp | |||
@@ -54,6 +54,7 @@ bool SkinDocument::requestClose() | |||
54 | { | 54 | { |
55 | /* Spawning the "Are you sure?" dialog */ | 55 | /* Spawning the "Are you sure?" dialog */ |
56 | QMessageBox confirm(this); | 56 | QMessageBox confirm(this); |
57 | confirm.setWindowTitle(tr("Confirm Close")); | ||
57 | confirm.setText(title + tr(" has been modified.")); | 58 | confirm.setText(title + tr(" has been modified.")); |
58 | confirm.setInformativeText(tr("Do you want to save your changes?")); | 59 | confirm.setInformativeText(tr("Do you want to save your changes?")); |
59 | confirm.setStandardButtons(QMessageBox::Save | QMessageBox::Discard | 60 | confirm.setStandardButtons(QMessageBox::Save | QMessageBox::Discard |
@@ -109,21 +110,9 @@ void SkinDocument::codeChanged() | |||
109 | model->changeTree(editor->document()->toPlainText().toAscii()); | 110 | model->changeTree(editor->document()->toPlainText().toAscii()); |
110 | 111 | ||
111 | if(editor->document()->toPlainText() != saved) | 112 | if(editor->document()->toPlainText() != saved) |
112 | { | 113 | emit titleChanged(title + QChar('*')); |
113 | if(title.length() > 0 && title[title.length() - 1] != '*') | ||
114 | { | ||
115 | title.append('*'); | ||
116 | emit titleChanged(title); | ||
117 | } | ||
118 | } | ||
119 | else | 114 | else |
120 | { | 115 | emit titleChanged(title); |
121 | if(title.length() > 0 && title[title.length() - 1] == '*') | ||
122 | { | ||
123 | title.chop(1); | ||
124 | emit titleChanged(title); | ||
125 | } | ||
126 | } | ||
127 | } | 116 | } |
128 | 117 | ||
129 | void SkinDocument::save() | 118 | void SkinDocument::save() |