forked from qt-creator/qt-creator
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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user