Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/5.12' into 5.13
Browse files Browse the repository at this point in the history
 Conflicts:
	src/gui/kernel/qplatformintegration.cpp
	src/gui/kernel/qplatformintegration.h
	src/plugins/platforms/wasm/qwasmintegration.cpp
	src/plugins/platforms/xcb/qxcbconnection_screens.cpp

Change-Id: I15063d42e9a1e226d9d2d2d372f75141b84c5c1b
  • Loading branch information
Qt Forward Merge Bot authored and torarnv committed Mar 20, 2019
2 parents 3ca05b2 + 2bafd99 commit 6893919
Show file tree
Hide file tree
Showing 81 changed files with 1,321 additions and 359 deletions.
105 changes: 105 additions & 0 deletions dist/changes-5.12.2
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
Qt 5.12.2 is a bug-fix release. It maintains both forward and backward
compatibility (source and binary) with Qt 5.12.0 through 5.12.1.

For more details, refer to the online documentation included in this
distribution. The documentation is also available online:

https://doc.qt.io/qt-5/index.html

The Qt version 5.12 series is binary compatible with the 5.11.x series.
Applications compiled for 5.11 will continue to run with 5.12.

Some of the changes listed in this file include issue tracking numbers
corresponding to tasks in the Qt Bug Tracker:

https://bugreports.qt.io/

Each of these identifiers can be entered in the bug tracker to obtain more
information about a particular change.

****************************************************************************
* Important Behavior Changes *
****************************************************************************

- QtTestLib:
* [QTBUG-72928] Blacklisting of tests will be taken into account for
XPASS and XFAIL. A blacklisted test that causes an XPASS will no
longer be a fail.

****************************************************************************
* QtCore *
****************************************************************************

- [QTBUG-72885] Fixed a number of warnings with Clang or Clang-Tidy in
Qt headers related to alignment of Qt private classes.

- QDate, QTime and QDateTime;
* [QTBUG-51208] Corrected documentation of how non-placeholder
characters are handled in format patterns passed to toString().

- QCoreApplication:
* [QTBUG-57171] Fixed an out-of-bounds access if the translatable
string passed to tr() ended in '%'.

- QFileInfo:
* [QTBUG-72644] Fixed a bug that would cause QFileInfo to report an
link incorrectly as a non-link.

- QLocale:
* Fixed a crash if qDebug() is used after main() has exited.
* [QTBUG-73403] Fixed a race condition in getting the system locale
(possible regression from Qt 5.11.x)

- QSysInfo:
* Fixed a bug on BSD systems in getting the machineUniqueId().
* Fixed a bug on Windows in 32-bit applications getting the
machineUniqueId() when the OS is 64-bit.

- QWaitCondition:
* Fixed handling of wait(QDeadlineTimer::Forever) on 32-bit platforms.

****************************************************************************
* QtWidgets *
****************************************************************************

- ItemViews:
* Fixed a regression with wrongly drawn centered/right aligned item
texts

****************************************************************************
* Third-Party Code *
****************************************************************************

- libpng was updated to version 1.6.36

****************************************************************************
* Freetype *
****************************************************************************

- Upgraded bundled Freetype version to 2.9.1. This also adds support for
the latest emoji font in use on Android 9.

****************************************************************************
* Android *
****************************************************************************

- Added the --no-strip command line option to androiddeployqt.

- qmake:
* Can now set the version name and code for Android using
ANDROID_VERSION_NAME and ANDROID_VERSION_CODE respectively in the pro
file.

****************************************************************************
* Windows *
****************************************************************************

- Fixed an issue where loading fonts from files or data would sometimes
mistakenly classify them as oblique.

****************************************************************************
* qmake *
****************************************************************************

- [QTBUG-27079] A new feature "cmdline" was added that implies "CONFIG +=
console" and "CONFIG -= app_bundle".
2 changes: 2 additions & 0 deletions examples/widgets/desktop/systray/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ int main(int argc, char *argv[])
{
Q_INIT_RESOURCE(systray);

QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);

QApplication app(argc, argv);

if (!QSystemTrayIcon::isSystemTrayAvailable()) {
Expand Down
2 changes: 2 additions & 0 deletions examples/widgets/dialogs/classwizard/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ int main(int argc, char *argv[])
{
Q_INIT_RESOURCE(classwizard);

QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);

QApplication app(argc, argv);

#ifndef QT_NO_TRANSLATION
Expand Down
2 changes: 2 additions & 0 deletions examples/widgets/dialogs/licensewizard/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ int main(int argc, char *argv[])
{
Q_INIT_RESOURCE(licensewizard);

QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);

QApplication app(argc, argv);

#ifndef QT_NO_TRANSLATION
Expand Down
1 change: 1 addition & 0 deletions examples/widgets/dialogs/standarddialogs/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@

int main(int argc, char *argv[])
{
QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
QApplication app(argc, argv);
QGuiApplication::setApplicationDisplayName(Dialog::tr("Standard Dialogs"));

Expand Down
2 changes: 2 additions & 0 deletions examples/widgets/dialogs/trivialwizard/trivialwizard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ QWizardPage *createConclusionPage()
int main(int argc, char *argv[])
//! [9] //! [11]
{
QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);

QApplication app(argc, argv);

#ifndef QT_NO_TRANSLATION
Expand Down
8 changes: 6 additions & 2 deletions mkspecs/features/resources.prf
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ for(resource, RESOURCES) {
!exists($$absolute_path($$resource, $$_PRO_FILE_PWD_)): \
warning("Failure to find: $$resource")
qmake_immediate.files += $$resource
OTHER_FILES *= $$resource
}
RESOURCES -= $$resource
next()
Expand Down Expand Up @@ -57,6 +58,7 @@ for(resource, RESOURCES) {
alias = $$relative_path($$file, $$abs_base)
resource_file_content += \
"<file alias=\"$$xml_escape($$alias)\">$$xml_escape($$file)</file>"
OTHER_FILES *= $$file
}
}

Expand All @@ -73,9 +75,11 @@ for(resource, RESOURCES) {
}

!isEmpty(RESOURCES):contains(TEMPLATE, .*lib):plugin:static {
resource_init_function = $$lower($$basename(TARGET))_plugin_resource_init
pluginBaseName = $$basename(TARGET)
pluginName = $$lower($$replace(pluginBaseName, [-], _))
resource_init_function = $${pluginName}_plugin_resource_init
DEFINES += "QT_PLUGIN_RESOURCE_INIT_FUNCTION=$$resource_init_function"
RESOURCE_INIT_CPP = $$OUT_PWD/$$lower($$basename(TARGET))_plugin_resources.cpp
RESOURCE_INIT_CPP = $$OUT_PWD/$${pluginName}_plugin_resources.cpp

GENERATED_SOURCES += $$RESOURCE_INIT_CPP
QMAKE_DISTCLEAN += $$RESOURCE_INIT_CPP
Expand Down
3 changes: 2 additions & 1 deletion src/3rdparty/angle/src/libANGLE/Context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,8 @@ egl::Error Context::onDestroy(const egl::Display *display)

for (auto &zeroTexture : mZeroTextures)
{
ANGLE_TRY(zeroTexture.second->onDestroy(this));
auto result = zeroTexture.second->onDestroy(this);
ANGLE_TRY(egl::Error(result));
zeroTexture.second.set(this, nullptr);
}
mZeroTextures.clear();
Expand Down
8 changes: 5 additions & 3 deletions src/3rdparty/angle/src/libANGLE/Stream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,9 @@ Error Stream::consumerAcquire(const gl::Context *context)
{
if (mPlanes[i].texture != nullptr)
{
ANGLE_TRY(mPlanes[i].texture->acquireImageFromStream(
context, mProducerImplementation->getGLFrameDescription(i)));
auto result = mPlanes[i].texture->acquireImageFromStream(
context, mProducerImplementation->getGLFrameDescription(i));
ANGLE_TRY(Error(result));
}
}

Expand All @@ -213,7 +214,8 @@ Error Stream::consumerRelease(const gl::Context *context)
{
if (mPlanes[i].texture != nullptr)
{
ANGLE_TRY(mPlanes[i].texture->releaseImageFromStream(context));
auto result = mPlanes[i].texture->releaseImageFromStream(context);
ANGLE_TRY(Error(result));
}
}

Expand Down
3 changes: 2 additions & 1 deletion src/3rdparty/angle/src/libANGLE/Texture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,8 @@ Error Texture::onDestroy(const Context *context)
{
if (mBoundSurface)
{
ANGLE_TRY(mBoundSurface->releaseTexImage(context, EGL_BACK_BUFFER));
auto result = mBoundSurface->releaseTexImage(context, EGL_BACK_BUFFER);
ANGLE_TRY(Error(result));
mBoundSurface = nullptr;
}
if (mBoundStream)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,8 @@ egl::Error Renderer9::initializeDevice()

ASSERT(!mBlit);
mBlit = new Blit9(this);
ANGLE_TRY(mBlit->initialize());
auto result = mBlit->initialize();
ANGLE_TRY(egl::Error(result));

ASSERT(!mVertexDataManager && !mIndexDataManager);
mVertexDataManager = new VertexDataManager(this);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
From 2d8118620d4871f74a3ddca233529ff540384477 Mon Sep 17 00:00:00 2001
From: Yuhang Zhao <[email protected]>
Date: Wed, 13 Feb 2019 23:26:55 +0800
Subject: [PATCH] Fix compilation with icc, converting between egl's and gl's
Error types

Each has two constructors from the other, one copying the other
moving; and this leads to an ambiguous overload when converting
Texture::onDestroy()'s gl::error to the egl::Error that
gl::Context::onDestroy() returns. Passing the value through a
temporary prevents the move-constructor from being attempted and saves
the day. Thanks to Ville Voutilainen for suggesting the fix.

Fixes: QTBUG-73698
Change-Id: I628173399a73cee2e253201bc3e8d3e6477a2fbf
---
src/3rdparty/angle/src/libANGLE/Context.cpp | 3 ++-
src/3rdparty/angle/src/libANGLE/Stream.cpp | 8 +++++---
src/3rdparty/angle/src/libANGLE/Texture.cpp | 3 ++-
.../angle/src/libANGLE/renderer/d3d/d3d9/Renderer9.cpp | 3 ++-
4 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/src/3rdparty/angle/src/libANGLE/Context.cpp b/src/3rdparty/angle/src/libANGLE/Context.cpp
index f638beda58..84f7936feb 100644
--- a/src/3rdparty/angle/src/libANGLE/Context.cpp
+++ b/src/3rdparty/angle/src/libANGLE/Context.cpp
@@ -451,7 +451,8 @@ egl::Error Context::onDestroy(const egl::Display *display)

for (auto &zeroTexture : mZeroTextures)
{
- ANGLE_TRY(zeroTexture.second->onDestroy(this));
+ auto result = zeroTexture.second->onDestroy(this);
+ ANGLE_TRY(egl::Error(result));
zeroTexture.second.set(this, nullptr);
}
mZeroTextures.clear();
diff --git a/src/3rdparty/angle/src/libANGLE/Stream.cpp b/src/3rdparty/angle/src/libANGLE/Stream.cpp
index 68279976b7..e384c7d486 100644
--- a/src/3rdparty/angle/src/libANGLE/Stream.cpp
+++ b/src/3rdparty/angle/src/libANGLE/Stream.cpp
@@ -192,8 +192,9 @@ Error Stream::consumerAcquire(const gl::Context *context)
{
if (mPlanes[i].texture != nullptr)
{
- ANGLE_TRY(mPlanes[i].texture->acquireImageFromStream(
- context, mProducerImplementation->getGLFrameDescription(i)));
+ auto result = mPlanes[i].texture->acquireImageFromStream(
+ context, mProducerImplementation->getGLFrameDescription(i));
+ ANGLE_TRY(Error(result));
}
}

@@ -213,7 +214,8 @@ Error Stream::consumerRelease(const gl::Context *context)
{
if (mPlanes[i].texture != nullptr)
{
- ANGLE_TRY(mPlanes[i].texture->releaseImageFromStream(context));
+ auto result = mPlanes[i].texture->releaseImageFromStream(context);
+ ANGLE_TRY(Error(result));
}
}

diff --git a/src/3rdparty/angle/src/libANGLE/Texture.cpp b/src/3rdparty/angle/src/libANGLE/Texture.cpp
index da92e65916..7447604fe6 100644
--- a/src/3rdparty/angle/src/libANGLE/Texture.cpp
+++ b/src/3rdparty/angle/src/libANGLE/Texture.cpp
@@ -550,7 +550,8 @@ Error Texture::onDestroy(const Context *context)
{
if (mBoundSurface)
{
- ANGLE_TRY(mBoundSurface->releaseTexImage(context, EGL_BACK_BUFFER));
+ auto result = mBoundSurface->releaseTexImage(context, EGL_BACK_BUFFER);
+ ANGLE_TRY(Error(result));
mBoundSurface = nullptr;
}
if (mBoundStream)
diff --git a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d9/Renderer9.cpp b/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d9/Renderer9.cpp
index 75c6298868..b583273641 100644
--- a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d9/Renderer9.cpp
+++ b/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d9/Renderer9.cpp
@@ -376,7 +376,8 @@ egl::Error Renderer9::initializeDevice()

ASSERT(!mBlit);
mBlit = new Blit9(this);
- ANGLE_TRY(mBlit->initialize());
+ auto result = mBlit->initialize();
+ ANGLE_TRY(egl::Error(result));

ASSERT(!mVertexDataManager && !mIndexDataManager);
mVertexDataManager = new VertexDataManager(this);
--
2.20.1.windows.1

4 changes: 2 additions & 2 deletions src/corelib/io/qtemporaryfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -908,8 +908,8 @@ QTemporaryFile *QTemporaryFile::createNativeFile(QFile &file)
qint64 old_off = 0;
if(wasOpen)
old_off = file.pos();
else
file.open(QIODevice::ReadOnly);
else if (!file.open(QIODevice::ReadOnly))
return nullptr;
//dump data
QTemporaryFile *ret = new QTemporaryFile;
if (ret->open()) {
Expand Down
3 changes: 2 additions & 1 deletion src/corelib/kernel/qtranslator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
#endif

#include <stdlib.h>
#include <new>

#include "qobject_p.h"

Expand Down Expand Up @@ -585,7 +586,7 @@ bool QTranslatorPrivate::do_load(const QString &realname, const QString &directo
#endif // QT_USE_MMAP

if (!ok) {
d->unmapPointer = new char[d->unmapLength];
d->unmapPointer = new (std::nothrow) char[d->unmapLength];
if (d->unmapPointer) {
file.seek(0);
qint64 readResult = file.read(d->unmapPointer, d->unmapLength);
Expand Down
11 changes: 9 additions & 2 deletions src/gui/image/qimage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ QImageData * QImageData::create(const QSize &size, QImage::Format format)
int height = size.height();
int depth = qt_depthForFormat(format);
auto params = calculateImageParameters(width, height, depth);
if (params.bytesPerLine < 0)
if (!params.isValid())
return nullptr;

QScopedPointer<QImageData> d(new QImageData);
Expand Down Expand Up @@ -783,7 +783,7 @@ QImageData *QImageData::create(uchar *data, int width, int height, int bpl, QIm

const int depth = qt_depthForFormat(format);
auto params = calculateImageParameters(width, height, depth);
if (params.totalSize < 0)
if (!params.isValid())
return nullptr;

if (bpl > 0) {
Expand Down Expand Up @@ -1488,10 +1488,17 @@ qsizetype QImage::sizeInBytes() const

\sa scanLine()
*/
#if QT_VERSION >= QT_VERSION_CHECK(6,0,0)
qsizetype QImage::bytesPerLine() const
{
return d ? d->bytes_per_line : 0;
}
#else
int QImage::bytesPerLine() const
{
return d ? d->bytes_per_line : 0;
}
#endif


/*!
Expand Down
Loading

0 comments on commit 6893919

Please sign in to comment.