Avoid calling winId() on Qt5.

Avoids breaking QQuickWidget and the likes. See:
* https://bugreports.qt-project.org/browse/QTBUG-41779
* https://bugreports.qt-project.org/browse/QTBUG-40765
* https://bugreports.qt-project.org/browse/QTBUG-41942
This commit is contained in:
0xd34df00d
2014-12-06 02:04:35 +03:00
parent 3ce99c7450
commit 4ae1e1177f
+11
View File
@@ -129,7 +129,17 @@ WId Session::windowId() const
// there are multiple views, then the window ID for the
// top-level window which contains the first view is
// returned
//
// On Qt5, requesting window IDs breaks QQuickWidget and the likes,
// for example, see the following bug reports:
//
// https://bugreports.qt-project.org/browse/QTBUG-41779
// https://bugreports.qt-project.org/browse/QTBUG-40765
// https://bugreports.qt-project.org/browse/QTBUG-41942
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
return 0;
#else
if ( _views.count() == 0 ) {
return 0;
} else {
@@ -143,6 +153,7 @@ WId Session::windowId() const
return window->winId();
}
#endif
}
void Session::setDarkBackground(bool darkBackground)