summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gui/kernel/qapplication_x11.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gui/kernel/qapplication_x11.cpp b/src/gui/kernel/qapplication_x11.cpp
index 6babda9..260a9a4 100644
--- a/src/gui/kernel/qapplication_x11.cpp
+++ b/src/gui/kernel/qapplication_x11.cpp
@@ -887,11 +887,15 @@ bool QApplicationPrivate::x11_apply_settings()
}
}
+ static QString currentStyleName = stylename;
if (QCoreApplication::startingUp()) {
if (!stylename.isEmpty() && !QApplicationPrivate::styleOverride)
QApplicationPrivate::styleOverride = new QString(stylename);
} else {
- QApplication::setStyle(stylename);
+ if (currentStyleName != stylename) {
+ currentStyleName = stylename;
+ QApplication::setStyle(stylename);
+ }
}
int num =