Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/5.13' into 5.14
Browse files Browse the repository at this point in the history
 Conflicts:
	src/corelib/codecs/qicucodec.cpp
	src/dbus/qdbusserver.cpp
	src/gui/painting/qbezier.cpp
	src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp
	src/plugins/printsupport/cups/qppdprintdevice.cpp

Change-Id: I2703128bb64baf5580fbc2c2061b55b0f0611d2a
  • Loading branch information
liangqi committed Sep 4, 2019
2 parents 18088d4 + db57af5 commit 6a36fe9
Show file tree
Hide file tree
Showing 53 changed files with 556 additions and 398 deletions.
1 change: 1 addition & 0 deletions config_help.txt
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ Gui, printing, widget options:
es2 (default on Windows), desktop (default on Unix),
dynamic (Windows only)
-opengles3 ........... Enable OpenGL ES 3.x support instead of ES 2.x [auto]
-egl ................. Enable EGL support [auto]
-angle ............... Use bundled ANGLE to support OpenGL ES 2.0 [auto]
(Windows only)
-combined-angle-lib .. Merge LibEGL and LibGLESv2 into LibANGLE (Windows only)
Expand Down
3 changes: 0 additions & 3 deletions configure.pri
Original file line number Diff line number Diff line change
Expand Up @@ -843,9 +843,6 @@ defineTest(qtConfOutput_preparePaths) {
addConfStr($$[QMAKE_SPEC])
$${currentConfig}.output.qconfigSource = \
"/* Installation date */" \
"static const char qt_configure_installation [12+11] = \"qt_instdate=2012-12-20\";" \
"" \
"/* Installation Info */" \
"static const char qt_configure_prefix_path_str [12+256] = \"qt_prfxpath=$$config.input.prefix\";" \
"$${LITERAL_HASH}ifdef QT_BUILD_QMAKE" \
Expand Down
2 changes: 1 addition & 1 deletion mkspecs/features/mac/default_post.prf
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ xcode_product_bundle_identifier_setting.value = "$${xcode_product_bundle_identif
QMAKE_MAC_XCODE_SETTINGS += xcode_product_bundle_identifier_setting

!macx-xcode {
generate_xcode_project.commands = @$(QMAKE) -spec macx-xcode $(EXPORT__PRO_FILE_) $$QMAKE_ARGS
generate_xcode_project.commands = @$(QMAKE) -spec macx-xcode \"$(EXPORT__PRO_FILE_)\" $$QMAKE_ARGS
generate_xcode_project.target = xcodeproj
QMAKE_EXTRA_VARIABLES += _PRO_FILE_
QMAKE_EXTRA_TARGETS += generate_xcode_project
Expand Down
6 changes: 5 additions & 1 deletion mkspecs/features/uikit/gc_binaries.prf
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
# bitcode (release mode) is incompatible with splitting sections.
!bitcode|!release: load(gc_binaries)
# We have to explicitly exclude Xcode, as that supports both debug
# and release builds in the same project. Xcode already has a settting
# for dead code stripping which is enabled by default, so we'll still
# strip any libraries build with split sections.
!bitcode|if(!macx-xcode:!release): load(gc_binaries)
24 changes: 14 additions & 10 deletions mkspecs/features/wasm/wasm.prf
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,6 @@ exists($$QMAKE_QT_CONFIG) {
qtConfig(thread) {

EMCC_THREAD_LFLAGS += -s USE_PTHREADS=1
# Hardcode wasm memory size. Emscripten does not currently support memory growth
# (ALLOW_MEMORY_GROWTH) in pthreads mode, and requires specifying the memory size
# at build time. Further, browsers limit the maximum initial memory size to 1GB.
TOTAL_MEMORY = 1GB
!isEmpty(QMAKE_WASM_TOTAL_MEMORY) {
TOTAL_MEMORY = $$QMAKE_WASM_TOTAL_MEMORY
}

message("Setting TOTAL_MEMORY to" $$TOTAL_MEMORY)
EMCC_THREAD_LFLAGS += -s TOTAL_MEMORY=$$TOTAL_MEMORY

# Create worker threads at startup. This is supposed to be an optimization,
# however exceeding the pool size has been obesverved to hang the application.
Expand All @@ -29,6 +19,20 @@ exists($$QMAKE_QT_CONFIG) {
} else {
EMCC_THREAD_LFLAGS += -s ALLOW_MEMORY_GROWTH=1
}

qtConfig(thread) | !isEmpty(QMAKE_WASM_TOTAL_MEMORY) {

# Hardcode wasm memory size. Emscripten does not currently support memory growth
# (ALLOW_MEMORY_GROWTH) in pthreads mode, and requires specifying the memory size
# at build time. Further, browsers limit the maximum initial memory size to 1GB.
# QMAKE_WASM_TOTAL_MEMORY must be a multiple of 64KB
TOTAL_MEMORY = 1GB
!isEmpty(QMAKE_WASM_TOTAL_MEMORY) {
TOTAL_MEMORY = $$QMAKE_WASM_TOTAL_MEMORY
}
message("Setting TOTAL_MEMORY to" $$TOTAL_MEMORY)
EMCC_THREAD_LFLAGS += -s TOTAL_MEMORY=$$TOTAL_MEMORY
}
QMAKE_LFLAGS += $$EMCC_THREAD_LFLAGS
QMAKE_LFLAGS_DEBUG += $$EMCC_THREAD_LFLAGS
QMAKE_CFLAGS += $$EMCC_THREAD_LFLAGS
Expand Down
2 changes: 1 addition & 1 deletion qmake/generators/projectgenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

QT_BEGIN_NAMESPACE

QString project_builtin_regx() //calculate the builtin regular expression..
static QString project_builtin_regx() //calculate the builtin regular expression..
{
QString ret;
QStringList builtin_exts;
Expand Down
15 changes: 3 additions & 12 deletions qmake/generators/win32/msvc_objectmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1568,21 +1568,12 @@ bool VCLinkerTool::parseOption(const char* option)
const char* str = option+6;
if (*str == 'S')
ShowProgress = linkProgressAll;
#ifndef Q_OS_WIN
else if (strncasecmp(str, "pginstrument", 12))
else if (qstricmp(str, "pginstrument") == 0)
LinkTimeCodeGeneration = optLTCGInstrument;
else if (strncasecmp(str, "pgoptimize", 10))
else if (qstricmp(str, "pgoptimize") == 0)
LinkTimeCodeGeneration = optLTCGOptimize;
else if (strncasecmp(str, "pgupdate", 8 ))
else if (qstricmp(str, "pgupdate") == 0)
LinkTimeCodeGeneration = optLTCGUpdate;
#else
else if (_stricmp(str, "pginstrument"))
LinkTimeCodeGeneration = optLTCGInstrument;
else if (_stricmp(str, "pgoptimize"))
LinkTimeCodeGeneration = optLTCGOptimize;
else if (_stricmp(str, "pgupdate"))
LinkTimeCodeGeneration = optLTCGUpdate;
#endif
}
} else {
AdditionalOptions.append(option);
Expand Down
42 changes: 36 additions & 6 deletions qmake/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,39 @@ static int doLink(int argc, char **argv)

#endif

static bool setFilePermissions(QFile &file, QFileDevice::Permissions permissions)
{
if (file.setPermissions(permissions))
return true;
fprintf(stderr, "Error setting permissions on %s: %s\n",
qPrintable(file.fileName()), qPrintable(file.errorString()));
return false;
}

static bool copyFileTimes(QFile &targetFile, const QString &sourceFilePath,
bool mustEnsureWritability, QString *errorString)
{
#ifdef Q_OS_WIN
bool mustRestorePermissions = false;
QFileDevice::Permissions targetPermissions;
if (mustEnsureWritability) {
targetPermissions = targetFile.permissions();
if (!targetPermissions.testFlag(QFileDevice::WriteUser)) {
mustRestorePermissions = true;
if (!setFilePermissions(targetFile, targetPermissions | QFileDevice::WriteUser))
return false;
}
}
#endif
if (!IoUtils::touchFile(targetFile.fileName(), sourceFilePath, errorString))
return false;
#ifdef Q_OS_WIN
if (mustRestorePermissions && !setFilePermissions(targetFile, targetPermissions))
return false;
#endif
return true;
}

static int installFile(const QString &source, const QString &target, bool exe = false,
bool preservePermissions = false)
{
Expand Down Expand Up @@ -270,18 +303,15 @@ static int installFile(const QString &source, const QString &target, bool exe =
targetPermissions |= QFileDevice::ExeOwner | QFileDevice::ExeUser |
QFileDevice::ExeGroup | QFileDevice::ExeOther;
}
if (!targetFile.setPermissions(targetPermissions)) {
fprintf(stderr, "Error setting permissions on %s: %s\n",
qPrintable(target), qPrintable(targetFile.errorString()));
if (!setFilePermissions(targetFile, targetPermissions))
return 3;
}

// Copy file times
QString error;
if (!IoUtils::touchFile(target, sourceFile.fileName(), &error)) {
if (!copyFileTimes(targetFile, sourceFile.fileName(), preservePermissions, &error)) {
fprintf(stderr, "%s", qPrintable(error));
return 3;
}

return 0;
}

Expand Down
9 changes: 4 additions & 5 deletions qmake/option.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ static QString detectProjectFile(const QString &path)
return ret;
}

QString project_builtin_regx();
bool usage(const char *a0)
{
fprintf(stdout, "Usage: %s [mode] [options] [files]\n"
Expand All @@ -133,9 +132,9 @@ bool usage(const char *a0)
"\n"
"Mode:\n"
" -project Put qmake into project file generation mode%s\n"
" In this mode qmake interprets files as files to\n"
" be built,\n"
" defaults to %s\n"
" In this mode qmake interprets [files] as files to\n"
" be added to the .pro file. By default, all files with\n"
" known source extensions are added.\n"
" Note: The created .pro file probably will \n"
" need to be edited. For example add the QT variable to \n"
" specify what modules are required.\n"
Expand Down Expand Up @@ -183,7 +182,7 @@ bool usage(const char *a0)
" -nomoc Don't generate moc targets [makefile mode only]\n"
" -nopwd Don't look for files in pwd [project mode only]\n"
,a0,
default_mode(a0) == Option::QMAKE_GENERATE_PROJECT ? " (default)" : "", project_builtin_regx().toLatin1().constData(),
default_mode(a0) == Option::QMAKE_GENERATE_PROJECT ? " (default)" : "",
default_mode(a0) == Option::QMAKE_GENERATE_MAKEFILE ? " (default)" : ""
);
return false;
Expand Down
9 changes: 5 additions & 4 deletions src/corelib/codecs/qicucodec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,17 @@
#include "qtextcodec_p.h"
#include "qutfcodec_p.h"
#include "qlatincodec_p.h"
#if QT_CONFIG(codecs)
#include "qtsciicodec_p.h"
#include "qisciicodec_p.h"
#endif
#include "qsimplecodec_p.h"
#include "private/qcoreglobaldata_p.h"
#include "qdebug.h"

#include "unicode/ucnv.h"

#if QT_CONFIG(codecs)
#include "qtsciicodec_p.h"
#include "qisciicodec_p.h"
#endif

QT_BEGIN_NAMESPACE

typedef QList<QTextCodec*>::ConstIterator TextCodecListConstIt;
Expand Down
2 changes: 1 addition & 1 deletion src/corelib/configure.json
Original file line number Diff line number Diff line change
Expand Up @@ -884,7 +884,7 @@
},
"datestring": {
"label": "QDate/QTime/QDateTime",
"purpose": "Provides convertion between dates and strings.",
"purpose": "Provides conversion between dates and strings.",
"section": "Data structures",
"condition": "features.textdate",
"output": [ "publicFeature", "feature" ]
Expand Down
2 changes: 1 addition & 1 deletion src/corelib/global/qlibraryinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ QLibraryInfo::licensedProducts()
QDate
QLibraryInfo::buildDate()
{
return QDate::fromString(QString::fromLatin1(qt_configure_installation + 12), Qt::ISODate);
return QDate::fromString(QString::fromLatin1("2012-12-20"), Qt::ISODate);
}
#endif
#endif // datestring
Expand Down
4 changes: 3 additions & 1 deletion src/corelib/global/qlogging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1910,12 +1910,14 @@ void qErrnoWarning(const char *msg, ...)
{
// qt_error_string() will allocate anyway, so we don't have
// to be careful here (like we do in plain qWarning())
QString error_string = qt_error_string(-1); // before vasprintf changes errno/GetLastError()

va_list ap;
va_start(ap, msg);
QString buf = QString::vasprintf(msg, ap);
va_end(ap);

buf += QLatin1String(" (") + qt_error_string(-1) + QLatin1Char(')');
buf += QLatin1String(" (") + error_string + QLatin1Char(')');
QMessageLogContext context;
qt_message_output(QtCriticalMsg, context, buf);
}
Expand Down
Loading

0 comments on commit 6a36fe9

Please sign in to comment.