summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qguiapplication.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel/qguiapplication.cpp')
-rw-r--r--src/gui/kernel/qguiapplication.cpp47
1 files changed, 24 insertions, 23 deletions
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index 7afeadcced..416c899270 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -3355,28 +3355,6 @@ bool QGuiApplication::isSavingSession() const
return d->is_saving_session;
}
-/*!
- \since 5.2
-
- Function that can be used to sync Qt state with the Window Systems state.
-
- This function will first empty Qts events by calling QCoreApplication::processEvents(),
- then the platform plugin will sync up with the windowsystem, and finally Qts events
- will be delived by another call to QCoreApplication::processEvents();
-
- This function is timeconsuming and its use is discouraged.
-*/
-void QGuiApplication::sync()
-{
- QCoreApplication::processEvents();
- if (QGuiApplicationPrivate::platform_integration
- && QGuiApplicationPrivate::platform_integration->hasCapability(QPlatformIntegration::SyncState)) {
- QGuiApplicationPrivate::platform_integration->sync();
- QCoreApplication::processEvents();
- QWindowSystemInterface::flushWindowSystemEvents();
- }
-}
-
void QGuiApplicationPrivate::commitData()
{
Q_Q(QGuiApplication);
@@ -3402,6 +3380,28 @@ void QGuiApplicationPrivate::saveState()
#endif //QT_NO_SESSIONMANAGER
/*!
+ \since 5.2
+
+ Function that can be used to sync Qt state with the Window Systems state.
+
+ This function will first empty Qts events by calling QCoreApplication::processEvents(),
+ then the platform plugin will sync up with the windowsystem, and finally Qts events
+ will be delived by another call to QCoreApplication::processEvents();
+
+ This function is timeconsuming and its use is discouraged.
+*/
+void QGuiApplication::sync()
+{
+ QCoreApplication::processEvents();
+ if (QGuiApplicationPrivate::platform_integration
+ && QGuiApplicationPrivate::platform_integration->hasCapability(QPlatformIntegration::SyncState)) {
+ QGuiApplicationPrivate::platform_integration->sync();
+ QCoreApplication::processEvents();
+ QWindowSystemInterface::flushWindowSystemEvents();
+ }
+}
+
+/*!
\property QGuiApplication::layoutDirection
\brief the default layout direction for this application
@@ -3647,7 +3647,8 @@ QPixmap QGuiApplicationPrivate::getPixmapCursor(Qt::CursorShape cshape)
void QGuiApplicationPrivate::notifyThemeChanged()
{
- if (!(applicationResourceFlags & ApplicationPaletteExplicitlySet)) {
+ if (!(applicationResourceFlags & ApplicationPaletteExplicitlySet) &&
+ !QCoreApplication::testAttribute(Qt::AA_SetPalette)) {
clearPalette();
initPalette();
}