From c4e491387007d89f86b6adb6ea0609842a3a2a4b Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Fri, 3 Dec 2010 17:04:29 +0100 Subject: 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 --- src/plugins/qmlprojectmanager/qmlprojectapplicationwizard.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/plugins/qmlprojectmanager/qmlprojectapplicationwizard.cpp') 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 #include #include @@ -39,6 +40,7 @@ #include #include +#include #include #include @@ -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 -- cgit v1.2.1