Merge remote-tracking branch 'origin/5.12' into dev
Change-Id: Iad06d8c07dfc288c9d1a9f7ee3520285cea60546
This commit is contained in:
commit
4b04e47be9
32
mkspecs/common/msvc-based-version.conf
Normal file
32
mkspecs/common/msvc-based-version.conf
Normal file
@ -0,0 +1,32 @@
|
||||
#
|
||||
# qmake configuration for Compilers based on the Microsoft Visual Studio
|
||||
# C/C++ Compilers like win32-clang-msvc
|
||||
|
||||
#
|
||||
# Version-specific changes
|
||||
#
|
||||
|
||||
isEmpty(QMAKE_MSC_VER): error("msvc-based-version.conf loaded but QMAKE_MSC_VER isn't set")
|
||||
|
||||
MSVC_VER = 14.0
|
||||
COMPAT_MKSPEC = win32-msvc2015
|
||||
|
||||
# -utf-8 compiler option for Visual Studio 2015 Update 2
|
||||
greaterThan(QMAKE_MSC_FULL_VER, 190023918):!intel_icl {
|
||||
isEmpty(QT_CLANG_MAJOR_VERSION)|!lessThan(QT_CLANG_MAJOR_VERSION, 4) {
|
||||
QMAKE_CFLAGS_UTF8_SOURCE = -utf-8
|
||||
}
|
||||
}
|
||||
|
||||
greaterThan(QMAKE_MSC_VER, 1909) {
|
||||
# Visual Studio 2017 (15.0) / Visual C++ 19.10 and up
|
||||
MSVC_VER = 15.0
|
||||
COMPAT_MKSPEC = win32-msvc2017
|
||||
}
|
||||
|
||||
greaterThan(QMAKE_MSC_VER, 1910) {
|
||||
# No compat spec past MSVC 2017
|
||||
COMPAT_MKSPEC =
|
||||
}
|
||||
|
||||
!isEmpty(COMPAT_MKSPEC):!$$COMPAT_MKSPEC: CONFIG += $$COMPAT_MKSPEC
|
@ -1,7 +1,6 @@
|
||||
#
|
||||
# qmake configuration for Microsoft Visual Studio C/C++ Compiler
|
||||
# This file is used by win32-msvc, win32-clang-msvc, and all
|
||||
# winrt-XXX-msvcXXX specs
|
||||
# This file is used by win32-msvc and all winrt-XXX-msvcXXX specs
|
||||
#
|
||||
|
||||
#
|
||||
@ -70,11 +69,8 @@ greaterThan(QMAKE_MSC_VER, 1899) {
|
||||
QMAKE_CXXFLAGS += -Zc:strictStrings -Zc:throwingNew
|
||||
QMAKE_CXXFLAGS_WARN_ON += -w44456 -w44457 -w44458 -wd4577 -wd4467
|
||||
|
||||
greaterThan(QMAKE_MSC_FULL_VER, 190023918):!intel_icl {
|
||||
isEmpty(QT_CLANG_MAJOR_VERSION)|!lessThan(QT_CLANG_MAJOR_VERSION, 4) {
|
||||
QMAKE_CFLAGS_UTF8_SOURCE = -utf-8
|
||||
}
|
||||
}
|
||||
# -utf-8 compiler option for Visual Studio 2015 Update 2
|
||||
greaterThan(QMAKE_MSC_FULL_VER, 190023918): QMAKE_CFLAGS_UTF8_SOURCE = -utf-8
|
||||
}
|
||||
|
||||
greaterThan(QMAKE_MSC_VER, 1909) {
|
||||
|
@ -112,16 +112,17 @@ warnings_are_errors:warning_clean {
|
||||
QMAKE_CXXFLAGS_WARN_ON += -Werror -Wno-error=\\$${LITERAL_HASH}warnings -Wno-error=deprecated-declarations $$WERROR
|
||||
}
|
||||
} else:intel_icc:linux {
|
||||
# Intel CC 13.0 - 17.0, on Linux only
|
||||
# Intel CC 13.0 - 18.0, on Linux only
|
||||
ver = $${QT_ICC_MAJOR_VERSION}.$${QT_ICC_MINOR_VERSION}
|
||||
linux:contains(ver, "(1[3456]\\.|17\\.0)") {
|
||||
linux:contains(ver, "(1[345678]\\.|19\\.0)") {
|
||||
# 177: function "entity" was declared but never referenced
|
||||
# (too aggressive; ICC reports even for functions created due to template instantiation)
|
||||
# 1224: #warning directive
|
||||
# 1478: function "entity" (declared at line N) was declared deprecated
|
||||
# 1786: function "entity" (declared at line N of "file") was declared deprecated ("message")
|
||||
# 1881: argument must be a constant null pointer value
|
||||
# (NULL in C++ is usually a literal 0)
|
||||
QMAKE_CXXFLAGS_WARN_ON += -Werror -ww177,1224,1478,1881 $$WERROR
|
||||
QMAKE_CXXFLAGS_WARN_ON += -Werror -ww177,1224,1478,1786,1881 $$WERROR
|
||||
}
|
||||
} else:gcc:!clang:!intel_icc:!rim_qcc {
|
||||
# GCC 4.6-4.9, 5.x, ...
|
||||
|
@ -178,13 +178,16 @@ isEmpty($${target_prefix}.INCDIRS) {
|
||||
QMAKE_DEFAULT_INCDIRS = $$split(INCLUDE, $$QMAKE_DIRLIST_SEP)
|
||||
}
|
||||
|
||||
unix {
|
||||
unix:if(!cross_compile|host_build) {
|
||||
isEmpty(QMAKE_DEFAULT_INCDIRS): QMAKE_DEFAULT_INCDIRS = /usr/include /usr/local/include
|
||||
isEmpty(QMAKE_DEFAULT_LIBDIRS): QMAKE_DEFAULT_LIBDIRS = /lib /usr/lib
|
||||
}
|
||||
|
||||
cache($${target_prefix}.INCDIRS, set stash, QMAKE_DEFAULT_INCDIRS)
|
||||
cache($${target_prefix}.LIBDIRS, set stash, QMAKE_DEFAULT_LIBDIRS)
|
||||
# cache() complains about undefined variables and doesn't persist empty ones.
|
||||
!isEmpty(QMAKE_DEFAULT_INCDIRS): \
|
||||
cache($${target_prefix}.INCDIRS, set stash, QMAKE_DEFAULT_INCDIRS)
|
||||
!isEmpty(QMAKE_DEFAULT_LIBDIRS): \
|
||||
cache($${target_prefix}.LIBDIRS, set stash, QMAKE_DEFAULT_LIBDIRS)
|
||||
} else {
|
||||
QMAKE_DEFAULT_INCDIRS = $$eval($${target_prefix}.INCDIRS)
|
||||
QMAKE_DEFAULT_LIBDIRS = $$eval($${target_prefix}.LIBDIRS)
|
||||
@ -278,4 +281,8 @@ QMAKE_COMPILER_DEFINES += __cplusplus=$$QT_COMPILER_STDCXX
|
||||
QMAKE_CFLAGS += $$QMAKE_CFLAGS_MSVC_COMPAT
|
||||
QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_MSVC_COMPAT
|
||||
|
||||
msvc:!intel_icl:!clang_cl: include(../common/msvc-version.conf)
|
||||
clang_cl|intel_icl {
|
||||
include(../common/msvc-based-version.conf)
|
||||
} else: msvc {
|
||||
include(../common/msvc-version.conf)
|
||||
}
|
||||
|
@ -399,6 +399,8 @@ UnixMakefileGenerator::findLibraries(bool linkPrl, bool mergeLflags)
|
||||
libdirs.append(QMakeLocalFileName(dlib.toQString()));
|
||||
frameworkdirs.append(QMakeLocalFileName("/System/Library/Frameworks"));
|
||||
frameworkdirs.append(QMakeLocalFileName("/Library/Frameworks"));
|
||||
ProStringList extens;
|
||||
extens << project->first("QMAKE_EXTENSION_SHLIB") << "a";
|
||||
static const char * const lflags[] = { "LIBS", "LIBS_PRIVATE",
|
||||
"QMAKE_LIBS", "QMAKE_LIBS_PRIVATE", nullptr };
|
||||
for (int i = 0; lflags[i]; i++) {
|
||||
@ -417,8 +419,6 @@ UnixMakefileGenerator::findLibraries(bool linkPrl, bool mergeLflags)
|
||||
libdirs.insert(libidx++, f);
|
||||
} else if(opt.startsWith("-l")) {
|
||||
QString lib = opt.mid(2);
|
||||
ProStringList extens;
|
||||
extens << project->first("QMAKE_EXTENSION_SHLIB") << "a";
|
||||
for (QList<QMakeLocalFileName>::Iterator dep_it = libdirs.begin();
|
||||
dep_it != libdirs.end(); ++dep_it) {
|
||||
QString libBase = (*dep_it).local() + '/'
|
||||
@ -521,8 +521,18 @@ UnixMakefileGenerator::findLibraries(bool linkPrl, bool mergeLflags)
|
||||
lflags[arch].append(opt);
|
||||
}
|
||||
} else if(!opt.isNull()) {
|
||||
for (const ProString &ext : extens) {
|
||||
if (opt.size() > ext.size() && opt.endsWith(ext)
|
||||
&& opt.at(opt.size() - ext.size() - 1) == '.') {
|
||||
// Make sure we keep the dependency order of libraries
|
||||
lflags[arch].removeAll(opt);
|
||||
lflags[arch].append(opt);
|
||||
goto found2;
|
||||
}
|
||||
}
|
||||
if(!lflags[arch].contains(opt))
|
||||
lflags[arch].append(opt);
|
||||
found2: ;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -279,21 +279,23 @@ const TInputType &myMin(const TInputType &value1, const TInputType &value2)
|
||||
void myMessageOutput(QtMsgType type, const QMessageLogContext &context, const QString &msg)
|
||||
{
|
||||
QByteArray localMsg = msg.toLocal8Bit();
|
||||
const char *file = context.file ? context.file : "";
|
||||
const char *function = context.function ? context.function : "";
|
||||
switch (type) {
|
||||
case QtDebugMsg:
|
||||
fprintf(stderr, "Debug: %s (%s:%u, %s)\n", localMsg.constData(), context.file, context.line, context.function);
|
||||
fprintf(stderr, "Debug: %s (%s:%u, %s)\n", localMsg.constData(), file, context.line, function);
|
||||
break;
|
||||
case QtInfoMsg:
|
||||
fprintf(stderr, "Info: %s (%s:%u, %s)\n", localMsg.constData(), context.file, context.line, context.function);
|
||||
fprintf(stderr, "Info: %s (%s:%u, %s)\n", localMsg.constData(), file, context.line, function);
|
||||
break;
|
||||
case QtWarningMsg:
|
||||
fprintf(stderr, "Warning: %s (%s:%u, %s)\n", localMsg.constData(), context.file, context.line, context.function);
|
||||
fprintf(stderr, "Warning: %s (%s:%u, %s)\n", localMsg.constData(), file, context.line, function);
|
||||
break;
|
||||
case QtCriticalMsg:
|
||||
fprintf(stderr, "Critical: %s (%s:%u, %s)\n", localMsg.constData(), context.file, context.line, context.function);
|
||||
fprintf(stderr, "Critical: %s (%s:%u, %s)\n", localMsg.constData(), file, context.line, function);
|
||||
break;
|
||||
case QtFatalMsg:
|
||||
fprintf(stderr, "Fatal: %s (%s:%u, %s)\n", localMsg.constData(), context.file, context.line, context.function);
|
||||
fprintf(stderr, "Fatal: %s (%s:%u, %s)\n", localMsg.constData(), file, context.line, function);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -36,6 +36,7 @@
|
||||
#include <language.h>
|
||||
|
||||
#include <qtextstream.h>
|
||||
#include <qversionnumber.h>
|
||||
#include <qdebug.h>
|
||||
|
||||
#include <algorithm>
|
||||
@ -1747,6 +1748,13 @@ QString WriteInitialization::domColor2QString(const DomColor *c)
|
||||
.arg(c->elementBlue());
|
||||
}
|
||||
|
||||
static inline QVersionNumber colorRoleVersionAdded(const QString &roleName)
|
||||
{
|
||||
if (roleName == QLatin1String("PlaceholderText"))
|
||||
return QVersionNumber(5, 12, 0);
|
||||
return QVersionNumber();
|
||||
}
|
||||
|
||||
void WriteInitialization::writeColorGroup(DomColorGroup *colorGroup, const QString &group, const QString &paletteName)
|
||||
{
|
||||
if (!colorGroup)
|
||||
@ -1767,10 +1775,19 @@ void WriteInitialization::writeColorGroup(DomColorGroup *colorGroup, const QStri
|
||||
const auto &colorRoles = colorGroup->elementColorRole();
|
||||
for (const DomColorRole *colorRole : colorRoles) {
|
||||
if (colorRole->hasAttributeRole()) {
|
||||
const QString roleName = colorRole->attributeRole();
|
||||
const QVersionNumber versionAdded = colorRoleVersionAdded(roleName);
|
||||
const QString brushName = writeBrushInitialization(colorRole->elementBrush());
|
||||
if (!versionAdded.isNull()) {
|
||||
m_output << "#if QT_VERSION >= QT_VERSION_CHECK("
|
||||
<< versionAdded.majorVersion() << ", " << versionAdded.minorVersion()
|
||||
<< ", " << versionAdded.microVersion() << ")\n";
|
||||
}
|
||||
m_output << m_indent << paletteName << ".setBrush(" << group
|
||||
<< ", " << "QPalette::" << colorRole->attributeRole()
|
||||
<< ", " << "QPalette::" << roleName
|
||||
<< ", " << brushName << ");\n";
|
||||
if (!versionAdded.isNull())
|
||||
m_output << "#endif\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -829,7 +829,6 @@ void QAbstractSlider::keyPressEvent(QKeyEvent *ev)
|
||||
break;
|
||||
#endif
|
||||
|
||||
// It seems we need to use invertedAppearance for Left and right, otherwise, things look weird.
|
||||
case Qt::Key_Left:
|
||||
#ifdef QT_KEYPAD_NAVIGATION
|
||||
// In QApplication::KeypadNavigationDirectional, we want to change the slider
|
||||
@ -848,9 +847,9 @@ void QAbstractSlider::keyPressEvent(QKeyEvent *ev)
|
||||
else
|
||||
#endif
|
||||
if (isRightToLeft())
|
||||
action = d->invertedAppearance ? SliderSingleStepSub : SliderSingleStepAdd;
|
||||
action = d->invertedControls ? SliderSingleStepSub : SliderSingleStepAdd;
|
||||
else
|
||||
action = !d->invertedAppearance ? SliderSingleStepSub : SliderSingleStepAdd;
|
||||
action = !d->invertedControls ? SliderSingleStepSub : SliderSingleStepAdd;
|
||||
break;
|
||||
case Qt::Key_Right:
|
||||
#ifdef QT_KEYPAD_NAVIGATION
|
||||
@ -868,9 +867,9 @@ void QAbstractSlider::keyPressEvent(QKeyEvent *ev)
|
||||
else
|
||||
#endif
|
||||
if (isRightToLeft())
|
||||
action = d->invertedAppearance ? SliderSingleStepAdd : SliderSingleStepSub;
|
||||
action = d->invertedControls ? SliderSingleStepAdd : SliderSingleStepSub;
|
||||
else
|
||||
action = !d->invertedAppearance ? SliderSingleStepAdd : SliderSingleStepSub;
|
||||
action = !d->invertedControls ? SliderSingleStepAdd : SliderSingleStepSub;
|
||||
break;
|
||||
case Qt::Key_Up:
|
||||
#ifdef QT_KEYPAD_NAVIGATION
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user