diff options
author | Kai Koehne <kai.koehne@nokia.com> | 2010-12-03 17:04:29 +0100 |
---|---|---|
committer | Kai Koehne <kai.koehne@nokia.com> | 2010-12-08 15:08:49 +0100 |
commit | c4e491387007d89f86b6adb6ea0609842a3a2a4b (patch) | |
tree | 2b9f6db5ff29a034f84eaf06885f5e4f0b19694a /src/plugins/qmlprojectmanager/qmlprojectapplicationwizard.cpp | |
parent | efcac96f570662164259e3fd1874e74a07fc1c5f (diff) | |
download | qt-creator-c4e491387007d89f86b6adb6ea0609842a3a2a4b.tar.gz |
QmlProject: Add mainFile property
The mainFile property of QmlProject is the default file to run. People
have still the opportunity to override this in their run settings,
though.
The wizard generated code was updated accordingly. Note that this makes
projects generated by the wizard incompatible with QtCreator 2.1!
Task-number: QTCREATORBUG-3249
Diffstat (limited to 'src/plugins/qmlprojectmanager/qmlprojectapplicationwizard.cpp')
-rw-r--r-- | src/plugins/qmlprojectmanager/qmlprojectapplicationwizard.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/plugins/qmlprojectmanager/qmlprojectapplicationwizard.cpp b/src/plugins/qmlprojectmanager/qmlprojectapplicationwizard.cpp index 6c5a072798..85cde496b8 100644 --- a/src/plugins/qmlprojectmanager/qmlprojectapplicationwizard.cpp +++ b/src/plugins/qmlprojectmanager/qmlprojectapplicationwizard.cpp @@ -31,6 +31,7 @@ #include "qmlprojectconstants.h" +#include <coreplugin/coreconstants.h> #include <projectexplorer/customwizard/customwizard.h> #include <qt4projectmanager/qt4projectmanagerconstants.h> @@ -39,6 +40,7 @@ #include <QtGui/QPainter> #include <QtGui/QPixmap> +#include <QtCore/QDir> #include <QtCore/QTextStream> #include <QtCore/QCoreApplication> @@ -141,12 +143,16 @@ Core::GeneratedFiles QmlProjectApplicationWizard::generateFiles(const QWizard *w out //: Comment added to generated .qmlproject file - << "/* " << tr("File generated by QtCreator", "qmlproject Template") << " */" << endl + << "/* " + << tr("File generated by QtCreator, version %1", + "qmlproject Template").arg(Core::Constants::IDE_VERSION_LONG) << " */" << endl << endl - << "import QmlProject 1.0" << endl + << "import QmlProject 1.1" << endl << endl << "Project {" << endl //: Comment added to generated .qmlproject file + << " mainFile: \"" << QDir(projectPath).relativeFilePath(mainFileName) << "\"" << endl + << endl << " /* " << tr("Include .qml, .js, and image files from current directory and subdirectories", "qmlproject Template") << " */" << endl << " QmlFiles {" << endl << " directory: \".\"" << endl |