Merge "Merge remote-tracking branch 'origin/5.11' into 5.12" into refs/staging/5.12
This commit is contained in:
commit
d09d99af22
@ -310,7 +310,13 @@
|
||||
"#else",
|
||||
"# error __cplusplus must be > 201402L (the value for C++14)",
|
||||
"#endif",
|
||||
"#include <map> // https://bugs.llvm.org//show_bug.cgi?id=33117"
|
||||
"#include <map> // https://bugs.llvm.org//show_bug.cgi?id=33117",
|
||||
"#include <variant>"
|
||||
],
|
||||
"main": [
|
||||
"std::variant<int> v(42);",
|
||||
"int i = std::get<int>(v);",
|
||||
"std::visit([](const auto &) { return 1; }, v);"
|
||||
],
|
||||
"qmake": "CONFIG += c++11 c++14 c++1z"
|
||||
}
|
||||
|
@ -1132,6 +1132,8 @@ defineReplace(qtConfOutputPostProcess_publicPro) {
|
||||
"QT_GCC_MINOR_VERSION = $$QMAKE_GCC_MINOR_VERSION" \
|
||||
"QT_GCC_PATCH_VERSION = $$QMAKE_GCC_PATCH_VERSION"
|
||||
}
|
||||
!isEmpty(QMAKE_MAC_SDK_VERSION): \
|
||||
output += "QT_MAC_SDK_VERSION = $$QMAKE_MAC_SDK_VERSION"
|
||||
!isEmpty(QMAKE_CLANG_MAJOR_VERSION) {
|
||||
output += \
|
||||
"QT_CLANG_MAJOR_VERSION = $$QMAKE_CLANG_MAJOR_VERSION" \
|
||||
|
129
dist/changes-5.11.2
vendored
Normal file
129
dist/changes-5.11.2
vendored
Normal file
@ -0,0 +1,129 @@
|
||||
Qt 5.11.2 is a bug-fix release. It maintains both forward and backward
|
||||
compatibility (source and binary) with Qt 5.11.0 through 5.11.1.
|
||||
|
||||
For more details, refer to the online documentation included in this
|
||||
distribution. The documentation is also available online:
|
||||
|
||||
http://doc.qt.io/qt-5/index.html
|
||||
|
||||
The Qt version 5.11 series is binary compatible with the 5.10.x series.
|
||||
Applications compiled for 5.10 will continue to run with 5.11.
|
||||
|
||||
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.
|
||||
|
||||
****************************************************************************
|
||||
* Qt 5.11.2 Changes *
|
||||
****************************************************************************
|
||||
|
||||
****************************************************************************
|
||||
* Licensing *
|
||||
****************************************************************************
|
||||
|
||||
- [QTBUG-52222] The commercial preview license in the git checkout has
|
||||
been replaced by the Qt License Agreement 4.0 text. This makes it
|
||||
explicit that commercial customers of The Qt Company can use the git
|
||||
version under commercial terms. However, support is (still) only
|
||||
provided for builds from released branches of Qt.
|
||||
|
||||
****************************************************************************
|
||||
* QtCore *
|
||||
****************************************************************************
|
||||
|
||||
- QFile:
|
||||
* [QTBUG-69417] Fixed a regression in QFile::copy() that caused the
|
||||
original file not to be copied entirely if it was modified outside of
|
||||
this QFile object between the last time we checked its size and the
|
||||
copy() call. Note this is not a prevention against race conditions.
|
||||
* [QTBUG-69148] Fixed a regression that caused QFile::map() to succeed
|
||||
or produce incorrect results when trying to map a file at an offset
|
||||
beyond 4 GB on 32-bit Android systems and on some special Linux
|
||||
configurations.
|
||||
|
||||
- QObject:
|
||||
* [QTBUG-69744] Fixed a bug in setProperty() that caused a property
|
||||
change not to take effect if the old value compared equal using
|
||||
QVariant's equality operator, but the values were not strictly equal.
|
||||
|
||||
- QPluginLoader:
|
||||
* Fixed an issue that could cause a crash when certain damaged or
|
||||
corrupt plugin files were scanned.
|
||||
|
||||
- QSortFilterProxyModel:
|
||||
* [QTBUG-58499][QTBUG-69158] insertRows(row,count,parent) with row ==
|
||||
rowCount will insert at the bottom of the source model rather than
|
||||
at the row QSortFilterProxyModel::rowCount of the source model.
|
||||
|
||||
- QStorageInfo:
|
||||
* [QTBUG-60215] Fixed a bug that caused the last entry in the mtab file
|
||||
to be ignored on Android.
|
||||
* Fixed a bug on Android that could cause QStorageInfo to skip some
|
||||
filesystems (if the mount table is a virtual file and contains any
|
||||
short lines) or crash (if the mount table contains any 3-field lines).
|
||||
|
||||
- QString:
|
||||
* [QTBUG-63620] Formatting of doubles with single-digit exponent, by
|
||||
number() or args(), now includes a leading zero in that exponent,
|
||||
consistently with sprintf(), as it did up to 5.6.
|
||||
|
||||
- QSysInfo:
|
||||
* Fixed QSysInfo::productType() to properly detect some Linux
|
||||
distributions that ship with a minimal /etc.
|
||||
|
||||
- QTemporaryFile:
|
||||
* [QTBUG-69436] Worked around a bug in the GNU C Library versions 2.21
|
||||
and earlier (used on Linux) that caused temporary files to be created
|
||||
with permissions 000.
|
||||
|
||||
- QUrl:
|
||||
* Fixed a bug that caused URLs whose hostnames contained unassigned or
|
||||
prohibited Unicode codepoints to report isValid() == true, despite
|
||||
clearing the hostname.
|
||||
|
||||
****************************************************************************
|
||||
* QtGui *
|
||||
****************************************************************************
|
||||
|
||||
- QMatrix:
|
||||
* The qHash() implementation for QMatrix has been changed.
|
||||
|
||||
- QTransform:
|
||||
* The qHash() implementation for QTransform has been changed.
|
||||
|
||||
- Text:
|
||||
* [QTBUG-69661] Fixed potential crash when using
|
||||
QTextOption::ShowLineAndParagraphSeparators.
|
||||
* [QTBUG-70096] Fixed a possible crash when combining QStaticText,
|
||||
QOpenGLWidget and Qt Quick in the same application.
|
||||
|
||||
****************************************************************************
|
||||
* QtWidgets *
|
||||
****************************************************************************
|
||||
|
||||
- QMessageBox:
|
||||
* [QTBUG-69526] A message box with two buttons, one of which is the "Show
|
||||
Details..." button, can now be closed by clicking the X button on the
|
||||
window's title bar.
|
||||
|
||||
- QFileDialog:
|
||||
* QFileDialog::selectedMimeTypeFilter() now returns the actually
|
||||
selected name filter.
|
||||
|
||||
****************************************************************************
|
||||
* Third-Party Code *
|
||||
****************************************************************************
|
||||
|
||||
- [QTBUG-69274] SQLite was updated to version 3.24.0.
|
||||
- [QTBUG-69271] PCRE2 was updated to version 10.31.
|
||||
|
||||
****************************************************************************
|
||||
* plugins *
|
||||
****************************************************************************
|
||||
|
||||
- ibus:
|
||||
* Qt programs in Flatpak environment can now trigger IBus input method.
|
@ -7,6 +7,7 @@ QMAKE_MAC_SDK = macosx
|
||||
|
||||
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.12
|
||||
QMAKE_APPLE_DEVICE_ARCHS = x86_64
|
||||
QT_MAC_SDK_VERSION_TESTED_WITH = 10.13
|
||||
|
||||
device.sdk = macosx
|
||||
device.target = device
|
||||
|
@ -1,5 +1,43 @@
|
||||
load(default_post)
|
||||
|
||||
contains(TEMPLATE, .*app) {
|
||||
!macx-xcode {
|
||||
# Detect changes to the platform SDK
|
||||
QMAKE_EXTRA_VARIABLES += QMAKE_MAC_SDK QMAKE_MAC_SDK_VERSION
|
||||
QMAKE_EXTRA_INCLUDES += $$shell_quote($$PWD/sdk.mk)
|
||||
}
|
||||
|
||||
# Detect incompatible SDK versions
|
||||
|
||||
!versionAtLeast(QMAKE_MAC_SDK_VERSION, $$QT_MAC_SDK_VERSION): \
|
||||
warning("Qt requires at least version $$QT_MAC_SDK_VERSION of the platform SDK," \
|
||||
"you're using $${QMAKE_MAC_SDK_VERSION}. Please upgrade.")
|
||||
|
||||
!isEmpty(QT_MAC_SDK_VERSION_TESTED_WITH) {
|
||||
# For Qt developers only
|
||||
!isEmpty($$list($$(QT_MAC_SDK_NO_VERSION_CHECK))): \
|
||||
CONFIG += sdk_no_version_check
|
||||
|
||||
!sdk_no_version_check:!versionAtMost(QMAKE_MAC_SDK_VERSION, $$QT_MAC_SDK_VERSION_TESTED_WITH) {
|
||||
warning("Qt has only been tested with version $$QT_MAC_SDK_VERSION_TESTED_WITH"\
|
||||
"of the platform SDK, you're using $${QMAKE_MAC_SDK_VERSION}.")
|
||||
warning("This is an unsupported configuration. You may experience build issues," \
|
||||
"and by using")
|
||||
warning("the $$QMAKE_MAC_SDK_VERSION SDK you are opting in to new features" \
|
||||
"that Qt has not been prepared for.")
|
||||
|
||||
isEqual(QMAKE_MAC_SDK_VERSION, 10.14): \
|
||||
warning("E.g., 10.14 enables dark mode and layer-backed views," \
|
||||
"which Qt $${QT_MAJOR_VERSION}.$${QT_MINOR_VERSION} does not support.")
|
||||
|
||||
warning("Please downgrade the SDK you use to build your app to version" \
|
||||
"$$QT_MAC_SDK_VERSION_TESTED_WITH, or configure")
|
||||
warning("with CONFIG+=sdk_no_version_check when running qmake" \
|
||||
"to silence this warning.")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
!no_objective_c:CONFIG += objective_c
|
||||
|
||||
qt {
|
||||
|
12
mkspecs/features/mac/sdk.mk
Normal file
12
mkspecs/features/mac/sdk.mk
Normal file
@ -0,0 +1,12 @@
|
||||
CURRENT_MAC_SDK_VERSION := $(shell /usr/bin/xcrun --sdk $(EXPORT_QMAKE_MAC_SDK) -show-sdk-version)
|
||||
|
||||
ifneq ($(CURRENT_MAC_SDK_VERSION),$(EXPORT_QMAKE_MAC_SDK_VERSION))
|
||||
$(info The platform SDK has been changed from version $(EXPORT_QMAKE_MAC_SDK_VERSION) to version $(CURRENT_MAC_SDK_VERSION).)
|
||||
$(info This requires a fresh build. Please wipe the build directory completely,)
|
||||
$(info including any .qmake.stash and .qmake.cache files generated by qmake.)
|
||||
# FIXME: Ideally this should be advertised as just running make distclean, or we
|
||||
# should even do it automatically by having proper makefile dependencies between
|
||||
# .qmake.stash and the SDK version, but as qmake doesn't seem to be consistent in
|
||||
# how it deals with .qmake.stash as a dependency we need to defer that until later.
|
||||
$(error ^)
|
||||
endif
|
@ -73,7 +73,7 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
The QRect class provides a collection of functions that return the
|
||||
various rectangle coordinates, and enable manipulation of
|
||||
these. QRect also provide functions to move the rectangle relative
|
||||
these. QRect also provides functions to move the rectangle relative
|
||||
to the various coordinates. In addition there is a moveTo()
|
||||
function that moves the rectangle, leaving its top left corner at
|
||||
the given coordinates. Alternatively, the translate() function
|
||||
@ -155,7 +155,7 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
The QRect class provides a collection of functions that return the
|
||||
various rectangle coordinates, and enable manipulation of
|
||||
these. QRect also provide functions to move the rectangle relative
|
||||
these. QRect also provides functions to move the rectangle relative
|
||||
to the various coordinates.
|
||||
|
||||
For example the left(), setLeft() and moveLeft() functions as an
|
||||
@ -1335,7 +1335,7 @@ QDebug operator<<(QDebug dbg, const QRect &r)
|
||||
|
||||
The QRectF class provides a collection of functions that return
|
||||
the various rectangle coordinates, and enable manipulation of
|
||||
these. QRectF also provide functions to move the rectangle
|
||||
these. QRectF also provides functions to move the rectangle
|
||||
relative to the various coordinates. In addition there is a
|
||||
moveTo() function that moves the rectangle, leaving its top left
|
||||
corner at the given coordinates. Alternatively, the translate()
|
||||
@ -1418,7 +1418,7 @@ QDebug operator<<(QDebug dbg, const QRect &r)
|
||||
|
||||
The QRectF class provides a collection of functions that return
|
||||
the various rectangle coordinates, and enable manipulation of
|
||||
these. QRectF also provide functions to move the rectangle
|
||||
these. QRectF also provides functions to move the rectangle
|
||||
relative to the various coordinates.
|
||||
|
||||
For example: the bottom(), setBottom() and moveBottom() functions:
|
||||
|
@ -1817,6 +1817,7 @@ void QOpenGL2PaintEngineExPrivate::drawCachedGlyphs(QFontEngine::GlyphFormat gly
|
||||
// we may have to re-bind brush textures after filling in the cache.
|
||||
brushTextureDirty = (QT_BRUSH_TEXTURE_UNIT == glypchCacheTextureUnit);
|
||||
}
|
||||
cache->setPaintEnginePrivate(nullptr);
|
||||
}
|
||||
|
||||
if (cache->width() == 0 || cache->height() == 0)
|
||||
|
@ -152,6 +152,11 @@ public:
|
||||
|
||||
void clear();
|
||||
|
||||
QOpenGL2PaintEngineExPrivate *paintEnginePrivate() const
|
||||
{
|
||||
return pex;
|
||||
}
|
||||
|
||||
private:
|
||||
void setupVertexAttribs();
|
||||
|
||||
|
@ -72,12 +72,6 @@
|
||||
|
||||
#include <IOKit/graphics/IOGraphicsLib.h>
|
||||
|
||||
#if !QT_MACOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_10_14)
|
||||
@interface NSApplication (MojaveForwardDeclarations)
|
||||
@property (strong) NSAppearance *appearance NS_AVAILABLE_MAC(10_14);
|
||||
@end
|
||||
#endif
|
||||
|
||||
static void initResources()
|
||||
{
|
||||
Q_INIT_RESOURCE(qcocoaresources);
|
||||
@ -139,21 +133,6 @@ QCocoaIntegration::QCocoaIntegration(const QStringList ¶mList)
|
||||
NSApplication *cocoaApplication = [QNSApplication sharedApplication];
|
||||
qt_redirectNSApplicationSendEvent();
|
||||
|
||||
if (__builtin_available(macOS 10.14, *)) {
|
||||
// Disable dark appearance, unless the Info.plist or environment requests that it should be enabled
|
||||
bool plistEnablesDarkAppearance = [[[NSBundle mainBundle] objectForInfoDictionaryKey:
|
||||
@"NSRequiresAquaSystemAppearance"] boolValue];
|
||||
|
||||
bool hasEnvironmentRequiresAquaAppearance;
|
||||
int environmentRequiresAquaAppearance = qEnvironmentVariableIntValue(
|
||||
"QT_MAC_REQUIRES_AQUA_SYSTEM_APPEARANCE", &hasEnvironmentRequiresAquaAppearance);
|
||||
bool environmentEnablesDarkAppearance = hasEnvironmentRequiresAquaAppearance
|
||||
&& environmentRequiresAquaAppearance == 0;
|
||||
|
||||
if (!(plistEnablesDarkAppearance || environmentEnablesDarkAppearance))
|
||||
NSApp.appearance = [NSAppearance appearanceNamed:NSAppearanceNameAqua];
|
||||
}
|
||||
|
||||
if (qEnvironmentVariableIsEmpty("QT_MAC_DISABLE_FOREGROUND_APPLICATION_TRANSFORM")) {
|
||||
// Applications launched from plain executables (without an app
|
||||
// bundle) are "background" applications that does not take keybaord
|
||||
|
@ -165,6 +165,11 @@ void QMacCocoaViewContainer::setCocoaView(NSView *view)
|
||||
Q_ASSERT(window->handle());
|
||||
|
||||
[oldView release];
|
||||
|
||||
// The QWindow::destroy()) call above will explicitly hide this widget.
|
||||
// Clear the hidden state here so it can be implicitly shown again.
|
||||
setAttribute(Qt::WA_WState_Hidden, false);
|
||||
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
@ -6666,8 +6666,6 @@ bool QDomDocument::setContent(const QString& text, bool namespaceProcessing, QSt
|
||||
}
|
||||
|
||||
/*!
|
||||
\nonreentrant
|
||||
|
||||
This function parses the XML document from the byte array \a
|
||||
data and sets it as the content of the document. It tries to
|
||||
detect the encoding of the document as required by the XML
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include <QtGui/QOpenGLFunctions>
|
||||
#include <QtGui/QPainter>
|
||||
#include <QtGui/QScreen>
|
||||
#include <QtGui/QStaticText>
|
||||
#include <QtWidgets/QDesktopWidget>
|
||||
#include <QtWidgets/QGraphicsView>
|
||||
#include <QtWidgets/QGraphicsScene>
|
||||
@ -40,6 +41,8 @@
|
||||
#include <QtTest/QtTest>
|
||||
#include <QSignalSpy>
|
||||
#include <private/qguiapplication_p.h>
|
||||
#include <private/qstatictext_p.h>
|
||||
#include <private/qopengltextureglyphcache_p.h>
|
||||
#include <qpa/qplatformintegration.h>
|
||||
|
||||
class tst_QOpenGLWidget : public QObject
|
||||
@ -64,6 +67,10 @@ private slots:
|
||||
void stackWidgetOpaqueChildIsVisible();
|
||||
void offscreen();
|
||||
void offscreenThenOnscreen();
|
||||
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void staticTextDanglingPointer();
|
||||
#endif
|
||||
};
|
||||
|
||||
void tst_QOpenGLWidget::initTestCase()
|
||||
@ -675,6 +682,53 @@ void tst_QOpenGLWidget::offscreenThenOnscreen()
|
||||
QVERIFY(image.pixel(30, 40) == qRgb(0, 0, 255));
|
||||
}
|
||||
|
||||
class StaticTextPainterWidget : public QOpenGLWidget
|
||||
{
|
||||
public:
|
||||
StaticTextPainterWidget(QWidget *parent = nullptr)
|
||||
: QOpenGLWidget(parent)
|
||||
{
|
||||
}
|
||||
|
||||
void paintEvent(QPaintEvent *)
|
||||
{
|
||||
QPainter p(this);
|
||||
text.setText(QStringLiteral("test"));
|
||||
p.drawStaticText(0, 0, text);
|
||||
|
||||
ctx = QOpenGLContext::currentContext();
|
||||
}
|
||||
|
||||
QStaticText text;
|
||||
QOpenGLContext *ctx;
|
||||
};
|
||||
|
||||
#ifdef QT_BUILD_INTERNAL
|
||||
void tst_QOpenGLWidget::staticTextDanglingPointer()
|
||||
{
|
||||
QWidget w;
|
||||
StaticTextPainterWidget *glw = new StaticTextPainterWidget(&w);
|
||||
w.resize(640, 480);
|
||||
glw->resize(320, 200);
|
||||
w.show();
|
||||
|
||||
QVERIFY(QTest::qWaitForWindowExposed(&w));
|
||||
QStaticTextPrivate *d = QStaticTextPrivate::get(&glw->text);
|
||||
|
||||
QCOMPARE(d->itemCount, 1);
|
||||
QFontEngine *fe = d->items->fontEngine();
|
||||
|
||||
for (int i = QFontEngine::Format_None; i <= QFontEngine::Format_ARGB; ++i) {
|
||||
QOpenGLTextureGlyphCache *cache =
|
||||
(QOpenGLTextureGlyphCache *) fe->glyphCache(glw->ctx,
|
||||
QFontEngine::GlyphFormat(i),
|
||||
QTransform());
|
||||
if (cache != nullptr)
|
||||
QCOMPARE(cache->paintEnginePrivate(), nullptr);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
QTEST_MAIN(tst_QOpenGLWidget)
|
||||
|
||||
#include "tst_qopenglwidget.moc"
|
||||
|
Loading…
x
Reference in New Issue
Block a user