summaryrefslogtreecommitdiffstats
path: root/src/declarative/util
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@digia.com>2012-11-22 11:39:13 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-11-22 17:27:24 +0100
commit8019ccaa81f890fd4b3d18f668a5227518e8b50a (patch)
tree1ab01262914742ba8f4cf37c51f335abf71d7e30 /src/declarative/util
parent22059766f799874b931f4369c0b1ec6bb3a4bb21 (diff)
Remove references to QApplication::type()
Qt3 legacy QCoreApplication::Type and QApplication::type() will be removed -> use qobject_cast instead. Change-Id: If95a5552440ace2592332de03f9d2240fa8770b9 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Diffstat (limited to 'src/declarative/util')
-rw-r--r--src/declarative/util/qdeclarativeutilmodule.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/declarative/util/qdeclarativeutilmodule.cpp b/src/declarative/util/qdeclarativeutilmodule.cpp
index 5a572d38..41c48b7b 100644
--- a/src/declarative/util/qdeclarativeutilmodule.cpp
+++ b/src/declarative/util/qdeclarativeutilmodule.cpp
@@ -77,7 +77,7 @@
void QDeclarativeUtilModule::defineModule()
{
- if (QApplication::type() != QApplication::Tty) {
+ if (qobject_cast<QApplication *>(QCoreApplication::instance())) {
qmlRegisterUncreatableType<QDeclarativeApplication>("QtQuick",1,1,"Application", QDeclarativeApplication::tr("Application is an abstract class"));
qmlRegisterType<QDeclarativeAnchorAnimation>("QtQuick",1,0,"AnchorAnimation");
@@ -133,7 +133,7 @@ void QDeclarativeUtilModule::defineModule()
void QDeclarativeUtilModule::defineModuleCompat()
{
#ifndef QT_NO_IMPORT_QT47_QML
- if (QApplication::type() != QApplication::Tty) {
+ if (qobject_cast<QApplication *>(QCoreApplication::instance())) {
qmlRegisterType<QDeclarativeAnchorAnimation>("Qt",4,7,"AnchorAnimation");
qmlRegisterType<QDeclarativeAnchorChanges>("Qt",4,7,"AnchorChanges");
qmlRegisterType<QDeclarativeBehavior>("Qt",4,7,"Behavior");