diff options
author | Olivier Blin <olivier.blin@softathome.com> | 2016-05-30 11:16:19 +0200 |
---|---|---|
committer | Olivier Blin <qt@blino.org> | 2016-07-06 09:09:35 +0000 |
commit | 3cc2884c031e0ab1098f59fae9aa6e05f54d36f8 (patch) | |
tree | f7a82e8487da1a4f44cea2f15912f9fe71a41a7e /src/gui/kernel | |
parent | 8f85e82c5dc3d3028828e11ff59b16e3cae2844d (diff) |
Fix defining QGuiApplication::sync() when QT_NO_SESSIONMANAGER is set
sync() is unconditionally declared in the QGuiApplication header, but
the definition was under QT_NO_SESSIONMANAGER guards.
This commit moves the definition of sync() outside of
the QT_NO_SESSIONMANAGER guards, since the sync code has nothing to do
with session management.
[ChangeLog][QtGui][QGuiApplication] Fixed a bug that would cause
QGuiApplication::sync() to be left undefined for Qt builds without
session management support.
Change-Id: Ieb46f7c90c9193e89469126170117d9df672f4cb
Task-number: QTBUG-51703
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/gui/kernel')
-rw-r--r-- | src/gui/kernel/qguiapplication.cpp | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index dec701a17d..7b05ee562b 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -3275,28 +3275,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); @@ -3322,6 +3300,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 |