aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlglobal.cpp
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@digia.com>2013-07-04 17:36:14 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-07-04 20:52:48 +0200
commit8cc60ac9cc33192d8a0bc8ce9412fe059830eabd (patch)
tree0608af5fc653a5300e5da5969a7bd0914962e548 /src/qml/qml/qqmlglobal.cpp
parentea045d82a3a837f83fec82462feebf2bc262f9d9 (diff)
Fix Qt.application.xxx notifier signals
QCoreApplication now provides change notifications. Change-Id: Icd7e1247426f4b5ad124d6d9b72a2ba99225ee08 Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Diffstat (limited to 'src/qml/qml/qqmlglobal.cpp')
-rw-r--r--src/qml/qml/qqmlglobal.cpp20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/qml/qml/qqmlglobal.cpp b/src/qml/qml/qqmlglobal.cpp
index 78d2f5aa91..25f836a16c 100644
--- a/src/qml/qml/qqmlglobal.cpp
+++ b/src/qml/qml/qqmlglobal.cpp
@@ -403,6 +403,14 @@ QQmlApplication::QQmlApplication(QObject *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)
@@ -410,6 +418,14 @@ QQmlApplication::QQmlApplication(QQmlApplicationPrivate &dd, QObject *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()));
}
QStringList QQmlApplication::args()
@@ -445,25 +461,21 @@ QString QQmlApplication::domain() const
void QQmlApplication::setName(const QString &arg)
{
QCoreApplication::instance()->setApplicationName(arg);
- emit nameChanged(); //Note that we don't get notified if it's changed from C++
}
void QQmlApplication::setVersion(const QString &arg)
{
QCoreApplication::instance()->setApplicationVersion(arg);
- emit versionChanged(); //Note that we don't get notified if it's changed from C++
}
void QQmlApplication::setOrganization(const QString &arg)
{
QCoreApplication::instance()->setOrganizationName(arg);
- emit organizationChanged(); //Note that we don't get notified if it's changed from C++
}
void QQmlApplication::setDomain(const QString &arg)
{
QCoreApplication::instance()->setOrganizationDomain(arg);
- emit domainChanged(); //Note that we don't get notified if it's changed from C++
}
QT_END_NAMESPACE