diff --git a/share/qtcreator/templates/qtquickapp/qmlapplicationviewer/qmlapplicationviewer.cpp b/share/qtcreator/templates/qtquickapp/qmlapplicationviewer/qmlapplicationviewer.cpp index 68613375665..a8a7ccb5ceb 100644 --- a/share/qtcreator/templates/qtquickapp/qmlapplicationviewer/qmlapplicationviewer.cpp +++ b/share/qtcreator/templates/qtquickapp/qmlapplicationviewer/qmlapplicationviewer.cpp @@ -116,6 +116,7 @@ void QmlApplicationViewer::addImportPath(const QString &path) void QmlApplicationViewer::setOrientation(ScreenOrientation orientation) { +#if QT_VERSION < 0x050000 #if defined(Q_OS_SYMBIAN) // If the version of Qt on the device is < 4.7.2, that attribute won't work if (orientation != ScreenOrientationAuto) { @@ -155,6 +156,9 @@ void QmlApplicationViewer::setOrientation(ScreenOrientation orientation) #endif // QT_VERSION < 0x040702 }; setAttribute(attribute, true); +#else // QT_VERSION < 0x050000 + Q_UNUSED(orientation) +#endif // QT_VERSION < 0x050000 } void QmlApplicationViewer::showExpanded() diff --git a/share/qtcreator/templates/qtquickapp/qmlapplicationviewer/qmlapplicationviewer.pri b/share/qtcreator/templates/qtquickapp/qmlapplicationviewer/qmlapplicationviewer.pri index a32c88d1ae9..0fd61405edd 100644 --- a/share/qtcreator/templates/qtquickapp/qmlapplicationviewer/qmlapplicationviewer.pri +++ b/share/qtcreator/templates/qtquickapp/qmlapplicationviewer/qmlapplicationviewer.pri @@ -4,7 +4,11 @@ # It is recommended not to modify this file, since newer versions of Qt Creator # may offer an updated version of it. -QT += declarative +equals(QT_MAJOR_VERSION, 5) { + QT += quick1 +} else { + QT += declarative +} SOURCES += $$PWD/qmlapplicationviewer.cpp HEADERS += $$PWD/qmlapplicationviewer.h diff --git a/src/plugins/qt4projectmanager/wizards/qtquickapp.cpp b/src/plugins/qt4projectmanager/wizards/qtquickapp.cpp index 5abba5fa3a5..68e12e8c3dc 100644 --- a/src/plugins/qt4projectmanager/wizards/qtquickapp.cpp +++ b/src/plugins/qt4projectmanager/wizards/qtquickapp.cpp @@ -463,7 +463,7 @@ QString QtQuickApp::componentSetDir(ComponentSet componentSet) const } } -const int QtQuickApp::StubVersion = 21; +const int QtQuickApp::StubVersion = 22; } // namespace Internal } // namespace Qt4ProjectManager