summaryrefslogtreecommitdiff
path: root/utils/themeeditor/configdocument.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'utils/themeeditor/configdocument.cpp')
-rw-r--r--utils/themeeditor/configdocument.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/utils/themeeditor/configdocument.cpp b/utils/themeeditor/configdocument.cpp
index c212cc5..5bc4b77 100644
--- a/utils/themeeditor/configdocument.cpp
+++ b/utils/themeeditor/configdocument.cpp
@@ -116,6 +116,7 @@ void ConfigDocument::saveAs()
saved = toPlainText();
emit titleChanged(title());
+ emit configFileChanged(file());
}
@@ -150,7 +151,7 @@ bool ConfigDocument::requestClose()
return false;
}
}
- return false;
+ return true;
}
QString ConfigDocument::toPlainText() const
@@ -185,6 +186,11 @@ void ConfigDocument::addRow(QString key, QString value)
QObject::connect(delButton, SIGNAL(clicked()),
this, SLOT(deleteClicked()));
+ QObject::connect(keyEdit, SIGNAL(textChanged(QString)),
+ this, SLOT(textChanged()));
+ QObject::connect(valueEdit, SIGNAL(textChanged(QString)),
+ this, SLOT(textChanged()));
+
ui->configBoxes->addLayout(layout);
containers.append(layout);
@@ -219,3 +225,11 @@ void ConfigDocument::addClicked()
{
addRow(tr("Key"), tr("Value"));
}
+
+void ConfigDocument::textChanged()
+{
+ if(toPlainText() != saved)
+ emit titleChanged(title() + "*");
+ else
+ emit titleChanged(title());
+}