Merge "Merge remote-tracking branch 'origin/5.14' into 5.15"

This commit is contained in:
Qt Forward Merge Bot 2019-09-21 01:00:45 +02:00
commit 0a70723a96
18 changed files with 88 additions and 34 deletions

View File

@ -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 # MSVC 2017 15.8+ fixed std::aligned_storage but compilation fails without
# _ENABLE_EXTENDED_ALIGNED_STORAGE flag since the fix breaks binary compatibility. # _ENABLE_EXTENDED_ALIGNED_STORAGE flag since the fix breaks binary compatibility.
DEFINES += UNICODE _UNICODE WIN32 _ENABLE_EXTENDED_ALIGNED_STORAGE DEFINES += UNICODE _UNICODE WIN32 _ENABLE_EXTENDED_ALIGNED_STORAGE
DEFINES_RELEASE += NDEBUG
QMAKE_COMPILER_DEFINES += _WIN32 QMAKE_COMPILER_DEFINES += _WIN32
contains(QMAKE_TARGET.arch, x86_64) { contains(QMAKE_TARGET.arch, x86_64) {
DEFINES += WIN64 DEFINES += WIN64

View File

@ -11,6 +11,7 @@ CONFIG = package_manifest $$CONFIG incremental flat precompile_
# MSVC 2017 15.8+ fixed std::aligned_storage but compilation fails without # MSVC 2017 15.8+ fixed std::aligned_storage but compilation fails without
# _ENABLE_EXTENDED_ALIGNED_STORAGE flag since the fix breaks binary compatibility. # _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 += UNICODE WIN32 QT_LARGEFILE_SUPPORT Q_BYTE_ORDER=Q_LITTLE_ENDIAN _ENABLE_EXTENDED_ALIGNED_STORAGE
DEFINES_RELEASE += NDEBUG
QMAKE_COMPILER_DEFINES += _WIN32 QMAKE_COMPILER_DEFINES += _WIN32
DEPLOYMENT_PLUGIN += qwinrt DEPLOYMENT_PLUGIN += qwinrt

View File

@ -26,4 +26,10 @@ CONFIG = \
unset(today) unset(today)
} }
CONFIG(debug, debug|release) {
DEFINES += $$DEFINES_DEBUG
} else {
DEFINES += $$DEFINES_RELEASE
}
load(toolchain) load(toolchain)

View File

@ -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.output = $$UI_DIR/$${QMAKE_MOD_UIC}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_H)}
uic.input = FORMS uic.input = FORMS
uic.variable_out = GENERATED_FILES 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} uic.name = UIC ${QMAKE_FILE_IN}
silent:uic.commands = @echo uic ${QMAKE_FILE_IN} && $$uic.commands silent:uic.commands = @echo uic ${QMAKE_FILE_IN} && $$uic.commands
QMAKE_EXTRA_COMPILERS += uic QMAKE_EXTRA_COMPILERS += uic

View File

@ -3,6 +3,11 @@ isEmpty(QMAKE_INCDIR_VULKAN) {
# headers are found out-of-the-box on typical Windows setups. # headers are found out-of-the-box on typical Windows setups.
QMAKE_INCDIR_VULKAN = $$(VULKAN_SDK)/include 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. # Do not export the include dir but resolve it on every qmake call.
QMAKE_EXPORT_INCDIR_VULKAN = - QMAKE_EXPORT_INCDIR_VULKAN = -
} }

View File

@ -1144,6 +1144,26 @@
\snippet code/doc_src_qmake-manual.pro 27 \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 \target DEF_FILE
\section1 DEF_FILE \section1 DEF_FILE
@ -4795,6 +4815,11 @@
\li explicit_dependencies \li explicit_dependencies
\li The dependencies for the output only get generated from the depends \li The dependencies for the output only get generated from the depends
member and from nowhere else. 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 \row
\li dep_lines \li dep_lines
\li The output from the .depend_command is interpreted to be one file \li The output from the .depend_command is interpreted to be one file

View File

@ -1856,7 +1856,8 @@ void MakefileGenerator::callExtraCompilerDependCommand(const ProString &extraCom
const QString &inpf, const QString &inpf,
const QString &tmp_out, const QString &tmp_out,
bool dep_lines, bool dep_lines,
QStringList *deps) QStringList *deps,
bool existingDepsOnly)
{ {
char buff[256]; char buff[256];
QString dep_cmd = replaceExtraCompilerVariables(tmp_dep_cmd, inpf, tmp_out, LocalShell); 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" warn_msg(WarnDeprecated, ".depend_command for extra compiler %s"
" prints paths relative to source directory", " prints paths relative to source directory",
extraCompiler.toLatin1().constData()); extraCompiler.toLatin1().constData());
} else if (existingDepsOnly) {
file.clear();
} else { } else {
file = absFile; // fallback for generated resources file = absFile; // fallback for generated resources
} }
@ -2013,6 +2016,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
} }
t << Qt::endl; t << Qt::endl;
} }
const bool existingDepsOnly = config.contains("dep_existing_only");
QStringList tmp_dep = project->values(ProKey(*it + ".depends")).toQStringList(); QStringList tmp_dep = project->values(ProKey(*it + ".depends")).toQStringList();
if (config.indexOf("combine") != -1) { if (config.indexOf("combine") != -1) {
if (tmp_out.contains(QRegExp("(^|[^$])\\$\\{QMAKE_(?!VAR_)"))) { if (tmp_out.contains(QRegExp("(^|[^$])\\$\\{QMAKE_(?!VAR_)"))) {
@ -2029,7 +2033,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
inputs += Option::fixPathToTargetOS(inpf, false); inputs += Option::fixPathToTargetOS(inpf, false);
if(!tmp_dep_cmd.isEmpty() && doDepends()) { if(!tmp_dep_cmd.isEmpty() && doDepends()) {
callExtraCompilerDependCommand(*it, dep_cd_cmd, tmp_dep_cmd, inpf, 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(); ) { for(int i = 0; i < inputs.size(); ) {
@ -2078,7 +2082,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
cmd.replace("$(" + (*it3) + ")", "$(QMAKE_COMP_" + (*it3)+")"); cmd.replace("$(" + (*it3) + ")", "$(QMAKE_COMP_" + (*it3)+")");
if(!tmp_dep_cmd.isEmpty() && doDepends()) { if(!tmp_dep_cmd.isEmpty() && doDepends()) {
callExtraCompilerDependCommand(*it, dep_cd_cmd, tmp_dep_cmd, inpf, 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 //use the depend system to find includes of these included files
QStringList inc_deps; QStringList inc_deps;
for(int i = 0; i < deps.size(); ++i) { for(int i = 0; i < deps.size(); ++i) {

View File

@ -86,7 +86,8 @@ protected:
QString resolveDependency(const QDir &outDir, const QString &file); QString resolveDependency(const QDir &outDir, const QString &file);
void callExtraCompilerDependCommand(const ProString &extraCompiler, const QString &dep_cd_cmd, void callExtraCompilerDependCommand(const ProString &extraCompiler, const QString &dep_cd_cmd,
const QString &tmp_dep_cmd, const QString &inpf, 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 writeExtraCompilerTargets(QTextStream &t);
void writeExtraCompilerVariables(QTextStream &t); void writeExtraCompilerVariables(QTextStream &t);
bool writeDummyMakefile(QTextStream &t); bool writeDummyMakefile(QTextStream &t);

View File

@ -272,10 +272,6 @@ void NmakeMakefileGenerator::init()
if (project->isActiveConfig("debug")) { if (project->isActiveConfig("debug")) {
project->values("QMAKE_CLEAN").append(targetBase + ".ilk"); project->values("QMAKE_CLEAN").append(targetBase + ".ilk");
project->values("QMAKE_CLEAN").append(targetBase + ".idb"); 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")) { if (project->values("QMAKE_APP_FLAG").isEmpty() && project->isActiveConfig("dll")) {

View File

@ -2126,7 +2126,6 @@ VCResourceCompilerTool::VCResourceCompilerTool()
ShowProgress(linkProgressNotSet), ShowProgress(linkProgressNotSet),
SuppressStartupBanner(unset) SuppressStartupBanner(unset)
{ {
PreprocessorDefinitions = QStringList("NDEBUG");
} }
// VCDeploymentTool -------------------------------------------- // VCDeploymentTool --------------------------------------------

View File

@ -1050,9 +1050,6 @@ void VcprojGenerator::initConfiguration()
initDeploymentTool(); initDeploymentTool();
initWinDeployQtTool(); initWinDeployQtTool();
initPreLinkEventTools(); initPreLinkEventTools();
if (!isDebug)
conf.compiler.PreprocessorDefinitions += "NDEBUG";
} }
void VcprojGenerator::initCompilerTool() void VcprojGenerator::initCompilerTool()

View File

@ -1,18 +1,22 @@
# custom tests # custom tests
defineTest(qtConfLibrary_freetype) { defineTest(qtConfLibrary_freetype) {
input = $$eval($${2}.alias)
isEmpty(config.input.$${input}.incdir) {
TRY_INCLUDEPATHS = $$EXTRA_INCLUDEPATH $$QMAKE_INCDIR_X11 TRY_INCLUDEPATHS = $$EXTRA_INCLUDEPATH $$QMAKE_INCDIR_X11
haiku: TRY_INCLUDEPATHS += /system/develop/headers haiku: TRY_INCLUDEPATHS += /system/develop/headers
TRY_INCLUDEPATHS += $$QMAKE_DEFAULT_INCDIR TRY_INCLUDEPATHS += $$QMAKE_DEFAULT_INCDIRS
for (p, TRY_INCLUDEPATHS) { for (p, TRY_INCLUDEPATHS) {
includedir = $$p/freetype2 includedir = $$p/freetype2
exists($$includedir) { exists($$includedir) {
$${1}.includedir = $$includedir config.input.$${input}.incdir = $$includedir
export($${1}.includedir) export(config.input.$${input}.incdir)
return(true) break()
} }
} }
return(true) }
qtConfLibrary_inline($$1, $$2): return(true)
return(false)
} }
# Check for Direct X shader compiler 'fxc'. # Check for Direct X shader compiler 'fxc'.

View File

@ -715,8 +715,10 @@ QHighDpiScaling::ScaleAndOrigin QHighDpiScaling::scaleAndOrigin(const QWindow *w
{ {
if (!m_active) if (!m_active)
return { qreal(1), QPoint() }; return { qreal(1), QPoint() };
QScreen *screen = window ? window->screen() : QGuiApplication::primaryScreen(); 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 #endif //QT_NO_HIGHDPISCALING

View File

@ -1,6 +1,6 @@
/**************************************************************************** /****************************************************************************
** **
** Copyright (C) 2016 The Qt Company Ltd. ** Copyright (C) 2019 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/ ** Contact: https://www.qt.io/licensing/
** **
** This file is part of the QtNetwork module of the Qt Toolkit. ** 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 Constructs a QNetworkProxy with DefaultProxy type.
determined by applicationProxy(), which defaults to NoProxy.
The proxy type is determined by applicationProxy(), which defaults to
NoProxy or a system-wide proxy if one is configured.
\sa setType(), setApplicationProxy() \sa setType(), setApplicationProxy()
*/ */

View File

@ -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> ** Copyright (C) 2016 Jolla Ltd, author: <gunnar.sletta@jollamobile.com>
** Contact: https://www.qt.io/licensing/ ** Contact: https://www.qt.io/licensing/
** **
@ -91,6 +91,9 @@ Q_LOGGING_CATEGORY(qLcEvdevTouch, "qt.qpa.input")
#ifndef ABS_MT_TRACKING_ID #ifndef ABS_MT_TRACKING_ID
#define ABS_MT_TRACKING_ID 0x39 /* Unique ID of initiated contact */ #define ABS_MT_TRACKING_ID 0x39 /* Unique ID of initiated contact */
#endif #endif
#ifndef ABS_MT_PRESSURE
#define ABS_MT_PRESSURE 0x3a
#endif
#ifndef SYN_MT_REPORT #ifndef SYN_MT_REPORT
#define SYN_MT_REPORT 2 #define SYN_MT_REPORT 2
#endif #endif

View File

@ -139,6 +139,8 @@ QPlatformCursor *QWasmScreen::cursor() const
void QWasmScreen::resizeMaximizedWindows() void QWasmScreen::resizeMaximizedWindows()
{ {
if (!screen())
return;
QPlatformScreen::resizeMaximizedWindows(); QPlatformScreen::resizeMaximizedWindows();
} }

View File

@ -1937,8 +1937,10 @@ void QWindowsWindow::handleGeometryChange()
{ {
const QRect previousGeometry = m_data.geometry; const QRect previousGeometry = m_data.geometry;
m_data.geometry = geometry_sys(); m_data.geometry = geometry_sys();
if (testFlag(WithinDpiChanged)) if (testFlag(WithinDpiChanged)
return; // QGuiApplication will send resize && QWindowsContext::instance()->screenManager().screenForHwnd(m_data.hwnd) != screen()) {
return; // QGuiApplication will send resize when screen actually changes
}
QWindowSystemInterface::handleGeometryChange(window(), m_data.geometry); QWindowSystemInterface::handleGeometryChange(window(), m_data.geometry);
// QTBUG-32121: OpenGL/normal windows (with exception of ANGLE) do not receive // QTBUG-32121: OpenGL/normal windows (with exception of ANGLE) do not receive
// expose events when shrinking, synthesize. // expose events when shrinking, synthesize.

View File

@ -3271,10 +3271,14 @@ bool QWizard::nativeEvent(const QByteArray &eventType, void *message, long *resu
MSG *windowsMessage = static_cast<MSG *>(message); MSG *windowsMessage = static_cast<MSG *>(message);
const bool winEventResult = d->vistaHelper->handleWinEvent(windowsMessage, result); const bool winEventResult = d->vistaHelper->handleWinEvent(windowsMessage, result);
if (QVistaHelper::vistaState() != d->vistaState) { if (QVistaHelper::vistaState() != d->vistaState) {
d->vistaState = QVistaHelper::vistaState(); // 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->vistaStateChanged = true;
d->vistaState = QVistaHelper::vistaState();
setWizardStyle(AeroStyle); setWizardStyle(AeroStyle);
} }
}
return winEventResult; return winEventResult;
} else { } else {
return QDialog::nativeEvent(eventType, message, result); return QDialog::nativeEvent(eventType, message, result);