From bf8014a26903cd94b5693e61bec33dc6864ef0f1 Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Fri, 17 Jun 2016 18:32:52 +0200 Subject: Add PowerVR SGX 554 to the BGRA blacklist PowerVR SGX 554 is used in iPad wi-fi (4th generation) and blacklisting it solves a problem with grabToImage() in QQuickItem. Task-number: QTBUG-45902 Change-Id: I4b6210a48f70614c4364fc63692c97652836f5d3 Reviewed-by: Laszlo Agocs --- src/gui/opengl/qopenglframebufferobject.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/gui/opengl/qopenglframebufferobject.cpp b/src/gui/opengl/qopenglframebufferobject.cpp index 0e1074f8d4..db7de5e8bf 100644 --- a/src/gui/opengl/qopenglframebufferobject.cpp +++ b/src/gui/opengl/qopenglframebufferobject.cpp @@ -1287,7 +1287,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; -- cgit v1.2.3 From 1a7e57766937ba7f00567d82fa482d651bed1560 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Mon, 20 Jun 2016 14:43:13 +0200 Subject: UIKit: Treat windows as exposed only during Qt::ApplicationStateActive We previously treated Qt::ApplicationStateInactive as a valid state to expose windows in, to prevent a visible flash of black screen at app startup between iOS hiding the launch screen and Qt drawing it's first frame, but this lag is no longer an issue, so we can apply the best practice of only rendering during Qt::ApplicationStateActive. This may prevent crashes during application suspension. Task-number: QTBUG-52493 Change-Id: I271281ed6fb857e6849cdb88cc2d8251d1bba1df Reviewed-by: Richard Moe Gustavsen --- src/plugins/platforms/ios/qioscontext.mm | 6 +++++- src/plugins/platforms/ios/qioswindow.mm | 21 +-------------------- 2 files changed, 6 insertions(+), 21 deletions(-) (limited to 'src') diff --git a/src/plugins/platforms/ios/qioscontext.mm b/src/plugins/platforms/ios/qioscontext.mm index eeb07b2796..723319fd3b 100644 --- a/src/plugins/platforms/ios/qioscontext.mm +++ b/src/plugins/platforms/ios/qioscontext.mm @@ -211,8 +211,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(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 6723181c34..a1576eba8e 100644 --- a/src/plugins/platforms/ios/qioswindow.mm +++ b/src/plugins/platforms/ios/qioswindow.mm @@ -217,26 +217,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(); } -- cgit v1.2.3 From 75926434070af2dc3b8f9f48329cb28211764db9 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Wed, 15 Jun 2016 13:49:39 +0200 Subject: eglfs: Fix static builds with kms backends The logging category symbol clashed when linking applications with both kms backends present. This is no longer an issue in 5.7 where the symbol is in the shared kms support lib, but for 5.6 we need to use a different symbol name. Change-Id: I3c323109d6c498e044289455b3d31567a4d5928c Reviewed-by: Ralf Nolden Reviewed-by: Andy Nichols --- .../qeglfskmsegldeviceintegration.cpp | 43 ++++++++++++---------- 1 file changed, 23 insertions(+), 20 deletions(-) (limited to 'src') diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp index ffb701f8ea..f67362ea61 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp @@ -37,7 +37,10 @@ QT_BEGIN_NAMESPACE -Q_LOGGING_CATEGORY(qLcEglfsKmsDebug, "qt.qpa.eglfs.kms") +// Use a name different from qLcEglfsEglKmsDebug to avoid duplicate symbols in +// static builds. Starting from Qt 5.7 this will be solved by the common kms +// support library, but in the meantime just work it around. +Q_LOGGING_CATEGORY(qLcEglfsEglDevDebug, "qt.qpa.eglfs.kms") QEglFSKmsEglDeviceIntegration::QEglFSKmsEglDeviceIntegration() : m_dri_fd(-1) @@ -48,7 +51,7 @@ QEglFSKmsEglDeviceIntegration::QEglFSKmsEglDeviceIntegration() , m_drm_crtc(0) , m_funcs(Q_NULLPTR) { - qCDebug(qLcEglfsKmsDebug, "New DRM/KMS on EGLDevice integration created"); + qCDebug(qLcEglfsEglDevDebug, "New DRM/KMS on EGLDevice integration created"); } void QEglFSKmsEglDeviceIntegration::platformInit() @@ -60,7 +63,7 @@ void QEglFSKmsEglDeviceIntegration::platformInit() if (!deviceName) qFatal("Failed to query device name from EGLDevice"); - qCDebug(qLcEglfsKmsDebug, "Opening %s", deviceName); + qCDebug(qLcEglfsEglDevDebug, "Opening %s", deviceName); m_dri_fd = drmOpen(deviceName, Q_NULLPTR); if (m_dri_fd < 0) @@ -69,7 +72,7 @@ void QEglFSKmsEglDeviceIntegration::platformInit() if (!setup_kms()) qFatal("Could not set up KMS on device %s!", m_device.constData()); - qCDebug(qLcEglfsKmsDebug, "DRM/KMS initialized"); + qCDebug(qLcEglfsEglDevDebug, "DRM/KMS initialized"); } void QEglFSKmsEglDeviceIntegration::platformDestroy() @@ -90,7 +93,7 @@ EGLNativeDisplayType QEglFSKmsEglDeviceIntegration::platformDisplay() const EGLDisplay QEglFSKmsEglDeviceIntegration::createDisplay(EGLNativeDisplayType nativeDisplay) { - qCDebug(qLcEglfsKmsDebug, "Creating display"); + qCDebug(qLcEglfsEglDevDebug, "Creating display"); EGLDisplay display; @@ -181,7 +184,7 @@ void QEglJetsonTK1Window::invalidateSurface() void QEglJetsonTK1Window::resetSurface() { - qCDebug(qLcEglfsKmsDebug, "Creating stream"); + qCDebug(qLcEglfsEglDevDebug, "Creating stream"); EGLDisplay display = screen()->display(); EGLOutputLayerEXT layer = EGL_NO_OUTPUT_LAYER_EXT; @@ -193,14 +196,14 @@ void QEglJetsonTK1Window::resetSurface() return; } - qCDebug(qLcEglfsKmsDebug, "Created stream %p on display %p", m_egl_stream, display); + qCDebug(qLcEglfsEglDevDebug, "Created stream %p on display %p", m_egl_stream, display); if (!m_integration->m_funcs->get_output_layers(display, Q_NULLPTR, Q_NULLPTR, 0, &count) || count == 0) { qWarning("No output layers found"); return; } - qCDebug(qLcEglfsKmsDebug, "Output has %d layers", count); + qCDebug(qLcEglfsEglDevDebug, "Output has %d layers", count); QVector layers; layers.resize(count); @@ -213,14 +216,14 @@ void QEglJetsonTK1Window::resetSurface() for (int i = 0; i < actualCount; ++i) { EGLAttrib id; if (m_integration->m_funcs->query_output_layer_attrib(display, layers[i], EGL_DRM_CRTC_EXT, &id)) { - qCDebug(qLcEglfsKmsDebug, " [%d] layer %p - crtc %d", i, layers[i], (int) id); + qCDebug(qLcEglfsEglDevDebug, " [%d] layer %p - crtc %d", i, layers[i], (int) id); if (id == EGLAttrib(m_integration->m_drm_crtc)) layer = layers[i]; } else if (m_integration->m_funcs->query_output_layer_attrib(display, layers[i], EGL_DRM_PLANE_EXT, &id)) { // Not used yet, just for debugging. - qCDebug(qLcEglfsKmsDebug, " [%d] layer %p - plane %d", i, layers[i], (int) id); + qCDebug(qLcEglfsEglDevDebug, " [%d] layer %p - plane %d", i, layers[i], (int) id); } else { - qCDebug(qLcEglfsKmsDebug, " [%d] layer %p - unknown", i, layers[i]); + qCDebug(qLcEglfsEglDevDebug, " [%d] layer %p - unknown", i, layers[i]); } } @@ -236,18 +239,18 @@ void QEglJetsonTK1Window::resetSurface() return; } - qCDebug(qLcEglfsKmsDebug, "Using layer %p", layer); + qCDebug(qLcEglfsEglDevDebug, "Using layer %p", layer); if (!m_integration->m_funcs->stream_consumer_output(display, m_egl_stream, layer)) qWarning("resetSurface: Unable to connect stream"); m_config = QEglFSIntegration::chooseConfig(display, m_integration->surfaceFormatFor(window()->requestedFormat())); m_format = q_glFormatFromConfig(display, m_config); - qCDebug(qLcEglfsKmsDebug) << "Stream producer format is" << m_format; + qCDebug(qLcEglfsEglDevDebug) << "Stream producer format is" << m_format; const int w = m_integration->screenSize().width(); const int h = m_integration->screenSize().height(); - qCDebug(qLcEglfsKmsDebug, "Creating stream producer surface of size %dx%d", w, h); + qCDebug(qLcEglfsEglDevDebug, "Creating stream producer surface of size %dx%d", w, h); const EGLint stream_producer_attribs[] = { EGL_WIDTH, w, @@ -259,7 +262,7 @@ void QEglJetsonTK1Window::resetSurface() if (m_surface == EGL_NO_SURFACE) return; - qCDebug(qLcEglfsKmsDebug, "Created stream producer surface %p", m_surface); + qCDebug(qLcEglfsEglDevDebug, "Created stream producer surface %p", m_surface); } QEglFSWindow *QEglFSKmsEglDeviceIntegration::createWindow(QWindow *window) const @@ -305,12 +308,12 @@ void QEglFSKmsEglDeviceIntegration::waitForVSync(QPlatformSurface *) const // exposed on the connector apparently. So rely on an env var for now. static bool alwaysDoSet = qEnvironmentVariableIntValue("QT_QPA_EGLFS_ALWAYS_SET_MODE"); if (!alwaysDoSet) { - qCDebug(qLcEglfsKmsDebug, "Mode already set"); + qCDebug(qLcEglfsEglDevDebug, "Mode already set"); return; } } - qCDebug(qLcEglfsKmsDebug, "Setting mode"); + qCDebug(qLcEglfsEglDevDebug, "Setting mode"); int ret = drmModeSetCrtc(m_dri_fd, m_drm_crtc, -1, 0, 0, &m_drm_connector->connector_id, 1, @@ -364,7 +367,7 @@ bool QEglFSKmsEglDeviceIntegration::setup_kms() return false; } - qCDebug(qLcEglfsKmsDebug, "Using connector with type %d", connector->connector_type); + qCDebug(qLcEglfsEglDevDebug, "Using connector with type %d", connector->connector_type); for (i = 0; i < resources->count_encoders; i++) { encoder = drmModeGetEncoder(m_dri_fd, resources->encoders[i]); @@ -392,7 +395,7 @@ bool QEglFSKmsEglDeviceIntegration::setup_kms() m_drm_mode = connector->modes[0]; m_drm_crtc = crtc; - qCDebug(qLcEglfsKmsDebug).noquote() << "Using crtc" << m_drm_crtc + qCDebug(qLcEglfsEglDevDebug).noquote() << "Using crtc" << m_drm_crtc << "with mode" << m_drm_mode.hdisplay << "x" << m_drm_mode.vdisplay << "@" << m_drm_mode.vrefresh; @@ -413,7 +416,7 @@ bool QEglFSKmsEglDeviceIntegration::query_egl_device() return false; } - qCDebug(qLcEglfsKmsDebug, "Found %d EGL devices", num_devices); + qCDebug(qLcEglfsEglDevDebug, "Found %d EGL devices", num_devices); if (num_devices < 1 || m_egl_device == EGL_NO_DEVICE_EXT) { qWarning("eglQueryDevicesEXT could not find any EGL devices"); -- cgit v1.2.3 From f54bd20f6afbbd7bcbc55b3f3f59ed15f91f8ecd Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Tue, 21 Jun 2016 15:48:03 +0200 Subject: Revert "End the drag if the dockwidget is being hidden" This reverts commit 75b705fec8e9517047d7dfa98203edff69f2bf8a and 798e0064e9be78f8320ff25a9af50d1b5e5badb1. This broke drag and drop of QDockWidget if there is no animations (QTBUG-54185) and this caused numerous crash with GrouppedDragging: crashes when dropping on another floating QDockWidget, or when dragging away. The problem being that 'endDrag' would cause the QDockWidget to be hiden temporarily and it would recurse into 'endDrag' and have unwanted effects Task-number: QTBUG-54185 Change-Id: Icad9c6748448783e039bde205b60133f89f25e8e Reviewed-by: Andy Shaw --- src/widgets/widgets/qdockwidget.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'src') diff --git a/src/widgets/widgets/qdockwidget.cpp b/src/widgets/widgets/qdockwidget.cpp index 6e6812aa1e..8b2e7a6660 100644 --- a/src/widgets/widgets/qdockwidget.cpp +++ b/src/widgets/widgets/qdockwidget.cpp @@ -1445,8 +1445,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); -- cgit v1.2.3 From 450e7f06f22e6a30c85624b4d37f8433cbfd3b73 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 18 May 2016 15:33:49 +0200 Subject: QDesktopScreenWidget::screenNumber(): Use native geometry. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Coordinates in device independent pixels are not suitable for checking intersection of screen areas since the screen positions are always unscaled. Move the code to determine the QWindow handle out and transform the frame to device pixels and use QPlatformScreen to check. Change-Id: Idd94f32abc43bc7a04e4056243b7f810631f70cc Task-number: QTBUG-52606 Reviewed-by: Morten Johan Sørvig --- src/widgets/kernel/qdesktopwidget.cpp | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/widgets/kernel/qdesktopwidget.cpp b/src/widgets/kernel/qdesktopwidget.cpp index e87b13c630..19e292375a 100644 --- a/src/widgets/kernel/qdesktopwidget.cpp +++ b/src/widgets/kernel/qdesktopwidget.cpp @@ -38,6 +38,9 @@ #include "qwidget_p.h" #include "qwindow.h" +#include +#include + QT_BEGIN_NAMESPACE QDesktopScreenWidget::QDesktopScreenWidget(QScreen *screen, const QRect &geometry) @@ -239,18 +242,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(); } } @@ -260,11 +263,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; -- cgit v1.2.3 From 1824e43b516244e60bf330e4305c5b8be2b2a812 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 3 May 2016 19:21:44 +0200 Subject: make plugin meta data load failure error message less cryptic Change-Id: I280673e7fd582c5877e8e17ed00318cb10cd537c Reviewed-by: Thiago Macieira --- src/corelib/plugin/qlibrary.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/corelib/plugin/qlibrary.cpp b/src/corelib/plugin/qlibrary.cpp index 317c1dcdc1..17a211a8f0 100644 --- a/src/corelib/plugin/qlibrary.cpp +++ b/src/corelib/plugin/qlibrary.cpp @@ -312,7 +312,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; } -- cgit v1.2.3 From dc2fcd3f8f172766d83cc43657159475ddd8354f Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 15 Jun 2016 11:56:39 +0200 Subject: don't duplicate CONFIG+=installed the included common.pri already does it. amends 9ab41425. Change-Id: If8c9285b92485b6574fde2adc2b92cc44f139ea0 Reviewed-by: Joerg Bornemann --- src/angle/src/libEGL/libEGL.pro | 1 - src/angle/src/libGLESv2/libGLESv2.pro | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) (limited to 'src') 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 c90f3d326e..a7a70da241 100644 --- a/src/angle/src/libGLESv2/libGLESv2.pro +++ b/src/angle/src/libGLESv2/libGLESv2.pro @@ -1,4 +1,4 @@ -CONFIG += simd installed +CONFIG += simd include(../common/common.pri) DEF_FILE_TARGET=$${TARGET} TARGET=$$qtLibraryTarget($${LIBGLESV2_NAME}) -- cgit v1.2.3 From 5c38740031d67ae6be54615eb26e8c57d63b04b1 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 21 Jun 2016 17:09:49 +0200 Subject: limit installation of ANGLE translator and preprocessor helper libraries libGLES2 (the only user of these libraries) is built dynamically even in a static qt built when dynamicgl is configured. in this case the static libraries need not be installed. amends 2311997. Change-Id: Ic9bc3937d6ee0d97e0ca7fc96596fa90ebfe8710 Reviewed-by: Joerg Bornemann --- src/angle/src/compiler/preprocessor/preprocessor.pro | 1 + src/angle/src/compiler/translator.pro | 1 + 2 files changed, 2 insertions(+) (limited to 'src') 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 b40aa96319..31aeae92b0 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 += \ -- cgit v1.2.3 From 32a3bcb359f362d9bcb2e3083a481978f1a952de Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 21 Jun 2016 17:25:49 +0200 Subject: fix double installation of ANGLE libraries in static+dynamicgl builds CONFIG static/shared needs to be manipulated before it is used by qt_installs.prf (via qt_helper_lib.prf via config.pri). amends 2311997. Task-number: QTBUG-54109 Change-Id: Icb53f3170e6d6f09d60b77a221f4f239c6e6721f Reviewed-by: Joerg Bornemann --- src/angle/src/common/common.pri | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src') 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= -- cgit v1.2.3 From f968bd665eb16d983a536dd61b27b8885457f574 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Wed, 22 Jun 2016 15:39:21 +0200 Subject: Fix regression in simple RGB16->RGB16 scaling The fix for QTBUG-35927 introduced a too strict check when scaling from a 16-bit source to a 16-bit destination. This patch changes the limit to adjust to source type. Task-number: QTBUG-54281 Change-Id: I6dd2bb8308f77520c00fa3ef6643a42462c5d351 Reviewed-by: Lars Knoll --- src/gui/painting/qblendfunctions_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/gui/painting/qblendfunctions_p.h b/src/gui/painting/qblendfunctions_p.h index 4435421cd0..a069f89db7 100644 --- a/src/gui/painting/qblendfunctions_p.h +++ b/src/gui/painting/qblendfunctions_p.h @@ -134,7 +134,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--) { -- cgit v1.2.3 From 9caac0f176040b4da48d3ea289683b0b082cf729 Mon Sep 17 00:00:00 2001 From: Ralf Nolden Date: Wed, 22 Jun 2016 13:23:32 +0200 Subject: Add OpenBSD to list of targets that can't use --no-undefined in qtcore A prior commit has already added the resetting of QMAKE_LFLAGS_NOUNDEF in corelib.pro for FreeBSD due to environ(7) not being part of libc. OpenBSD has the same issue, so add it to the list of BSD systems affected for resetting the flags for qtcore. Change-Id: I50a62271ffa05a9976e802de420d47a1425359c4 Reviewed-by: Oswald Buddenhagen Reviewed-by: Thiago Macieira --- src/corelib/corelib.pro | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/corelib/corelib.pro b/src/corelib/corelib.pro index 37f33253e0..4fe839d9c9 100644 --- a/src/corelib/corelib.pro +++ b/src/corelib/corelib.pro @@ -29,8 +29,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) -- cgit v1.2.3 From 0f4affc0b1e6625be16fda35dd15268c639a3b93 Mon Sep 17 00:00:00 2001 From: Liang Qi Date: Wed, 22 Jun 2016 22:05:47 +0200 Subject: Fix inconsistency between the #if guards in SSL PSK code The declaration and definition of the forwarding functions for PSK differed which leads to link errors with some versions of openssl. Change-Id: I40410f62a584c5dbd2acf5c90422e1243514f8fd Reviewed-by: Richard J. Moore --- src/network/ssl/qsslsocket_openssl_symbols_p.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/network/ssl/qsslsocket_openssl_symbols_p.h b/src/network/ssl/qsslsocket_openssl_symbols_p.h index 7f87f11b7c..9ae21e5b59 100644 --- a/src/network/ssl/qsslsocket_openssl_symbols_p.h +++ b/src/network/ssl/qsslsocket_openssl_symbols_p.h @@ -367,10 +367,10 @@ 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); -#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(); -- cgit v1.2.3 From f4be16e1f7828a0f6992ef2e20b9106177d7fc88 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 22 Jun 2016 11:31:36 -0700 Subject: Win: Get rid of unused variables un QDateTime::currentMSecsSinceEpoch The compiler didn't complain that they were unused or -Werror / -WX was not active. Change-Id: Ib57b52598e2f452985e9fffd145a7b63a32189fd Reviewed-by: Maurice Kalinowski --- src/corelib/tools/qdatetime.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'src') diff --git a/src/corelib/tools/qdatetime.cpp b/src/corelib/tools/qdatetime.cpp index 29c8dbb2ea..1719d7f470 100644 --- a/src/corelib/tools/qdatetime.cpp +++ b/src/corelib/tools/qdatetime.cpp @@ -4118,8 +4118,6 @@ QDateTime QDateTime::currentDateTimeUtc() qint64 QDateTime::currentMSecsSinceEpoch() Q_DECL_NOTHROW { - QDate d; - QTime t; SYSTEMTIME st; memset(&st, 0, sizeof(SYSTEMTIME)); GetSystemTime(&st); -- cgit v1.2.3