summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancois Andriot <[email protected]>2013-10-23 18:05:34 +0200
committerSlávek Banko <[email protected]>2013-10-23 18:05:49 +0200
commitb7ae7a99ad7779421197aba5854c9e560a0faa6d (patch)
tree93e715b4372cd3eaf876fbcde0241db4ee86da98
parent082a0c06c2d33bd9056f93ff0fa22ab2b0062928 (diff)
downloadgtk-qt-engine-b7ae7a99ad7779421197aba5854c9e560a0faa6d.tar.gz
gtk-qt-engine-b7ae7a99ad7779421197aba5854c9e560a0faa6d.zip
Fix kcm_gtk crash when TDE GTK engine is not installed
This resolves Bug 1672
-rw-r--r--kcm_gtk/kcmgtk.cpp28
1 files changed, 16 insertions, 12 deletions
diff --git a/kcm_gtk/kcmgtk.cpp b/kcm_gtk/kcmgtk.cpp
index 9532bb2..28faded 100644
--- a/kcm_gtk/kcmgtk.cpp
+++ b/kcm_gtk/kcmgtk.cpp
@@ -234,13 +234,15 @@ void KcmGtk::getInstalledThemes()
bool installed = false;
widget->styleBox->clear();
- TQStringList otherStyles = themes.keys();
- if(!otherStyles.empty()) {
- otherStyles.remove(otherStyles.find("Qt"));
+ if(!themes.empty()) {
+ TQStringList otherStyles = themes.keys();
+ if(otherStyles.find("Qt")!=otherStyles.end()) {
+ otherStyles.remove(otherStyles.find("Qt"));
+ }
installed = !otherStyles.empty();
- }
- if(installed) {
- widget->styleBox->insertStringList(otherStyles);
+ if(installed) {
+ widget->styleBox->insertStringList(otherStyles);
+ }
}
widget->styleKde->setEnabled(installed);
widget->styleBox->setEnabled(installed);
@@ -269,13 +271,15 @@ void KcmGtk::getInstalledThemes()
bool gtk3installed = false;
widget->styleBox3->clear();
- TQStringList otherGtk3Styles = gtk3Themes.keys();
- if(!otherGtk3Styles.empty()) {
- otherGtk3Styles.remove(otherGtk3Styles.find("tdegtk"));
+ if(!gtk3Themes.empty()) {
+ TQStringList otherGtk3Styles = gtk3Themes.keys();
+ if(otherGtk3Styles.find("tdegtk")!=otherGtk3Styles.end()) {
+ otherGtk3Styles.remove(otherGtk3Styles.find("tdegtk"));
+ }
gtk3installed = !otherGtk3Styles.empty();
- }
- if(gtk3installed) {
- widget->styleBox3->insertStringList(otherGtk3Styles);
+ if(gtk3installed) {
+ widget->styleBox3->insertStringList(otherGtk3Styles);
+ }
}
widget->styleKde3->setEnabled(gtk3installed);
widget->styleBox3->setEnabled(gtk3installed);