diff options
author | Liang Qi <liang.qi@qt.io> | 2016-06-23 13:23:57 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2016-06-23 14:24:55 +0200 |
commit | dd90af122154af8ba8cba16c8760c3d2a1d0fcab (patch) | |
tree | 08dc64d9960346c4b27f42c7e58ef9d8885ac760 /src | |
parent | b24396b925c78a59ef4a59d69a6b2633887aaf2f (diff) | |
parent | 5cfb80a28ef6bf6820c970a6c355e6879021e46e (diff) |
Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
mkspecs/common/mac.conf
mkspecs/features/configure_base.prf
mkspecs/features/configure.prf
mkspecs/macx-clang-32/qmake.conf
mkspecs/macx-clang/qmake.conf
mkspecs/macx-ios-clang/qmake.conf
src/network/ssl/qsslsocket_openssl_symbols_p.h
Change-Id: I768b592e8e589662b1fdb9b8cbd633fef26845b6
Diffstat (limited to 'src')
-rw-r--r-- | src/angle/src/common/common.pri | 12 | ||||
-rw-r--r-- | src/angle/src/compiler/preprocessor/preprocessor.pro | 1 | ||||
-rw-r--r-- | src/angle/src/compiler/translator.pro | 1 | ||||
-rw-r--r-- | src/angle/src/libEGL/libEGL.pro | 1 | ||||
-rw-r--r-- | src/angle/src/libGLESv2/libGLESv2.pro | 2 | ||||
-rw-r--r-- | src/corelib/corelib.pro | 5 | ||||
-rw-r--r-- | src/corelib/global/qendian.h | 6 | ||||
-rw-r--r-- | src/corelib/plugin/qlibrary.cpp | 2 | ||||
-rw-r--r-- | src/corelib/tools/qdatetime.cpp | 2 | ||||
-rw-r--r-- | src/gui/opengl/qopenglframebufferobject.cpp | 3 | ||||
-rw-r--r-- | src/gui/painting/qblendfunctions_p.h | 2 | ||||
-rw-r--r-- | src/network/ssl/qsslsocket_openssl_symbols_p.h | 4 | ||||
-rw-r--r-- | src/plugins/platforms/ios/qioscontext.mm | 6 | ||||
-rw-r--r-- | src/plugins/platforms/ios/qioswindow.mm | 21 | ||||
-rw-r--r-- | src/widgets/kernel/qdesktopwidget.cpp | 20 | ||||
-rw-r--r-- | src/widgets/widgets/qdockwidget.cpp | 2 |
16 files changed, 36 insertions, 54 deletions
diff --git a/src/angle/src/common/common.pri b/src/angle/src/common/common.pri index 50dde6398b..83cd1e8687 100644 --- a/src/angle/src/common/common.pri +++ b/src/angle/src/common/common.pri @@ -1,3 +1,9 @@ +# static builds should still link ANGLE dynamically when dynamic GL is enabled +static:contains(QT_CONFIG, dynamicgl) { + CONFIG -= static + CONFIG += shared +} + CONFIG += installed include (../config.pri) @@ -48,10 +54,4 @@ winrt|if(msvc:!win32-msvc2005:!win32-msvc2008:!win32-msvc2010) { } } -# static builds should still link ANGLE dynamically when dynamic GL is enabled -static:contains(QT_CONFIG, dynamicgl) { - CONFIG -= static - CONFIG += shared -} - static: DEFINES *= LIBGLESV2_EXPORT_H_ ANGLE_EXPORT= diff --git a/src/angle/src/compiler/preprocessor/preprocessor.pro b/src/angle/src/compiler/preprocessor/preprocessor.pro index 12f644870d..cbf411623d 100644 --- a/src/angle/src/compiler/preprocessor/preprocessor.pro +++ b/src/angle/src/compiler/preprocessor/preprocessor.pro @@ -1,4 +1,5 @@ CONFIG += static +contains(QT_CONFIG, dynamicgl): CONFIG += not_installed include(../../config.pri) INCLUDEPATH = $$ANGLE_DIR/src/compiler/preprocessor diff --git a/src/angle/src/compiler/translator.pro b/src/angle/src/compiler/translator.pro index 928fd589fb..d48ac70472 100644 --- a/src/angle/src/compiler/translator.pro +++ b/src/angle/src/compiler/translator.pro @@ -1,4 +1,5 @@ CONFIG += static +contains(QT_CONFIG, dynamicgl): CONFIG += not_installed include(../config.pri) INCLUDEPATH += \ diff --git a/src/angle/src/libEGL/libEGL.pro b/src/angle/src/libEGL/libEGL.pro index 695f7fd50c..860b60735e 100644 --- a/src/angle/src/libEGL/libEGL.pro +++ b/src/angle/src/libEGL/libEGL.pro @@ -1,4 +1,3 @@ -CONFIG += installed include(../common/common.pri) DEF_FILE_TARGET=$${TARGET} TARGET=$$qtLibraryTarget($${LIBEGL_NAME}) diff --git a/src/angle/src/libGLESv2/libGLESv2.pro b/src/angle/src/libGLESv2/libGLESv2.pro index 49e69db2e5..b699ae159a 100644 --- a/src/angle/src/libGLESv2/libGLESv2.pro +++ b/src/angle/src/libGLESv2/libGLESv2.pro @@ -1,4 +1,4 @@ -CONFIG += simd installed no_batch +CONFIG += simd no_batch include(../common/common.pri) DEF_FILE_TARGET=$${TARGET} TARGET=$$qtLibraryTarget($${LIBGLESV2_NAME}) diff --git a/src/corelib/corelib.pro b/src/corelib/corelib.pro index ccf9aaa612..1db814180b 100644 --- a/src/corelib/corelib.pro +++ b/src/corelib/corelib.pro @@ -27,8 +27,9 @@ ANDROID_PERMISSIONS = \ android.permission.WRITE_EXTERNAL_STORAGE # QtCore can't be compiled with -Wl,-no-undefined because it uses the "environ" -# variable and on FreeBSD, this variable is in the final executable itself -freebsd: QMAKE_LFLAGS_NOUNDEF = +# variable and on FreeBSD and OpenBSD, this variable is in the final executable itself. +# OpenBSD 6.0 will include environ in libc. +freebsd|openbsd: QMAKE_LFLAGS_NOUNDEF = load(qfeatures) diff --git a/src/corelib/global/qendian.h b/src/corelib/global/qendian.h index c2028289a7..4e9cd2e6e3 100644 --- a/src/corelib/global/qendian.h +++ b/src/corelib/global/qendian.h @@ -49,12 +49,6 @@ QT_BEGIN_NAMESPACE -#ifdef __has_builtin -# define QT_HAS_BUILTIN(x) __has_builtin(x) -#else -# define QT_HAS_BUILTIN(x) 0 -#endif - /* * ENDIAN FUNCTIONS */ diff --git a/src/corelib/plugin/qlibrary.cpp b/src/corelib/plugin/qlibrary.cpp index ff04116705..f7e57461e3 100644 --- a/src/corelib/plugin/qlibrary.cpp +++ b/src/corelib/plugin/qlibrary.cpp @@ -318,7 +318,7 @@ static bool findPatternUnloaded(const QString &library, QLibraryPrivate *lib) } if (!ret && lib) - lib->errorString = QLibrary::tr("Plugin verification data mismatch in '%1'").arg(library); + lib->errorString = QLibrary::tr("Failed to extract plugin meta data from '%1'").arg(library); file.close(); return ret; } diff --git a/src/corelib/tools/qdatetime.cpp b/src/corelib/tools/qdatetime.cpp index 2284444f93..adb539c388 100644 --- a/src/corelib/tools/qdatetime.cpp +++ b/src/corelib/tools/qdatetime.cpp @@ -4313,8 +4313,6 @@ QDateTime QDateTime::currentDateTimeUtc() qint64 QDateTime::currentMSecsSinceEpoch() Q_DECL_NOTHROW { - QDate d; - QTime t; SYSTEMTIME st; memset(&st, 0, sizeof(SYSTEMTIME)); GetSystemTime(&st); diff --git a/src/gui/opengl/qopenglframebufferobject.cpp b/src/gui/opengl/qopenglframebufferobject.cpp index 303d4d4eb1..bcc17457d3 100644 --- a/src/gui/opengl/qopenglframebufferobject.cpp +++ b/src/gui/opengl/qopenglframebufferobject.cpp @@ -1289,7 +1289,8 @@ static inline QImage qt_gl_read_framebuffer_rgba8(const QSize &size, bool includ (qstrcmp(renderer, "Mali-T760") == 0 && ::strstr(ver, "3.1") != 0) || (qstrcmp(renderer, "Mali-T720") == 0 - && ::strstr(ver, "3.1") != 0); + && ::strstr(ver, "3.1") != 0) || + qstrcmp(renderer, "PowerVR SGX 554") == 0; const bool supports_bgra = has_bgra_ext && !blackListed; diff --git a/src/gui/painting/qblendfunctions_p.h b/src/gui/painting/qblendfunctions_p.h index 00036f9994..d21765bcde 100644 --- a/src/gui/painting/qblendfunctions_p.h +++ b/src/gui/painting/qblendfunctions_p.h @@ -140,7 +140,7 @@ void qt_scale_image_16bit(uchar *destPixels, int dbpl, if (yend < 0 || yend >= srch) --h; int xend = (basex + ix * (w - 1)) >> 16; - if (xend < 0 || xend >= (int)(sbpl/sizeof(quint32))) + if (xend < 0 || xend >= (int)(sbpl/sizeof(SRC))) --w; while (h--) { diff --git a/src/network/ssl/qsslsocket_openssl_symbols_p.h b/src/network/ssl/qsslsocket_openssl_symbols_p.h index c0ddb8e888..8743e3acd1 100644 --- a/src/network/ssl/qsslsocket_openssl_symbols_p.h +++ b/src/network/ssl/qsslsocket_openssl_symbols_p.h @@ -389,13 +389,13 @@ int q_SSL_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, CRYPT int q_SSL_set_ex_data(SSL *ssl, int idx, void *arg); void *q_SSL_get_ex_data(const SSL *ssl, int idx); #endif -#ifndef OPENSSL_NO_PSK +#if OPENSSL_VERSION_NUMBER >= 0x10001000L && !defined(OPENSSL_NO_PSK) typedef unsigned int (*q_psk_client_callback_t)(SSL *ssl, const char *hint, char *identity, unsigned int max_identity_len, unsigned char *psk, unsigned int max_psk_len); void q_SSL_set_psk_client_callback(SSL *ssl, q_psk_client_callback_t callback); typedef unsigned int (*q_psk_server_callback_t)(SSL *ssl, const char *identity, unsigned char *psk, unsigned int max_psk_len); void q_SSL_set_psk_server_callback(SSL *ssl, q_psk_server_callback_t callback); int q_SSL_CTX_use_psk_identity_hint(SSL_CTX *ctx, const char *hint); -#endif // OPENSSL_NO_PSK +#endif // OPENSSL_VERSION_NUMBER >= 0x10001000L && !defined(OPENSSL_NO_PSK) #if OPENSSL_VERSION_NUMBER >= 0x10000000L #ifndef OPENSSL_NO_SSL2 const SSL_METHOD *q_SSLv2_client_method(); diff --git a/src/plugins/platforms/ios/qioscontext.mm b/src/plugins/platforms/ios/qioscontext.mm index d18e317bfb..50374dc951 100644 --- a/src/plugins/platforms/ios/qioscontext.mm +++ b/src/plugins/platforms/ios/qioscontext.mm @@ -217,8 +217,12 @@ void QIOSContext::swapBuffers(QPlatformSurface *surface) if (surface->surface()->surfaceClass() == QSurface::Offscreen) return; // Nothing to do + // When using threaded rendering, the render-thread may not have picked up + // yet on the fact that a window is no longer exposed, and will try to swap + // a non-exposed window. This may in some cases result in crashes, e.g. when + // iOS is suspending an application, so we have an extra guard here. if (!static_cast<QIOSWindow *>(surface)->isExposed()) { - qCWarning(lcQpaGLContext, "Detected swapBuffers on a non-exposed window, skipping flush"); + qCDebug(lcQpaGLContext, "Detected swapBuffers on a non-exposed window, skipping flush"); return; } diff --git a/src/plugins/platforms/ios/qioswindow.mm b/src/plugins/platforms/ios/qioswindow.mm index 2805eaa304..cddfbe6b06 100644 --- a/src/plugins/platforms/ios/qioswindow.mm +++ b/src/plugins/platforms/ios/qioswindow.mm @@ -223,26 +223,7 @@ void QIOSWindow::applyGeometry(const QRect &rect) bool QIOSWindow::isExposed() const { - // Note: At startup of an iOS app it will enter UIApplicationStateInactive - // while showing the launch screen, and once the application returns from - // applicationDidFinishLaunching it will hide the launch screen and enter - // UIApplicationStateActive. Technically, a window is not exposed until - // it's actually visible on screen, and Apple also documents that "Apps - // that use OpenGL ES for drawing must not use didFinishLaunching to - // prepare their drawing environment. Instead, defer any OpenGL ES - // drawing calls to applicationDidBecomeActive". Unfortunately, if we - // wait until the applicationState reaches ApplicationActive to signal - // that the window is exposed, we get a lag between hiding the launch - // screen and blitting the first pixels of the application, as Qt - // spends some time drawing those pixels in response to the expose. - // In practice there doesn't seem to be any issues starting GL setup - // and drawing from within applicationDidFinishLaunching, and this is - // also the recommended approach for other 3rd party GL toolkits on iOS, - // so we 'cheat', and report that a window is exposed even if the app - // is in UIApplicationStateInactive, so that the startup transition - // between the launch screen and the application content is smooth. - - return qApp->applicationState() > Qt::ApplicationHidden + return qApp->applicationState() >= Qt::ApplicationActive && window()->isVisible() && !window()->geometry().isEmpty(); } diff --git a/src/widgets/kernel/qdesktopwidget.cpp b/src/widgets/kernel/qdesktopwidget.cpp index ece673337a..eee818b685 100644 --- a/src/widgets/kernel/qdesktopwidget.cpp +++ b/src/widgets/kernel/qdesktopwidget.cpp @@ -44,6 +44,9 @@ #include "qwidget_p.h" #include "qwindow.h" +#include <private/qhighdpiscaling_p.h> +#include <qpa/qplatformscreen.h> + QT_BEGIN_NAMESPACE QDesktopScreenWidget::QDesktopScreenWidget(QScreen *screen, const QRect &geometry) @@ -245,18 +248,18 @@ int QDesktopWidget::screenNumber(const QWidget *w) const if (screens.isEmpty()) // This should never happen return primaryScreen(); + const QWindow *winHandle = w->windowHandle(); + if (!winHandle) { + if (const QWidget *nativeParent = w->nativeParentWidget()) + winHandle = nativeParent->windowHandle(); + } + // If there is more than one virtual desktop if (screens.count() != screens.constFirst()->virtualSiblings().count()) { // Find the root widget, get a QScreen from it and use the // virtual siblings for checking the window position. - const QWidget *root = w; - const QWidget *tmp = w; - while ((tmp = tmp->parentWidget())) - root = tmp; - const QWindow *winHandle = root->windowHandle(); if (winHandle) { - const QScreen *winScreen = winHandle->screen(); - if (winScreen) + if (const QScreen *winScreen = winHandle->screen()) screens = winScreen->virtualSiblings(); } } @@ -266,11 +269,12 @@ int QDesktopWidget::screenNumber(const QWidget *w) const QRect frame = w->frameGeometry(); if (!w->isWindow()) frame.moveTopLeft(w->mapToGlobal(QPoint(0, 0))); + const QRect nativeFrame = QHighDpi::toNativePixels(frame, winHandle); QScreen *widgetScreen = Q_NULLPTR; int largestArea = 0; foreach (QScreen *screen, screens) { - QRect intersected = screen->geometry().intersected(frame); + const QRect intersected = screen->handle()->geometry().intersected(nativeFrame); int area = intersected.width() * intersected.height(); if (largestArea < area) { widgetScreen = screen; diff --git a/src/widgets/widgets/qdockwidget.cpp b/src/widgets/widgets/qdockwidget.cpp index 2358568efe..e8c5502ae6 100644 --- a/src/widgets/widgets/qdockwidget.cpp +++ b/src/widgets/widgets/qdockwidget.cpp @@ -1449,8 +1449,6 @@ bool QDockWidget::event(QEvent *event) switch (event->type()) { #ifndef QT_NO_ACTION case QEvent::Hide: - if (d->state && d->state->dragging) - d->endDrag(true); if (layout != 0) layout->keepSize(this); d->toggleViewAction->setChecked(false); |