From 718afd7c3a78a35e3f4073dc6447e6bf3fda82d4 Mon Sep 17 00:00:00 2001 From: Antti Kokko Date: Mon, 1 Apr 2019 13:35:30 +0300 Subject: Add changes file for Qt 5.12.3 + 46425199ebcdd4cb9facb471f67e17a941ca103f Fix blacklisting of auto tests + c901f6d2ee7f73f58881424b05d57360720fa7d9 Bump version + 1edf84eff083eb5412b4c5c7cd3bd8166f15f61f Dialog: Update the title on the window when changing it on the dialog Change-Id: I8ea33bd0ea313857aef450c9d4bf4ecd48dca257 Reviewed-by: Jani Heikkinen --- dist/changes-5.12.3 | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 dist/changes-5.12.3 diff --git a/dist/changes-5.12.3 b/dist/changes-5.12.3 new file mode 100644 index 00000000..22279541 --- /dev/null +++ b/dist/changes-5.12.3 @@ -0,0 +1,34 @@ +Qt 5.12.3 is a bug-fix release. It maintains both forward and backward +compatibility (source and binary) with Qt 5.12.0 through 5.12.2. + +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. + +**************************************************************************** +* Controls * +**************************************************************************** + + - [QTBUG-74350] Dialog: Update the title on the window when changing it on + the dialog. + - [QTBUG-73691] ScrollViewStyle: fixed division by zero in extent + computation. + - [QTBUG-73765] Calendar: CalendarHeaderModel is now updated when changing + the locale. + - [QTBUG-65209] Fixed progress indicator with vertical progress bar. + - [QTBUG-69041] Fixed incorrect transientScrollBars binding in + BasicTableView. + - [QTBUG-71997] Calendar: fix dates being disabled if time component is + specified for the minimum or maximum date. -- cgit v1.2.1 From a54eb316af7921ff77d4419c8b11b31f8e6fac7b Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Sun, 14 Apr 2019 10:43:57 +0200 Subject: Create the decoration component when it is needed If multiple QQmlEngines are created and use a Dialog, initalizeEngine will be called more than once and therefore recreates the QQuickAbstractDialog::m_decorationComponent without deleting the original. Therefore we keep the decoration component url instead, and create the decoration component on demand. This ensures that it keeps the component relevant for the QQmlEngine and stops the memory leak from before as well. Fixes: QTBUG-75149 Change-Id: Ic79103f42d092d39b46868a45b4099ddc6edf9db Reviewed-by: Shawn Rutledge --- src/dialogs/plugin.cpp | 10 ++-------- src/dialogs/qquickabstractdialog.cpp | 6 ++++-- src/dialogs/qquickabstractdialog_p.h | 3 ++- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/src/dialogs/plugin.cpp b/src/dialogs/plugin.cpp index 8c10786f..b31d233e 100644 --- a/src/dialogs/plugin.cpp +++ b/src/dialogs/plugin.cpp @@ -40,6 +40,7 @@ #include #include #include +#include #include "qquickmessagedialog_p.h" #include "qquickabstractmessagedialog_p.h" #include "qquickdialogassets_p.h" @@ -87,12 +88,6 @@ class QtQuick2DialogsPlugin : public QQmlExtensionPlugin public: QtQuick2DialogsPlugin() : QQmlExtensionPlugin(), m_useResources(true) { } - virtual void initializeEngine(QQmlEngine *engine, const char * uri) { - qCDebug(lcRegistration) << uri << m_decorationComponentUrl; - QQuickAbstractDialog::m_decorationComponent = - new QQmlComponent(engine, m_decorationComponentUrl, QQmlComponent::Asynchronous); - } - virtual void registerTypes(const char *uri) { Q_ASSERT(QLatin1String(uri) == QLatin1String("QtQuick.Dialogs")); bool hasTopLevelWindows = QGuiApplicationPrivate::platformIntegration()-> @@ -114,7 +109,7 @@ public: m_useResources = false; #endif #endif - m_decorationComponentUrl = m_useResources ? + QQuickAbstractDialog::m_decorationComponentUrl = m_useResources ? QUrl("qrc:/QtQuick/Dialogs/qml/DefaultWindowDecoration.qml") : #ifndef QT_STATIC QUrl::fromLocalFile(qmlDir.filePath(QString("qml/DefaultWindowDecoration.qml"))); @@ -256,7 +251,6 @@ protected: qmlRegisterType(dialogQmlPath, uri, versionMajor, versionMinor, qmlName); } - QUrl m_decorationComponentUrl; bool m_useResources; }; diff --git a/src/dialogs/qquickabstractdialog.cpp b/src/dialogs/qquickabstractdialog.cpp index e00c17a1..e71948d1 100644 --- a/src/dialogs/qquickabstractdialog.cpp +++ b/src/dialogs/qquickabstractdialog.cpp @@ -52,7 +52,7 @@ QT_BEGIN_NAMESPACE Q_LOGGING_CATEGORY(lcWindow, "qt.quick.dialogs.window") -QQmlComponent *QQuickAbstractDialog::m_decorationComponent(0); +QUrl QQuickAbstractDialog::m_decorationComponentUrl = QUrl(); QQuickAbstractDialog::QQuickAbstractDialog(QObject *parent) : QObject(parent) @@ -151,6 +151,8 @@ void QQuickAbstractDialog::setVisible(bool v) // If the platform does not support multiple windows, but the dialog is // implemented as an Item, then try to decorate it as a fake window and make it visible. if (!m_windowDecoration) { + if (!m_decorationComponent) + m_decorationComponent = new QQmlComponent(qmlEngine(this), m_decorationComponentUrl, QQmlComponent::Asynchronous, this); if (m_decorationComponent) { if (m_decorationComponent->isLoading()) connect(m_decorationComponent, SIGNAL(statusChanged(QQmlComponent::Status)), @@ -232,7 +234,7 @@ void QQuickAbstractDialog::decorationLoaded() "cannot be used as a window decoration because it's not an Item"; delete decoration; delete m_decorationComponent; - m_decorationComponent = 0; + m_decorationComponent = nullptr; } } // Window decoration wasn't possible, so just reparent it into the scene diff --git a/src/dialogs/qquickabstractdialog_p.h b/src/dialogs/qquickabstractdialog_p.h index 54dbaace..a861739b 100644 --- a/src/dialogs/qquickabstractdialog_p.h +++ b/src/dialogs/qquickabstractdialog_p.h @@ -167,7 +167,8 @@ protected: // variables and methods for pure-QML implementations only bool m_visibleChangedConnected; bool m_dialogHelperInUse; - static QQmlComponent *m_decorationComponent; + QQmlComponent *m_decorationComponent = nullptr; + static QUrl m_decorationComponentUrl; friend class QtQuick2DialogsPlugin; -- cgit v1.2.1