diff options
-rw-r--r-- | mkspecs/common/msvc-desktop.conf | 1 | ||||
-rw-r--r-- | mkspecs/common/winrt_winphone/qmake.conf | 1 | ||||
-rw-r--r-- | mkspecs/features/default_pre.prf | 6 | ||||
-rw-r--r-- | mkspecs/features/uic.prf | 2 | ||||
-rw-r--r-- | mkspecs/features/win32/windows_vulkan_sdk.prf | 5 | ||||
-rw-r--r-- | qmake/doc/src/qmake-manual.qdoc | 25 | ||||
-rw-r--r-- | qmake/generators/makefile.cpp | 10 | ||||
-rw-r--r-- | qmake/generators/makefile.h | 3 | ||||
-rw-r--r-- | qmake/generators/win32/msvc_nmake.cpp | 4 | ||||
-rw-r--r-- | qmake/generators/win32/msvc_objectmodel.cpp | 1 | ||||
-rw-r--r-- | qmake/generators/win32/msvc_vcproj.cpp | 3 | ||||
-rw-r--r-- | src/gui/configure.pri | 24 | ||||
-rw-r--r-- | src/gui/kernel/qhighdpiscaling.cpp | 4 | ||||
-rw-r--r-- | src/network/kernel/qnetworkproxy.cpp | 8 | ||||
-rw-r--r-- | src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp | 7 | ||||
-rw-r--r-- | src/plugins/platforms/wasm/qwasmscreen.cpp | 2 | ||||
-rw-r--r-- | src/plugins/platforms/windows/qwindowswindow.cpp | 6 | ||||
-rw-r--r-- | src/widgets/dialogs/qwizard.cpp | 10 |
18 files changed, 88 insertions, 34 deletions
diff --git a/mkspecs/common/msvc-desktop.conf b/mkspecs/common/msvc-desktop.conf index 0bb3e13337..f5d12f445b 100644 --- a/mkspecs/common/msvc-desktop.conf +++ b/mkspecs/common/msvc-desktop.conf @@ -19,6 +19,7 @@ CONFIG += flat debug_and_release debug_and_release_target precom # MSVC 2017 15.8+ fixed std::aligned_storage but compilation fails without # _ENABLE_EXTENDED_ALIGNED_STORAGE flag since the fix breaks binary compatibility. DEFINES += UNICODE _UNICODE WIN32 _ENABLE_EXTENDED_ALIGNED_STORAGE +DEFINES_RELEASE += NDEBUG QMAKE_COMPILER_DEFINES += _WIN32 contains(QMAKE_TARGET.arch, x86_64) { DEFINES += WIN64 diff --git a/mkspecs/common/winrt_winphone/qmake.conf b/mkspecs/common/winrt_winphone/qmake.conf index 03fb96f2c5..e683018a81 100644 --- a/mkspecs/common/winrt_winphone/qmake.conf +++ b/mkspecs/common/winrt_winphone/qmake.conf @@ -11,6 +11,7 @@ CONFIG = package_manifest $$CONFIG incremental flat precompile_ # MSVC 2017 15.8+ fixed std::aligned_storage but compilation fails without # _ENABLE_EXTENDED_ALIGNED_STORAGE flag since the fix breaks binary compatibility. DEFINES += UNICODE WIN32 QT_LARGEFILE_SUPPORT Q_BYTE_ORDER=Q_LITTLE_ENDIAN _ENABLE_EXTENDED_ALIGNED_STORAGE +DEFINES_RELEASE += NDEBUG QMAKE_COMPILER_DEFINES += _WIN32 DEPLOYMENT_PLUGIN += qwinrt diff --git a/mkspecs/features/default_pre.prf b/mkspecs/features/default_pre.prf index 1c24bf071a..b2629d04c0 100644 --- a/mkspecs/features/default_pre.prf +++ b/mkspecs/features/default_pre.prf @@ -26,4 +26,10 @@ CONFIG = \ unset(today) } +CONFIG(debug, debug|release) { + DEFINES += $$DEFINES_DEBUG +} else { + DEFINES += $$DEFINES_RELEASE +} + load(toolchain) diff --git a/mkspecs/features/uic.prf b/mkspecs/features/uic.prf index 1cedce5ae7..a5df0c7e8d 100644 --- a/mkspecs/features/uic.prf +++ b/mkspecs/features/uic.prf @@ -9,7 +9,7 @@ uic.depend_command = $$QMAKE_UIC_DEP -d ${QMAKE_FILE_IN} uic.output = $$UI_DIR/$${QMAKE_MOD_UIC}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_H)} uic.input = FORMS uic.variable_out = GENERATED_FILES -uic.CONFIG += no_link target_predeps dep_lines +uic.CONFIG += no_link target_predeps dep_lines dep_existing_only uic.name = UIC ${QMAKE_FILE_IN} silent:uic.commands = @echo uic ${QMAKE_FILE_IN} && $$uic.commands QMAKE_EXTRA_COMPILERS += uic diff --git a/mkspecs/features/win32/windows_vulkan_sdk.prf b/mkspecs/features/win32/windows_vulkan_sdk.prf index 2aebbd3b25..4dc0e50090 100644 --- a/mkspecs/features/win32/windows_vulkan_sdk.prf +++ b/mkspecs/features/win32/windows_vulkan_sdk.prf @@ -3,6 +3,11 @@ isEmpty(QMAKE_INCDIR_VULKAN) { # headers are found out-of-the-box on typical Windows setups. QMAKE_INCDIR_VULKAN = $$(VULKAN_SDK)/include + # Do not add default include paths as that can knock std headers + # out of their stride due to their usage of #include_next. + contains(QMAKE_DEFAULT_INCDIRS, $$QMAKE_INCDIR_VULKAN): \ + QMAKE_INCDIR_VULKAN = + # Do not export the include dir but resolve it on every qmake call. QMAKE_EXPORT_INCDIR_VULKAN = - } diff --git a/qmake/doc/src/qmake-manual.qdoc b/qmake/doc/src/qmake-manual.qdoc index 3495f97b2c..b178084690 100644 --- a/qmake/doc/src/qmake-manual.qdoc +++ b/qmake/doc/src/qmake-manual.qdoc @@ -1144,6 +1144,26 @@ \snippet code/doc_src_qmake-manual.pro 27 + \target DEFINES_DEBUG + \section1 DEFINES_DEBUG + + Specifies preprocessor defines for the debug configuration. The values of + this variable get added to \l{DEFINES} before the project is loaded. This + variable is typically set in \l{#QMAKESPEC}{qmake.conf} and rarely needs + to be modified. + + This variable was introduced in Qt 5.13.2. + + \target DEFINES_RELEASE + \section1 DEFINES_RELEASE + + Specifies preprocessor defines for the release configuration. The values of + this variable get added to \l{DEFINES} before the project is loaded. This + variable is typically set in \l{#QMAKESPEC}{qmake.conf} and rarely needs + to be modified. + + This variable was introduced in Qt 5.13.2. + \target DEF_FILE \section1 DEF_FILE @@ -4796,6 +4816,11 @@ \li The dependencies for the output only get generated from the depends member and from nowhere else. \row + \li dep_existing_only + \li Every dependency that is a result of .depend_command is checked for + existence. Non-existing dependencies are ignored. + This value was introduced in Qt 5.13.2. + \row \li dep_lines \li The output from the .depend_command is interpreted to be one file per line. The default is to split on whitespace and is maintained diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index 94e9259c68..c5868adf27 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -1856,7 +1856,8 @@ void MakefileGenerator::callExtraCompilerDependCommand(const ProString &extraCom const QString &inpf, const QString &tmp_out, bool dep_lines, - QStringList *deps) + QStringList *deps, + bool existingDepsOnly) { char buff[256]; QString dep_cmd = replaceExtraCompilerVariables(tmp_dep_cmd, inpf, tmp_out, LocalShell); @@ -1885,6 +1886,8 @@ void MakefileGenerator::callExtraCompilerDependCommand(const ProString &extraCom warn_msg(WarnDeprecated, ".depend_command for extra compiler %s" " prints paths relative to source directory", extraCompiler.toLatin1().constData()); + } else if (existingDepsOnly) { + file.clear(); } else { file = absFile; // fallback for generated resources } @@ -2013,6 +2016,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t) } t << Qt::endl; } + const bool existingDepsOnly = config.contains("dep_existing_only"); QStringList tmp_dep = project->values(ProKey(*it + ".depends")).toQStringList(); if (config.indexOf("combine") != -1) { if (tmp_out.contains(QRegExp("(^|[^$])\\$\\{QMAKE_(?!VAR_)"))) { @@ -2029,7 +2033,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t) inputs += Option::fixPathToTargetOS(inpf, false); if(!tmp_dep_cmd.isEmpty() && doDepends()) { callExtraCompilerDependCommand(*it, dep_cd_cmd, tmp_dep_cmd, inpf, - tmp_out, dep_lines, &deps); + tmp_out, dep_lines, &deps, existingDepsOnly); } } for(int i = 0; i < inputs.size(); ) { @@ -2078,7 +2082,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t) cmd.replace("$(" + (*it3) + ")", "$(QMAKE_COMP_" + (*it3)+")"); if(!tmp_dep_cmd.isEmpty() && doDepends()) { callExtraCompilerDependCommand(*it, dep_cd_cmd, tmp_dep_cmd, inpf, - tmp_out, dep_lines, &deps); + tmp_out, dep_lines, &deps, existingDepsOnly); //use the depend system to find includes of these included files QStringList inc_deps; for(int i = 0; i < deps.size(); ++i) { diff --git a/qmake/generators/makefile.h b/qmake/generators/makefile.h index 45250a6aa2..18c27a4385 100644 --- a/qmake/generators/makefile.h +++ b/qmake/generators/makefile.h @@ -86,7 +86,8 @@ protected: QString resolveDependency(const QDir &outDir, const QString &file); void callExtraCompilerDependCommand(const ProString &extraCompiler, const QString &dep_cd_cmd, const QString &tmp_dep_cmd, const QString &inpf, - const QString &tmp_out, bool dep_lines, QStringList *deps); + const QString &tmp_out, bool dep_lines, QStringList *deps, + bool existingDepsOnly); void writeExtraCompilerTargets(QTextStream &t); void writeExtraCompilerVariables(QTextStream &t); bool writeDummyMakefile(QTextStream &t); diff --git a/qmake/generators/win32/msvc_nmake.cpp b/qmake/generators/win32/msvc_nmake.cpp index 67b478ae28..2fb24201bd 100644 --- a/qmake/generators/win32/msvc_nmake.cpp +++ b/qmake/generators/win32/msvc_nmake.cpp @@ -272,10 +272,6 @@ void NmakeMakefileGenerator::init() if (project->isActiveConfig("debug")) { project->values("QMAKE_CLEAN").append(targetBase + ".ilk"); project->values("QMAKE_CLEAN").append(targetBase + ".idb"); - } else { - ProStringList &defines = project->values("DEFINES"); - if (!defines.contains("NDEBUG")) - defines.append("NDEBUG"); } if (project->values("QMAKE_APP_FLAG").isEmpty() && project->isActiveConfig("dll")) { diff --git a/qmake/generators/win32/msvc_objectmodel.cpp b/qmake/generators/win32/msvc_objectmodel.cpp index 8129bd76be..5396eba72e 100644 --- a/qmake/generators/win32/msvc_objectmodel.cpp +++ b/qmake/generators/win32/msvc_objectmodel.cpp @@ -2126,7 +2126,6 @@ VCResourceCompilerTool::VCResourceCompilerTool() ShowProgress(linkProgressNotSet), SuppressStartupBanner(unset) { - PreprocessorDefinitions = QStringList("NDEBUG"); } // VCDeploymentTool -------------------------------------------- diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp index b74448ce94..e45beca459 100644 --- a/qmake/generators/win32/msvc_vcproj.cpp +++ b/qmake/generators/win32/msvc_vcproj.cpp @@ -1050,9 +1050,6 @@ void VcprojGenerator::initConfiguration() initDeploymentTool(); initWinDeployQtTool(); initPreLinkEventTools(); - - if (!isDebug) - conf.compiler.PreprocessorDefinitions += "NDEBUG"; } void VcprojGenerator::initCompilerTool() diff --git a/src/gui/configure.pri b/src/gui/configure.pri index 1b95449a10..490ef0df28 100644 --- a/src/gui/configure.pri +++ b/src/gui/configure.pri @@ -1,18 +1,22 @@ # custom tests defineTest(qtConfLibrary_freetype) { - TRY_INCLUDEPATHS = $$EXTRA_INCLUDEPATH $$QMAKE_INCDIR_X11 - haiku: TRY_INCLUDEPATHS += /system/develop/headers - TRY_INCLUDEPATHS += $$QMAKE_DEFAULT_INCDIR - for (p, TRY_INCLUDEPATHS) { - includedir = $$p/freetype2 - exists($$includedir) { - $${1}.includedir = $$includedir - export($${1}.includedir) - return(true) + input = $$eval($${2}.alias) + isEmpty(config.input.$${input}.incdir) { + TRY_INCLUDEPATHS = $$EXTRA_INCLUDEPATH $$QMAKE_INCDIR_X11 + haiku: TRY_INCLUDEPATHS += /system/develop/headers + TRY_INCLUDEPATHS += $$QMAKE_DEFAULT_INCDIRS + for (p, TRY_INCLUDEPATHS) { + includedir = $$p/freetype2 + exists($$includedir) { + config.input.$${input}.incdir = $$includedir + export(config.input.$${input}.incdir) + break() + } } } - return(true) + qtConfLibrary_inline($$1, $$2): return(true) + return(false) } # Check for Direct X shader compiler 'fxc'. diff --git a/src/gui/kernel/qhighdpiscaling.cpp b/src/gui/kernel/qhighdpiscaling.cpp index ee54fd4fa1..76548d5d86 100644 --- a/src/gui/kernel/qhighdpiscaling.cpp +++ b/src/gui/kernel/qhighdpiscaling.cpp @@ -715,8 +715,10 @@ QHighDpiScaling::ScaleAndOrigin QHighDpiScaling::scaleAndOrigin(const QWindow *w { if (!m_active) return { qreal(1), QPoint() }; + QScreen *screen = window ? window->screen() : QGuiApplication::primaryScreen(); - return scaleAndOrigin(screen, nativePosition); + const bool searchScreen = !window || window->isTopLevel(); + return scaleAndOrigin(screen, searchScreen ? nativePosition : nullptr); } #endif //QT_NO_HIGHDPISCALING diff --git a/src/network/kernel/qnetworkproxy.cpp b/src/network/kernel/qnetworkproxy.cpp index 110550c423..a2a89ed94b 100644 --- a/src/network/kernel/qnetworkproxy.cpp +++ b/src/network/kernel/qnetworkproxy.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2019 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the QtNetwork module of the Qt Toolkit. @@ -493,8 +493,10 @@ template<> void QSharedDataPointer<QNetworkProxyPrivate>::detach() } /*! - Constructs a QNetworkProxy with DefaultProxy type; the proxy type is - determined by applicationProxy(), which defaults to NoProxy. + Constructs a QNetworkProxy with DefaultProxy type. + + The proxy type is determined by applicationProxy(), which defaults to + NoProxy or a system-wide proxy if one is configured. \sa setType(), setApplicationProxy() */ diff --git a/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp b/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp index a6e5c9b5ab..bf044229ff 100644 --- a/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp +++ b/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2019 The Qt Company Ltd. ** Copyright (C) 2016 Jolla Ltd, author: <gunnar.sletta@jollamobile.com> ** Contact: https://www.qt.io/licensing/ ** @@ -77,7 +77,7 @@ Q_LOGGING_CATEGORY(qLcEvdevTouch, "qt.qpa.input") #define ABS_MT_TOUCH_MAJOR 0x30 /* Major axis of touching ellipse */ #endif #ifndef ABS_MT_POSITION_X -#define ABS_MT_POSITION_X 0x35 /* Center X ellipse position */ +#define ABS_MT_POSITION_X 0x35 /* Center X ellipse position */ #endif #ifndef ABS_MT_POSITION_Y #define ABS_MT_POSITION_Y 0x36 /* Center Y ellipse position */ @@ -91,6 +91,9 @@ Q_LOGGING_CATEGORY(qLcEvdevTouch, "qt.qpa.input") #ifndef ABS_MT_TRACKING_ID #define ABS_MT_TRACKING_ID 0x39 /* Unique ID of initiated contact */ #endif +#ifndef ABS_MT_PRESSURE +#define ABS_MT_PRESSURE 0x3a +#endif #ifndef SYN_MT_REPORT #define SYN_MT_REPORT 2 #endif diff --git a/src/plugins/platforms/wasm/qwasmscreen.cpp b/src/plugins/platforms/wasm/qwasmscreen.cpp index f2eabfa486..e536bc0ee3 100644 --- a/src/plugins/platforms/wasm/qwasmscreen.cpp +++ b/src/plugins/platforms/wasm/qwasmscreen.cpp @@ -139,6 +139,8 @@ QPlatformCursor *QWasmScreen::cursor() const void QWasmScreen::resizeMaximizedWindows() { + if (!screen()) + return; QPlatformScreen::resizeMaximizedWindows(); } diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp index 5539a6903c..ffc8f5ed21 100644 --- a/src/plugins/platforms/windows/qwindowswindow.cpp +++ b/src/plugins/platforms/windows/qwindowswindow.cpp @@ -1937,8 +1937,10 @@ void QWindowsWindow::handleGeometryChange() { const QRect previousGeometry = m_data.geometry; m_data.geometry = geometry_sys(); - if (testFlag(WithinDpiChanged)) - return; // QGuiApplication will send resize + if (testFlag(WithinDpiChanged) + && QWindowsContext::instance()->screenManager().screenForHwnd(m_data.hwnd) != screen()) { + return; // QGuiApplication will send resize when screen actually changes + } QWindowSystemInterface::handleGeometryChange(window(), m_data.geometry); // QTBUG-32121: OpenGL/normal windows (with exception of ANGLE) do not receive // expose events when shrinking, synthesize. diff --git a/src/widgets/dialogs/qwizard.cpp b/src/widgets/dialogs/qwizard.cpp index 7558054da5..5752e218c2 100644 --- a/src/widgets/dialogs/qwizard.cpp +++ b/src/widgets/dialogs/qwizard.cpp @@ -3271,9 +3271,13 @@ bool QWizard::nativeEvent(const QByteArray &eventType, void *message, long *resu MSG *windowsMessage = static_cast<MSG *>(message); const bool winEventResult = d->vistaHelper->handleWinEvent(windowsMessage, result); if (QVistaHelper::vistaState() != d->vistaState) { - d->vistaState = QVistaHelper::vistaState(); - d->vistaStateChanged = true; - setWizardStyle(AeroStyle); + // QTBUG-78300: When Qt::AA_NativeWindows is set, delay further + // window creation until after the platform window creation events. + if (windowsMessage->message == WM_GETICON) { + d->vistaStateChanged = true; + d->vistaState = QVistaHelper::vistaState(); + setWizardStyle(AeroStyle); + } } return winEventResult; } else { |