summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/qwindowsintegration.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@theqtcompany.com>2015-12-02 23:33:06 +0100
committerLiang Qi <liang.qi@theqtcompany.com>2015-12-02 23:33:06 +0100
commit72f5867f144cec8fc7848cbcc772683fe845652d (patch)
tree7513af27b59332bf111f406d304977adc8c8612e /src/plugins/platforms/windows/qwindowsintegration.cpp
parent13777097118c496391d4b9656b95097ac25e4a40 (diff)
parentbf0af8b5a24de7e595929a64948a3548936aaaee (diff)
Merge remote-tracking branch 'origin/5.6' into dev
Conflicts: src/corelib/kernel/qcoreapplication.cpp src/corelib/kernel/qeventdispatcher_blackberry.cpp src/network/bearer/qnetworkconfiguration.cpp src/plugins/bearer/blackberry/qbbengine.cpp src/plugins/platforms/android/androidjnimain.cpp src/plugins/platforms/android/qandroidplatformtheme.cpp src/plugins/platforms/qnx/qqnxbpseventfilter.cpp src/plugins/platforms/qnx/qqnxfiledialoghelper_bb10.cpp src/plugins/platforms/qnx/qqnxinputcontext_imf.cpp src/plugins/platforms/qnx/qqnxintegration.cpp src/plugins/platforms/qnx/qqnxnavigatorbps.cpp src/plugins/platforms/qnx/qqnxvirtualkeyboardbps.cpp src/plugins/platforms/qnx/qqnxwindow.cpp src/widgets/kernel/qwidgetwindow.cpp src/widgets/styles/qwindowsvistastyle.cpp src/widgets/styles/qwindowsxpstyle.cpp src/widgets/widgets/qtoolbararealayout.cpp tests/auto/corelib/global/qflags/qflags.pro tests/auto/corelib/itemmodels/qitemmodel/modelstotest.cpp tests/auto/corelib/tools/qversionnumber/qversionnumber.pro tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp Change-Id: I37be88c6c185bb85404823353e027a0a6acdbce4
Diffstat (limited to 'src/plugins/platforms/windows/qwindowsintegration.cpp')
-rw-r--r--src/plugins/platforms/windows/qwindowsintegration.cpp19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/plugins/platforms/windows/qwindowsintegration.cpp b/src/plugins/platforms/windows/qwindowsintegration.cpp
index 81525775c6..5f22ca1887 100644
--- a/src/plugins/platforms/windows/qwindowsintegration.cpp
+++ b/src/plugins/platforms/windows/qwindowsintegration.cpp
@@ -285,6 +285,8 @@ bool QWindowsIntegration::hasCapability(QPlatformIntegration::Capability cap) co
return true;
case AllGLFunctionsQueryable:
return true;
+ case SwitchableWidgetComposition:
+ return true;
default:
return QPlatformIntegration::hasCapability(cap);
}
@@ -341,11 +343,18 @@ QWindowsWindow *QWindowsIntegration::createPlatformWindowHelper(QWindow *window,
QWindowsStaticOpenGLContext *QWindowsStaticOpenGLContext::doCreate()
{
#if defined(QT_OPENGL_DYNAMIC)
+ const QWindowsOpenGLTester::Renderers supportedRenderers = QWindowsOpenGLTester::supportedRenderers();
+
QWindowsOpenGLTester::Renderer requestedRenderer = QWindowsOpenGLTester::requestedRenderer();
switch (requestedRenderer) {
case QWindowsOpenGLTester::DesktopGl:
- if (QWindowsStaticOpenGLContext *glCtx = QOpenGLStaticContext::create())
+ if (QWindowsStaticOpenGLContext *glCtx = QOpenGLStaticContext::create()) {
+ if ((supportedRenderers & QWindowsOpenGLTester::DisableRotationFlag)
+ && !QWindowsScreen::setOrientationPreference(Qt::LandscapeOrientation)) {
+ qCWarning(lcQpaGl, "Unable to disable rotation.");
+ }
return glCtx;
+ }
qCWarning(lcQpaGl, "System OpenGL failed. Falling back to Software OpenGL.");
return QOpenGLStaticContext::create(true);
// If ANGLE is requested, use it, don't try anything else.
@@ -366,10 +375,14 @@ QWindowsStaticOpenGLContext *QWindowsStaticOpenGLContext::doCreate()
break;
}
- const QWindowsOpenGLTester::Renderers supportedRenderers = QWindowsOpenGLTester::supportedRenderers();
if (supportedRenderers & QWindowsOpenGLTester::DesktopGl) {
- if (QWindowsStaticOpenGLContext *glCtx = QOpenGLStaticContext::create())
+ if (QWindowsStaticOpenGLContext *glCtx = QOpenGLStaticContext::create()) {
+ if ((supportedRenderers & QWindowsOpenGLTester::DisableRotationFlag)
+ && !QWindowsScreen::setOrientationPreference(Qt::LandscapeOrientation)) {
+ qCWarning(lcQpaGl, "Unable to disable rotation.");
+ }
return glCtx;
+ }
}
if (QWindowsOpenGLTester::Renderers glesRenderers = supportedRenderers & QWindowsOpenGLTester::GlesMask) {
if (QWindowsEGLStaticContext *eglCtx = QWindowsEGLStaticContext::create(glesRenderers))