diff options
author | Ivan Tkachenko <me@ratijas.tk> | 2023-09-17 00:53:08 +0300 |
---|---|---|
committer | Ivan Tkachenko <me@ratijas.tk> | 2023-09-19 19:42:24 +0300 |
commit | ef9dbe9cf45b8d1b5a7b1a70be066e6c570ea2ef (patch) | |
tree | 0ba91ace8c3c782618b1afc882edf22e5e0a292c /src/qml | |
parent | 5077f5bc71d2800d8d190b5bd1e6da041895edfc (diff) |
QQmlApplication: Reuse second constructor
Why duplicating all the connections, when you can just call another ctor?
Change-Id: I4ea248a7f176bf9fcb8fad058c59529b01678115
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/qml')
-rw-r--r-- | src/qml/qml/qqmlglobal.cpp | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/qml/qml/qqmlglobal.cpp b/src/qml/qml/qqmlglobal.cpp index c9f9f7f6dd..904a1c1dcc 100644 --- a/src/qml/qml/qqmlglobal.cpp +++ b/src/qml/qml/qqmlglobal.cpp @@ -830,18 +830,8 @@ Q_AUTOTEST_EXPORT QQmlGuiProvider *QQml_guiProvider(void) //Docs in qqmlengine.cpp QQmlApplication::QQmlApplication(QObject *parent) - : QObject(*(new QQmlApplicationPrivate),parent) + : QQmlApplication(*(new QQmlApplicationPrivate), parent) { - connect(QCoreApplication::instance(), SIGNAL(aboutToQuit()), - this, SIGNAL(aboutToQuit())); - connect(QCoreApplication::instance(), SIGNAL(applicationNameChanged()), - this, SIGNAL(nameChanged())); - connect(QCoreApplication::instance(), SIGNAL(applicationVersionChanged()), - this, SIGNAL(versionChanged())); - connect(QCoreApplication::instance(), SIGNAL(organizationNameChanged()), - this, SIGNAL(organizationChanged())); - connect(QCoreApplication::instance(), SIGNAL(organizationDomainChanged()), - this, SIGNAL(domainChanged())); } QQmlApplication::QQmlApplication(QQmlApplicationPrivate &dd, QObject *parent) |