diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2016-01-26 14:35:50 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@theqtcompany.com> | 2016-01-26 16:27:28 +0100 |
commit | a15c3d086dafea83e4760f0b447be43d26b80697 (patch) | |
tree | fd224a3f83942ff4c432e1e3a3f8583d14d6a11c /src/plugins | |
parent | 87abfd351af6309691d921ca0aef077d74df4732 (diff) | |
parent | 397061a6a92db9f962360d5db96f69b315f93074 (diff) |
Merge remote-tracking branch 'origin/5.6' into dev
Conflicts:
src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java
src/dbus/qdbusconnection_p.h
src/dbus/qdbusintegrator.cpp
src/dbus/qdbusintegrator_p.h
tests/auto/corelib/io/qdir/qdir.pro
tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp
Change-Id: I3d3fd07aed015c74b1f545f1327aa73d5f365fcc
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/platforms/android/qandroidplatformtheme.cpp | 2 | ||||
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoawindow.mm | 12 | ||||
-rw-r--r-- | src/plugins/platforms/eglfs/qeglfscontext.cpp | 10 | ||||
-rw-r--r-- | src/plugins/platforms/eglfs/qeglfscontext.h | 1 |
4 files changed, 24 insertions, 1 deletions
diff --git a/src/plugins/platforms/android/qandroidplatformtheme.cpp b/src/plugins/platforms/android/qandroidplatformtheme.cpp index a906d0b9fd..7bed4a739a 100644 --- a/src/plugins/platforms/android/qandroidplatformtheme.cpp +++ b/src/plugins/platforms/android/qandroidplatformtheme.cpp @@ -201,7 +201,7 @@ QJsonObject AndroidStyle::loadStyleData() } Q_ASSERT(!stylePath.isEmpty()); - if (!androidTheme.isEmpty() && QFileInfo(stylePath + androidTheme + QLatin1String("style.json")).exists()) + if (!androidTheme.isEmpty() && QFileInfo::exists(stylePath + androidTheme + QLatin1String("style.json"))) stylePath += androidTheme; QFile f(stylePath + QLatin1String("style.json")); diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm index 3d6732b648..eb65f7e061 100644 --- a/src/plugins/platforms/cocoa/qcocoawindow.mm +++ b/src/plugins/platforms/cocoa/qcocoawindow.mm @@ -1792,6 +1792,18 @@ void QCocoaWindow::exposeWindow() if (!isWindowExposable()) return; + // Update the QWindow's screen property. This property is set + // to QGuiApplication::primaryScreen() at QWindow construciton + // time, and we won't get a NSWindowDidChangeScreenNotification + // on show. The case where the window is initially displayed + // on a non-primary screen needs special handling here. + NSUInteger screenIndex = [[NSScreen screens] indexOfObject:m_nsWindow.screen]; + if (screenIndex != NSNotFound) { + QCocoaScreen *cocoaScreen = QCocoaIntegration::instance()->screenAtIndex(screenIndex); + if (cocoaScreen) + window()->setScreen(cocoaScreen->screen()); + } + if (!m_isExposed) { m_isExposed = true; m_exposedGeometry = geometry(); diff --git a/src/plugins/platforms/eglfs/qeglfscontext.cpp b/src/plugins/platforms/eglfs/qeglfscontext.cpp index 1bb4918948..229ac6bbd9 100644 --- a/src/plugins/platforms/eglfs/qeglfscontext.cpp +++ b/src/plugins/platforms/eglfs/qeglfscontext.cpp @@ -91,6 +91,16 @@ void QEglFSContext::destroyTemporaryOffscreenSurface(EGLSurface surface) } } +void QEglFSContext::runGLChecks() +{ + // Note that even though there is an EGL context current here, + // QOpenGLContext and QOpenGLFunctions are not yet usable at this stage. + const char *renderer = reinterpret_cast<const char *>(glGetString(GL_RENDERER)); + // Be nice and warn about a common source of confusion. + if (renderer && strstr(renderer, "llvmpipe")) + qWarning("Running on a software rasterizer (LLVMpipe), expect limited performance."); +} + void QEglFSContext::swapBuffers(QPlatformSurface *surface) { // draw the cursor diff --git a/src/plugins/platforms/eglfs/qeglfscontext.h b/src/plugins/platforms/eglfs/qeglfscontext.h index ffe105cdac..b861ae5329 100644 --- a/src/plugins/platforms/eglfs/qeglfscontext.h +++ b/src/plugins/platforms/eglfs/qeglfscontext.h @@ -54,6 +54,7 @@ public: EGLSurface eglSurfaceForPlatformSurface(QPlatformSurface *surface) Q_DECL_OVERRIDE; EGLSurface createTemporaryOffscreenSurface() Q_DECL_OVERRIDE; void destroyTemporaryOffscreenSurface(EGLSurface surface) Q_DECL_OVERRIDE; + void runGLChecks() Q_DECL_OVERRIDE; void swapBuffers(QPlatformSurface *surface) Q_DECL_OVERRIDE; private: |