From bf8014a26903cd94b5693e61bec33dc6864ef0f1 Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Fri, 17 Jun 2016 18:32:52 +0200 Subject: [PATCH 01/17] 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(-) 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; 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: [PATCH 02/17] 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(-) 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(); } From 75926434070af2dc3b8f9f48329cb28211764db9 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Wed, 15 Jun 2016 13:49:39 +0200 Subject: [PATCH 03/17] 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(-) 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"); From f54bd20f6afbbd7bcbc55b3f3f59ed15f91f8ecd Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Tue, 21 Jun 2016 15:48:03 +0200 Subject: [PATCH 04/17] 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(-) 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); From 450e7f06f22e6a30c85624b4d37f8433cbfd3b73 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 18 May 2016 15:33:49 +0200 Subject: [PATCH 05/17] 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(-) 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; From f99bcd763d590be43dbc297699960f66edd6ad19 Mon Sep 17 00:00:00 2001 From: James McDonnell Date: Thu, 9 Jun 2016 12:16:25 -0400 Subject: [PATCH 06/17] Add some 64-bit QNX platforms Add x86-64 and aarch64le QNX platforms. These platforms will be available in QNX 7.0. Change-Id: Iba1f635ba45fddf1a1caf907415a23a510ba0818 Reviewed-by: Oswald Buddenhagen Reviewed-by: Lars Knoll --- mkspecs/common/qcc-base-qnx-aarch64le.conf | 23 +++++++++++++++ mkspecs/common/qcc-base-qnx-x86-64.conf | 23 +++++++++++++++ mkspecs/qnx-aarch64le-qcc/qmake.conf | 17 +++++++++++ mkspecs/qnx-aarch64le-qcc/qplatformdefs.h | 34 ++++++++++++++++++++++ mkspecs/qnx-x86-64-qcc/qmake.conf | 17 +++++++++++ mkspecs/qnx-x86-64-qcc/qplatformdefs.h | 34 ++++++++++++++++++++++ 6 files changed, 148 insertions(+) create mode 100644 mkspecs/common/qcc-base-qnx-aarch64le.conf create mode 100644 mkspecs/common/qcc-base-qnx-x86-64.conf create mode 100644 mkspecs/qnx-aarch64le-qcc/qmake.conf create mode 100644 mkspecs/qnx-aarch64le-qcc/qplatformdefs.h create mode 100644 mkspecs/qnx-x86-64-qcc/qmake.conf create mode 100644 mkspecs/qnx-x86-64-qcc/qplatformdefs.h diff --git a/mkspecs/common/qcc-base-qnx-aarch64le.conf b/mkspecs/common/qcc-base-qnx-aarch64le.conf new file mode 100644 index 0000000000..914ef33f37 --- /dev/null +++ b/mkspecs/common/qcc-base-qnx-aarch64le.conf @@ -0,0 +1,23 @@ +# +# qmake configuration for qnx-qcc aarch64le targets +# + +MAKEFILE_GENERATOR = UNIX + +include(g++-unix.conf) +include(unix.conf) + +QMAKE_CC = qcc -Vgcc_ntoaarch64le +QMAKE_CXX = qcc -Vgcc_ntoaarch64le +QNX_CPUDIR = aarch64le + +include(qcc-base-qnx.conf) + +QMAKE_AR = ntoaarch64-ar cqs +QMAKE_OBJCOPY = ntoaarch64-objcopy +QMAKE_NM = ntoaarch64-nm -P +QMAKE_RANLIB = ntoaarch64-ranlib + +QMAKE_STRIP = ntoaarch64-strip + +load(qt_config) diff --git a/mkspecs/common/qcc-base-qnx-x86-64.conf b/mkspecs/common/qcc-base-qnx-x86-64.conf new file mode 100644 index 0000000000..fd04104f71 --- /dev/null +++ b/mkspecs/common/qcc-base-qnx-x86-64.conf @@ -0,0 +1,23 @@ +# +# qmake configuration for qnx-qcc x86-64 targets +# + +MAKEFILE_GENERATOR = UNIX + +include(g++-unix.conf) +include(unix.conf) + +QMAKE_CC = qcc -Vgcc_ntox86_64 +QMAKE_CXX = qcc -Vgcc_ntox86_64 +QNX_CPUDIR = x86_64 + +include(qcc-base-qnx.conf) + +QMAKE_AR = ntox86_64-ar cqs +QMAKE_OBJCOPY = ntox86_64-objcopy +QMAKE_NM = ntox86_64-nm -P +QMAKE_RANLIB = ntox86_64-ranlib + +QMAKE_STRIP = ntox86_64-strip + +load(qt_config) diff --git a/mkspecs/qnx-aarch64le-qcc/qmake.conf b/mkspecs/qnx-aarch64le-qcc/qmake.conf new file mode 100644 index 0000000000..8e229d360b --- /dev/null +++ b/mkspecs/qnx-aarch64le-qcc/qmake.conf @@ -0,0 +1,17 @@ +# +# qmake configuration for qnx aarch64le systems +# + +DEFINES += QT_NO_CLIPBOARD _FORTIFY_SOURCE=2 + +QMAKE_LFLAGS_SHLIB += -Wl,-z,relro -Wl,-z,now + +include(../common/qcc-base-qnx-aarch64le.conf) + +contains(QT_CONFIG, stack-protector-strong) { + QMAKE_CFLAGS += -fstack-protector-strong + QMAKE_CXXFLAGS += -fstack-protector-strong +} else { + QMAKE_CFLAGS += -fstack-protector -fstack-protector-all + QMAKE_CXXFLAGS += -fstack-protector -fstack-protector-all +} diff --git a/mkspecs/qnx-aarch64le-qcc/qplatformdefs.h b/mkspecs/qnx-aarch64le-qcc/qplatformdefs.h new file mode 100644 index 0000000000..029ee7e062 --- /dev/null +++ b/mkspecs/qnx-aarch64le-qcc/qplatformdefs.h @@ -0,0 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2016 QNX Software Systems. All rights reserved. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the qmake spec of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL21$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "../qnx-armle-v7-qcc/qplatformdefs.h" diff --git a/mkspecs/qnx-x86-64-qcc/qmake.conf b/mkspecs/qnx-x86-64-qcc/qmake.conf new file mode 100644 index 0000000000..f1760e4072 --- /dev/null +++ b/mkspecs/qnx-x86-64-qcc/qmake.conf @@ -0,0 +1,17 @@ +# +# qmake configuration for qnx x86-64 systems +# + +DEFINES += QT_NO_CLIPBOARD + +QMAKE_LFLAGS_SHLIB += -Wl,-z,relro -Wl,-z,now + +include(../common/qcc-base-qnx-x86-64.conf) + +contains(QT_CONFIG, stack-protector-strong) { + QMAKE_CFLAGS += -fstack-protector-strong + QMAKE_CXXFLAGS += -fstack-protector-strong +} else { + QMAKE_CFLAGS += -fstack-protector -fstack-protector-all + QMAKE_CXXFLAGS += -fstack-protector -fstack-protector-all +} diff --git a/mkspecs/qnx-x86-64-qcc/qplatformdefs.h b/mkspecs/qnx-x86-64-qcc/qplatformdefs.h new file mode 100644 index 0000000000..a8c97172d0 --- /dev/null +++ b/mkspecs/qnx-x86-64-qcc/qplatformdefs.h @@ -0,0 +1,34 @@ +/**************************************************************************** +** +** Copyright (C) 2016 QNX Software Systems. All rights reserved. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the qmake spec of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL21$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "../qnx-x86-qcc/qplatformdefs.h" From 1824e43b516244e60bf330e4305c5b8be2b2a812 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 3 May 2016 19:21:44 +0200 Subject: [PATCH 07/17] 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(-) 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; } From dc2fcd3f8f172766d83cc43657159475ddd8354f Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 15 Jun 2016 11:56:39 +0200 Subject: [PATCH 08/17] 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(-) 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}) From 5c38740031d67ae6be54615eb26e8c57d63b04b1 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 21 Jun 2016 17:09:49 +0200 Subject: [PATCH 09/17] 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 --- mkspecs/features/qt_helper_lib.prf | 2 +- src/angle/src/compiler/preprocessor/preprocessor.pro | 1 + src/angle/src/compiler/translator.pro | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/mkspecs/features/qt_helper_lib.prf b/mkspecs/features/qt_helper_lib.prf index 8e61316aa6..1dea474b35 100644 --- a/mkspecs/features/qt_helper_lib.prf +++ b/mkspecs/features/qt_helper_lib.prf @@ -27,6 +27,6 @@ DLLDESTDIR = $$MODULE_BASE_OUTDIR/bin # In static builds of Qt, convenience libraries must be installed, # as in this case they are not linked to the final library/plugin. -installed|contains(QT_CONFIG, static): load(qt_installs) +installed|if(!not_installed:contains(QT_CONFIG, static)): load(qt_installs) TARGET = $$qt5LibraryTarget($$TARGET) 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 += \ From 32a3bcb359f362d9bcb2e3083a481978f1a952de Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 21 Jun 2016 17:25:49 +0200 Subject: [PATCH 10/17] 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(-) 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= From 4c630fce9e39ffa70492c114707359e9c4046443 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 21 Jun 2016 18:19:09 +0200 Subject: [PATCH 11/17] fix make -i wreaking havoc in configure tests outside qtbase the tests would inherit MAKEFLAGS, with somewhat predicatble results. Change-Id: Ia17638f6229d0ae86f5558726850040703d90044 Reviewed-by: Joerg Bornemann --- mkspecs/features/configure.prf | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/mkspecs/features/configure.prf b/mkspecs/features/configure.prf index 2cb2981758..a3ec227eee 100644 --- a/mkspecs/features/configure.prf +++ b/mkspecs/features/configure.prf @@ -1,6 +1,14 @@ +equals(QMAKE_HOST.os, Windows) { + SETENV_PFX = "set " + SETENV_SFX = "&" +} else { + SETENV_PFX = + SETENV_SFX = +} + QMAKE_MAKE = $$(MAKE) !isEmpty(QMAKE_MAKE) { - # We were called recursively. Use the right make, as MAKEFLAGS may be set as well. + # We were called recursively. Use the same make. } else:if(equals(MAKEFILE_GENERATOR, UNIX)|equals(MAKEFILE_GENERATOR, MINGW)) { !equals(QMAKE_HOST.os, Windows): \ QMAKE_MAKE = make @@ -11,6 +19,8 @@ QMAKE_MAKE = $$(MAKE) } else { error("Configure tests are not supported with the $$MAKEFILE_GENERATOR Makefile generator.") } +# Make sure we don't inherit MAKEFLAGS - -i in particular is fatal. +QMAKE_MAKE = "$${SETENV_PFX}MAKEFLAGS=$$SETENV_SFX $$QMAKE_MAKE" # Ensure that a cache is present. If none was found on startup, this will create # one in the build directory of the project which loads this feature. From 1d034244c261520d5e739534dc264c2500e02b5f Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 21 Jun 2016 18:20:51 +0200 Subject: [PATCH 12/17] purge vestige: plugin_no_soname is no more ... for a loooong time. it was replaced by plugin_with_soname (which is unused so far). Change-Id: Ifc377d155d6eac41e85f3a0914ed817d55b5648b Reviewed-by: Joerg Bornemann --- mkspecs/hpux-g++/qmake.conf | 1 - mkspecs/hpuxi-acc-32/qmake.conf | 1 - mkspecs/hpuxi-acc-64/qmake.conf | 1 - mkspecs/macx-clang-32/qmake.conf | 2 +- mkspecs/macx-clang/qmake.conf | 2 +- mkspecs/macx-g++-32/qmake.conf | 2 +- mkspecs/macx-g++/qmake.conf | 2 +- mkspecs/macx-g++40/qmake.conf | 2 +- mkspecs/macx-g++42/qmake.conf | 2 +- mkspecs/macx-ios-clang/qmake.conf | 2 +- mkspecs/macx-llvm/qmake.conf | 2 +- mkspecs/tru64-cxx/qmake.conf | 1 - mkspecs/tru64-g++/qmake.conf | 1 - 13 files changed, 8 insertions(+), 13 deletions(-) diff --git a/mkspecs/hpux-g++/qmake.conf b/mkspecs/hpux-g++/qmake.conf index b488da7178..bfd814b0cb 100644 --- a/mkspecs/hpux-g++/qmake.conf +++ b/mkspecs/hpux-g++/qmake.conf @@ -7,7 +7,6 @@ MAKEFILE_GENERATOR = UNIX QMAKE_PLATFORM = hpux -CONFIG += plugin_no_soname include(../common/unix.conf) diff --git a/mkspecs/hpuxi-acc-32/qmake.conf b/mkspecs/hpuxi-acc-32/qmake.conf index e80a7973fe..fed3b112d1 100644 --- a/mkspecs/hpuxi-acc-32/qmake.conf +++ b/mkspecs/hpuxi-acc-32/qmake.conf @@ -4,7 +4,6 @@ MAKEFILE_GENERATOR = UNIX QMAKE_PLATFORM = hpux -CONFIG += plugin_no_soname include(../common/unix.conf) diff --git a/mkspecs/hpuxi-acc-64/qmake.conf b/mkspecs/hpuxi-acc-64/qmake.conf index 360e35c5d6..20578cb377 100644 --- a/mkspecs/hpuxi-acc-64/qmake.conf +++ b/mkspecs/hpuxi-acc-64/qmake.conf @@ -47,7 +47,6 @@ MAKEFILE_GENERATOR = UNIX QMAKE_PLATFORM = hpux -CONFIG += plugin_no_soname include(../common/unix.conf) diff --git a/mkspecs/macx-clang-32/qmake.conf b/mkspecs/macx-clang-32/qmake.conf index ec33c02e93..56a3bb8ec6 100644 --- a/mkspecs/macx-clang-32/qmake.conf +++ b/mkspecs/macx-clang-32/qmake.conf @@ -3,7 +3,7 @@ # MAKEFILE_GENERATOR = UNIX -CONFIG += app_bundle incremental global_init_link_order lib_version_first plugin_no_soname +CONFIG += app_bundle incremental global_init_link_order lib_version_first QMAKE_INCREMENTAL_STYLE = sublib include(../common/macx.conf) diff --git a/mkspecs/macx-clang/qmake.conf b/mkspecs/macx-clang/qmake.conf index d14b11179a..936f9fe48a 100644 --- a/mkspecs/macx-clang/qmake.conf +++ b/mkspecs/macx-clang/qmake.conf @@ -3,7 +3,7 @@ # MAKEFILE_GENERATOR = UNIX -CONFIG += app_bundle incremental global_init_link_order lib_version_first plugin_no_soname +CONFIG += app_bundle incremental global_init_link_order lib_version_first QMAKE_INCREMENTAL_STYLE = sublib include(../common/macx.conf) diff --git a/mkspecs/macx-g++-32/qmake.conf b/mkspecs/macx-g++-32/qmake.conf index af6fe5689e..46cddda277 100644 --- a/mkspecs/macx-g++-32/qmake.conf +++ b/mkspecs/macx-g++-32/qmake.conf @@ -7,7 +7,7 @@ # MAKEFILE_GENERATOR = UNIX -CONFIG += app_bundle incremental global_init_link_order lib_version_first plugin_no_soname +CONFIG += app_bundle incremental global_init_link_order lib_version_first QMAKE_INCREMENTAL_STYLE = sublib include(../common/macx.conf) diff --git a/mkspecs/macx-g++/qmake.conf b/mkspecs/macx-g++/qmake.conf index 9c44f278e9..f992138400 100644 --- a/mkspecs/macx-g++/qmake.conf +++ b/mkspecs/macx-g++/qmake.conf @@ -7,7 +7,7 @@ # MAKEFILE_GENERATOR = UNIX -CONFIG += app_bundle incremental global_init_link_order lib_version_first plugin_no_soname +CONFIG += app_bundle incremental global_init_link_order lib_version_first QMAKE_INCREMENTAL_STYLE = sublib include(../common/macx.conf) diff --git a/mkspecs/macx-g++40/qmake.conf b/mkspecs/macx-g++40/qmake.conf index 0f2dd6bb71..e03de6eaa8 100644 --- a/mkspecs/macx-g++40/qmake.conf +++ b/mkspecs/macx-g++40/qmake.conf @@ -7,7 +7,7 @@ # MAKEFILE_GENERATOR = UNIX -CONFIG += app_bundle incremental global_init_link_order lib_version_first plugin_no_soname +CONFIG += app_bundle incremental global_init_link_order lib_version_first QMAKE_INCREMENTAL_STYLE = sublib include(../common/macx.conf) diff --git a/mkspecs/macx-g++42/qmake.conf b/mkspecs/macx-g++42/qmake.conf index e003193e1b..7efad4f099 100644 --- a/mkspecs/macx-g++42/qmake.conf +++ b/mkspecs/macx-g++42/qmake.conf @@ -7,7 +7,7 @@ # MAKEFILE_GENERATOR = UNIX -CONFIG += app_bundle incremental global_init_link_order lib_version_first plugin_no_soname +CONFIG += app_bundle incremental global_init_link_order lib_version_first QMAKE_INCREMENTAL_STYLE = sublib include(../common/macx.conf) diff --git a/mkspecs/macx-ios-clang/qmake.conf b/mkspecs/macx-ios-clang/qmake.conf index d5e5840902..9b145c2b03 100644 --- a/mkspecs/macx-ios-clang/qmake.conf +++ b/mkspecs/macx-ios-clang/qmake.conf @@ -3,7 +3,7 @@ # MAKEFILE_GENERATOR = UNIX -CONFIG += app_bundle reduce_exports incremental global_init_link_order lib_version_first plugin_no_soname sdk +CONFIG += app_bundle reduce_exports incremental global_init_link_order lib_version_first sdk QMAKE_INCREMENTAL_STYLE = sublib QMAKE_MACOSX_DEPLOYMENT_TARGET = diff --git a/mkspecs/macx-llvm/qmake.conf b/mkspecs/macx-llvm/qmake.conf index cf4e00cd61..1267a39e71 100644 --- a/mkspecs/macx-llvm/qmake.conf +++ b/mkspecs/macx-llvm/qmake.conf @@ -7,7 +7,7 @@ # MAKEFILE_GENERATOR = UNIX -CONFIG += app_bundle incremental global_init_link_order lib_version_first plugin_no_soname +CONFIG += app_bundle incremental global_init_link_order lib_version_first QMAKE_INCREMENTAL_STYLE = sublib include(../common/macx.conf) diff --git a/mkspecs/tru64-cxx/qmake.conf b/mkspecs/tru64-cxx/qmake.conf index 024590bf91..87dabfb7e1 100644 --- a/mkspecs/tru64-cxx/qmake.conf +++ b/mkspecs/tru64-cxx/qmake.conf @@ -4,7 +4,6 @@ MAKEFILE_GENERATOR = UNIX QMAKE_PLATFORM = tru64 -CONFIG += plugin_no_soname include(../common/unix.conf) diff --git a/mkspecs/tru64-g++/qmake.conf b/mkspecs/tru64-g++/qmake.conf index 193e2694ea..c31eccca3e 100644 --- a/mkspecs/tru64-g++/qmake.conf +++ b/mkspecs/tru64-g++/qmake.conf @@ -4,7 +4,6 @@ MAKEFILE_GENERATOR = UNIX QMAKE_PLATFORM = tru64 -CONFIG += plugin_no_soname include(../common/unix.conf) From f968bd665eb16d983a536dd61b27b8885457f574 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Wed, 22 Jun 2016 15:39:21 +0200 Subject: [PATCH 13/17] 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(-) 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--) { From 9caac0f176040b4da48d3ea289683b0b082cf729 Mon Sep 17 00:00:00 2001 From: Ralf Nolden Date: Wed, 22 Jun 2016 13:23:32 +0200 Subject: [PATCH 14/17] 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(-) 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) From 4b0cb35b84011daa46cc60c4123562f431f179dc Mon Sep 17 00:00:00 2001 From: Jake Petroules Date: Fri, 10 Jun 2016 20:27:53 -0700 Subject: [PATCH 15/17] Fix installation of debug symbols on Apple platforms. This follows up ab599a39313c22fd14cc5466cea5c61bbcdbba8e, which did not take installation into account. Task-number: QTBUG-54036 Change-Id: Ic1b3acb8984255dd1ca1c288b7b150814ce9e606 Reviewed-by: Oswald Buddenhagen --- mkspecs/features/unix/separate_debug_info.prf | 23 +++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/mkspecs/features/unix/separate_debug_info.prf b/mkspecs/features/unix/separate_debug_info.prf index 460ad63e22..272cc8ef79 100644 --- a/mkspecs/features/unix/separate_debug_info.prf +++ b/mkspecs/features/unix/separate_debug_info.prf @@ -27,7 +27,12 @@ have_target:!static:if(darwin|!isEmpty(QMAKE_OBJCOPY)) { CONFIG += any_bundle } - debug_info_target_dir = $${debug_info_target}.$$debug_info_suffix/Contents/Resources/DWARF + debug_info_target_rel = $$section(debug_info_target, /, -1, -1) + + debug_info_target_dir_suffix = .$$debug_info_suffix/Contents/Resources/DWARF + + debug_info_target_dir = $${debug_info_target}$${debug_info_target_dir_suffix} + debug_info_target_dir_rel = $${debug_info_target_rel}$${debug_info_target_dir_suffix} !isEmpty(QMAKE_RESOLVED_BUNDLE): \ QMAKE_TARGET_DEBUG_INFO = $$debug_info_target_dir/$$TARGET else: \ @@ -52,8 +57,23 @@ have_target:!static:if(darwin|!isEmpty(QMAKE_OBJCOPY)) { debug_info_plist.output = $${debug_info_target}.$$debug_info_suffix/Contents/Info.plist QMAKE_SUBSTITUTES += debug_info_plist } + + contains(INSTALLS, target):isEmpty(target.files):isEmpty(target.commands):isEmpty(target.extra) { + !build_pass|release { + debug_info_plist_target.CONFIG += no_check_exist + debug_info_plist_target.files = $${debug_info_target}.$$debug_info_suffix/Contents/Info.plist + debug_info_plist_target.path += $${target.path}/$${debug_info_target_rel}.$$debug_info_suffix/Contents + INSTALLS += debug_info_plist_target + } + + debug_info_target.CONFIG += no_check_exist + debug_info_target.files = $$QMAKE_TARGET_DEBUG_INFO + debug_info_target.path += $${target.path}/$${debug_info_target_dir_rel} + INSTALLS += debug_info_target + } } else { QMAKE_TARGET_DEBUG_INFO = $${QMAKE_RESOLVED_TARGET}.$$debug_info_suffix + target.targets += $$QMAKE_TARGET_DEBUG_INFO } shell_target = $$shell_quote($$relative_path($$QMAKE_RESOLVED_TARGET, $$OUT_PWD)) @@ -72,6 +92,5 @@ have_target:!static:if(darwin|!isEmpty(QMAKE_OBJCOPY)) { } silent:QMAKE_POST_LINK = @echo creating $@.$$debug_info_suffix && $$QMAKE_POST_LINK - target.targets += $$QMAKE_TARGET_DEBUG_INFO QMAKE_DISTCLEAN += $$QMAKE_TARGET_DEBUG_INFO } From 0f4affc0b1e6625be16fda35dd15268c639a3b93 Mon Sep 17 00:00:00 2001 From: Liang Qi Date: Wed, 22 Jun 2016 22:05:47 +0200 Subject: [PATCH 16/17] 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(-) 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(); From f4be16e1f7828a0f6992ef2e20b9106177d7fc88 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 22 Jun 2016 11:31:36 -0700 Subject: [PATCH 17/17] 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(-) 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);