diff options
author | Jørgen Lind <jorgen.lind@digia.com> | 2013-10-25 14:19:10 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-10-30 08:11:00 +0100 |
commit | ac693bf7541552fad9cb216e200c85b441fcde58 (patch) | |
tree | ff6f9c2558095c40681d4975e9993e6b71e6bca3 /src/plugins/platforms/xcb/qxcbintegration.cpp | |
parent | 396aa7fadee47fc2081abbb224e93ac8d668daa0 (diff) |
Add QGuiApplication::sync() function
This will allow applications to make sure Qt has the same state as the
window system at any given point. The use of this function is
discouraged but it is very useful for auto tests.
Change-Id: I691bff365fc391e9d7213f2607008983505bb774
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbintegration.cpp')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbintegration.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/plugins/platforms/xcb/qxcbintegration.cpp b/src/plugins/platforms/xcb/qxcbintegration.cpp index 6b5ea93638..d794065d45 100644 --- a/src/plugins/platforms/xcb/qxcbintegration.cpp +++ b/src/plugins/platforms/xcb/qxcbintegration.cpp @@ -282,6 +282,7 @@ bool QXcbIntegration::hasCapability(QPlatformIntegration::Capability cap) const case WindowMasks: return true; case MultipleWindows: return true; case ForeignWindows: return true; + case SyncState: return true; default: return QPlatformIntegration::hasCapability(cap); } } @@ -458,4 +459,11 @@ QPlatformSessionManager *QXcbIntegration::createPlatformSessionManager(const QSt } #endif +void QXcbIntegration::sync() +{ + for (int i = 0; i < m_connections.size(); i++) { + m_connections.at(i)->sync(); + } +} + QT_END_NAMESPACE |