summaryrefslogtreecommitdiff
path: root/src/plugins/qt4projectmanager
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@digia.com>2013-10-16 17:18:07 +0200
committerKai Koehne <kai.koehne@digia.com>2013-10-24 16:58:23 +0200
commit9b88e0db32c1e1861d11de9fe186ad360d3716cb (patch)
tree0863561b79c7880effe0057673c30c683bd64fb6 /src/plugins/qt4projectmanager
parentac6aa54f6dad9c2f7c9886ebd46f6a1c3750032a (diff)
downloadqt-creator-9b88e0db32c1e1861d11de9fe186ad360d3716cb.tar.gz
Update file/directory names for Qt Quick 1 template
Make the names in line with the Qt Quick 2 ones. Also, changing the directory/filename makes sure the update mechanism of Qt Creator doesn't update apps generated by the 2.x wizard any more, which might break stuff. Change-Id: I4621d5f35eae2102aeba7e77c5cd903511be249f Reviewed-by: Jarek Kobus <jaroslaw.kobus@digia.com>
Diffstat (limited to 'src/plugins/qt4projectmanager')
-rw-r--r--src/plugins/qt4projectmanager/wizards/qtquickapp.cpp32
1 files changed, 24 insertions, 8 deletions
diff --git a/src/plugins/qt4projectmanager/wizards/qtquickapp.cpp b/src/plugins/qt4projectmanager/wizards/qtquickapp.cpp
index b252083f89..5965088f25 100644
--- a/src/plugins/qt4projectmanager/wizards/qtquickapp.cpp
+++ b/src/plugins/qt4projectmanager/wizards/qtquickapp.cpp
@@ -29,6 +29,9 @@
#include "qtquickapp.h"
+#include <utils/qtcassert.h>
+
+#include <QDebug>
#include <QDir>
#include <QFile>
#include <QTextStream>
@@ -113,15 +116,25 @@ QString QtQuickApp::originsRoot() const
switch (m_componentSet) {
case QtQuickControls10: return templatesRoot() + QLatin1String("qtquick2controls/");
case QtQuick20Components: return templatesRoot() + QLatin1String("qtquick2app/");
- default: break;
+ case QtQuick10Components: return templatesRoot() + QLatin1String("qtquick1app/");
}
- return templatesRoot() + QLatin1String("qtquickapp/");
+ qWarning() << "QtQuickApp::originsRoot() - unhandled component set"
+ << m_componentSet;
+ return QString();
}
QString QtQuickApp::mainWindowClassName() const
{
- return QLatin1String("QmlApplicationViewer");
+ switch (m_componentSet) {
+ case QtQuickControls10: return QLatin1String("QtQuick2ControlsApplicationViewer");
+ case QtQuick20Components: return QLatin1String("QtQuick2ApplicationViewer");
+ case QtQuick10Components: return QLatin1String("QtQuick1ApplicationViewer");
+ }
+
+ qWarning() << "QtQuickApp::mainWindowClassName() - unhandled component set"
+ << m_componentSet;
+ return QString();
}
bool QtQuickApp::adaptCurrentMainCppTemplateLine(QString &line) const
@@ -174,12 +187,15 @@ bool QtQuickApp::useExistingMainQml() const
QString QtQuickApp::appViewerBaseName() const
{
- if (m_componentSet == QtQuick20Components) {
- return QLatin1String("qtquick2applicationviewer");
- } else if (m_componentSet == QtQuickControls10) {
- return QLatin1String("qtquick2controlsapplicationviewer");
+ switch (m_componentSet) {
+ case QtQuickControls10: return QLatin1String("qtquick2controlsapplicationviewer");
+ case QtQuick20Components: return QLatin1String("qtquick2applicationviewer");
+ case QtQuick10Components: return QLatin1String("qtquick1applicationviewer");
}
- return QLatin1String("qmlapplicationviewer");
+
+ qWarning() << "QtQuickApp::appViewerBaseName() - unhandled component set"
+ << m_componentSet;
+ return QString();
}
QString QtQuickApp::fileName(QtQuickApp::ExtendedFileType type) const