forked from qt-creator/qt-creator
Renaming: QmlStandaloneApp* -> QtQuickApp*
This commit is contained in:
@@ -41,7 +41,7 @@
|
||||
#include "profilereader.h"
|
||||
#include "qmakestep.h"
|
||||
#include "qt4buildconfiguration.h"
|
||||
#include "wizards/qmlstandaloneapp.h"
|
||||
#include "wizards/qtquickapp.h"
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
#include <coreplugin/basefilewizard.h>
|
||||
@@ -237,7 +237,7 @@ ProjectExplorer::Project *Qt4Manager::openProject(const QString &fileName)
|
||||
}
|
||||
}
|
||||
|
||||
QmlStandaloneApp app;
|
||||
QtQuickApp app;
|
||||
updateBoilerPlateCodeFiles(&app, canonicalFilePath);
|
||||
|
||||
Qt4Project *pro = new Qt4Project(this, canonicalFilePath);
|
||||
|
||||
@@ -36,13 +36,13 @@ HEADERS += \
|
||||
wizards/filespage.h \
|
||||
wizards/qtwizard.h \
|
||||
wizards/targetsetuppage.h \
|
||||
wizards/qmlstandaloneappwizard.h \
|
||||
wizards/qmlstandaloneappwizardpages.h \
|
||||
wizards/qtquickapp.h \
|
||||
wizards/qtquickappwizard.h \
|
||||
wizards/qtquickappwizardpages.h \
|
||||
wizards/html5app.h \
|
||||
wizards/html5appwizard.h \
|
||||
wizards/html5appwizardpages.h \
|
||||
wizards/abstractmobileapp.h \
|
||||
wizards/qmlstandaloneapp.h \
|
||||
wizards/abstractmobileappwizard.h \
|
||||
wizards/subdirsprojectwizard.h \
|
||||
wizards/subdirsprojectwizarddialog.h \
|
||||
@@ -102,13 +102,13 @@ SOURCES += qt4projectmanagerplugin.cpp \
|
||||
wizards/filespage.cpp \
|
||||
wizards/qtwizard.cpp \
|
||||
wizards/targetsetuppage.cpp \
|
||||
wizards/qmlstandaloneappwizard.cpp \
|
||||
wizards/qmlstandaloneappwizardpages.cpp \
|
||||
wizards/qtquickapp.cpp \
|
||||
wizards/qtquickappwizard.cpp \
|
||||
wizards/qtquickappwizardpages.cpp \
|
||||
wizards/html5app.cpp \
|
||||
wizards/html5appwizard.cpp \
|
||||
wizards/html5appwizardpages.cpp \
|
||||
wizards/abstractmobileapp.cpp \
|
||||
wizards/qmlstandaloneapp.cpp \
|
||||
wizards/abstractmobileappwizard.cpp \
|
||||
wizards/subdirsprojectwizard.cpp \
|
||||
wizards/subdirsprojectwizarddialog.cpp \
|
||||
@@ -143,7 +143,7 @@ FORMS += makestep.ui \
|
||||
gettingstartedwelcomepagewidget.ui \
|
||||
wizards/testwizardpage.ui \
|
||||
wizards/targetsetuppage.ui \
|
||||
wizards/qmlstandaloneappwizardsourcespage.ui \
|
||||
wizards/qtquickappwizardsourcespage.ui \
|
||||
wizards/html5appwizardsourcespage.ui \
|
||||
wizards/mobilelibrarywizardoptionpage.ui \
|
||||
wizards/mobileappwizardgenericoptionspage.ui \
|
||||
|
||||
@@ -131,7 +131,7 @@ const char * const QT_SIMULATOR_TARGET_ID = "Qt4ProjectManager.Target.QtSimulato
|
||||
// ICONS
|
||||
const char * const ICON_QT_PROJECT = ":/qt4projectmanager/images/qt_project.png";
|
||||
const char * const ICON_WINDOW = ":/qt4projectmanager/images/window.png";
|
||||
const char * const ICON_QML_STANDALONE = ":/wizards/images/qml_standalone.png";
|
||||
const char * const ICON_QTQUICK_APP = ":/wizards/images/qtquickapp.png";
|
||||
|
||||
// Env variables
|
||||
const char * const QMAKEVAR_QMLJSDEBUGGER_PATH = "QMLJSDEBUGGER_PATH";
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
#include "wizards/testwizard.h"
|
||||
#include "wizards/emptyprojectwizard.h"
|
||||
#include "wizards/subdirsprojectwizard.h"
|
||||
#include "wizards/qmlstandaloneappwizard.h"
|
||||
#include "wizards/qtquickappwizard.h"
|
||||
#include "wizards/html5appwizard.h"
|
||||
#include "customwidgetwizard/customwidgetwizard.h"
|
||||
#include "profileeditorfactory.h"
|
||||
@@ -145,7 +145,7 @@ bool Qt4ProjectManagerPlugin::initialize(const QStringList &arguments, QString *
|
||||
addAutoReleasedObject(new GuiAppWizard);
|
||||
addAutoReleasedObject(new ConsoleAppWizard);
|
||||
addAutoReleasedObject(new MobileAppWizard);
|
||||
addAutoReleasedObject(new QmlStandaloneAppWizard());
|
||||
addAutoReleasedObject(new QtQuickAppWizard);
|
||||
addAutoReleasedObject(new Html5AppWizard);
|
||||
addAutoReleasedObject(new LibraryWizard);
|
||||
addAutoReleasedObject(new TestWizard);
|
||||
|
||||
@@ -325,7 +325,7 @@ bool AbstractMobileApp::updateFiles(const QList<AbstractGeneratedFileInfo> &list
|
||||
QFile file(info.fileInfo.absoluteFilePath());
|
||||
if (!file.open(QIODevice::WriteOnly) || file.write(data) == -1) {
|
||||
error = QCoreApplication::translate(
|
||||
"Qt4ProjectManager::Internal::QmlStandaloneApp",
|
||||
"Qt4ProjectManager::Internal::QtQuickApp",
|
||||
"Could not write file '%1'.").
|
||||
arg(QDir::toNativeSeparators(info.fileInfo.canonicalFilePath()));
|
||||
return false;
|
||||
@@ -335,8 +335,8 @@ bool AbstractMobileApp::updateFiles(const QList<AbstractGeneratedFileInfo> &list
|
||||
}
|
||||
|
||||
#ifndef CREATORLESSTEST
|
||||
// The definition of QmlStandaloneApp::templatesRoot() for
|
||||
// CREATORLESSTEST is in tests/manual/qmlstandalone/main.cpp
|
||||
// The definition of QtQuickApp::templatesRoot() for
|
||||
// CREATORLESSTEST is in tests/manual/appwizards/helpers.cpp
|
||||
QString AbstractMobileApp::templatesRoot()
|
||||
{
|
||||
return Core::ICore::instance()->resourcePath()
|
||||
|
||||
@@ -99,7 +99,7 @@ Html5AppWizard::~Html5AppWizard()
|
||||
Core::BaseFileWizardParameters Html5AppWizard::parameters()
|
||||
{
|
||||
Core::BaseFileWizardParameters parameters(ProjectWizard);
|
||||
parameters.setIcon(QIcon(QLatin1String(Constants::ICON_QML_STANDALONE)));
|
||||
parameters.setIcon(QIcon(QLatin1String(Constants::ICON_QT_PROJECT)));
|
||||
parameters.setDisplayName(tr("Html5 Application"));
|
||||
parameters.setId(QLatin1String("QA.HTML5A Application"));
|
||||
parameters.setDescription(tr("Creates an Html5 application project that can contain "
|
||||
|
||||
|
Before Width: | Height: | Size: 586 B After Width: | Height: | Size: 586 B |
@@ -31,7 +31,7 @@
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
#include "qmlstandaloneapp.h"
|
||||
#include "qtquickapp.h"
|
||||
|
||||
#include <QtCore/QDir>
|
||||
#include <QtCore/QFile>
|
||||
@@ -55,12 +55,12 @@ const QString appViewerHFileName(appViewerBaseName + QLatin1String(".h"));
|
||||
const QString appViewerOriginsSubDir(appViewerBaseName + QLatin1Char('/'));
|
||||
|
||||
QmlModule::QmlModule(const QString &uri, const QFileInfo &rootDir, const QFileInfo &qmldir,
|
||||
bool isExternal, QmlStandaloneApp *qmlStandaloneApp)
|
||||
bool isExternal, QtQuickApp *qtQuickApp)
|
||||
: uri(uri)
|
||||
, rootDir(rootDir)
|
||||
, qmldir(qmldir)
|
||||
, isExternal(isExternal)
|
||||
, qmlStandaloneApp(qmlStandaloneApp)
|
||||
, qtQuickApp(qtQuickApp)
|
||||
{}
|
||||
|
||||
QString QmlModule::path(Path path) const
|
||||
@@ -70,7 +70,7 @@ QString QmlModule::path(Path path) const
|
||||
return rootDir.canonicalFilePath();
|
||||
}
|
||||
case ContentDir: {
|
||||
const QDir proFile(qmlStandaloneApp->path(QmlStandaloneApp::AppProPath));
|
||||
const QDir proFile(qtQuickApp->path(QtQuickApp::AppProPath));
|
||||
return proFile.relativeFilePath(qmldir.canonicalPath());
|
||||
}
|
||||
case ContentBase: {
|
||||
@@ -81,7 +81,7 @@ QString QmlModule::path(Path path) const
|
||||
return localContentDir.right(localContentDir.length() - localRoot.length());
|
||||
}
|
||||
case DeployedContentBase: {
|
||||
const QString modulesDir = qmlStandaloneApp->path(QmlStandaloneApp::ModulesDir);
|
||||
const QString modulesDir = qtQuickApp->path(QtQuickApp::ModulesDir);
|
||||
return modulesDir + QLatin1Char('/') + this->path(ContentBase);
|
||||
}
|
||||
default: qFatal("QmlModule::path() needs more work");
|
||||
@@ -98,26 +98,26 @@ QmlCppPlugin::QmlCppPlugin(const QString &name, const QFileInfo &path,
|
||||
{
|
||||
}
|
||||
|
||||
QmlStandaloneApp::QmlStandaloneApp() : AbstractMobileApp()
|
||||
QtQuickApp::QtQuickApp() : AbstractMobileApp()
|
||||
{
|
||||
}
|
||||
|
||||
QmlStandaloneApp::~QmlStandaloneApp()
|
||||
QtQuickApp::~QtQuickApp()
|
||||
{
|
||||
clearModulesAndPlugins();
|
||||
}
|
||||
|
||||
void QmlStandaloneApp::setMainQmlFile(const QString &qmlFile)
|
||||
void QtQuickApp::setMainQmlFile(const QString &qmlFile)
|
||||
{
|
||||
m_mainQmlFile.setFile(qmlFile);
|
||||
}
|
||||
|
||||
QString QmlStandaloneApp::mainQmlFile() const
|
||||
QString QtQuickApp::mainQmlFile() const
|
||||
{
|
||||
return path(MainQml);
|
||||
}
|
||||
|
||||
bool QmlStandaloneApp::setExternalModules(const QStringList &uris,
|
||||
bool QtQuickApp::setExternalModules(const QStringList &uris,
|
||||
const QStringList &importPaths)
|
||||
{
|
||||
clearModulesAndPlugins();
|
||||
@@ -158,7 +158,7 @@ bool QmlStandaloneApp::setExternalModules(const QStringList &uris,
|
||||
return true;
|
||||
}
|
||||
|
||||
QString QmlStandaloneApp::pathExtended(int fileType) const
|
||||
QString QtQuickApp::pathExtended(int fileType) const
|
||||
{
|
||||
QString cleanProjectName = projectName().replace(QLatin1Char('-'), QString());
|
||||
const QString qmlSubDir = QLatin1String("qml/")
|
||||
@@ -190,17 +190,17 @@ QString QmlStandaloneApp::pathExtended(int fileType) const
|
||||
return QString();
|
||||
}
|
||||
|
||||
QString QmlStandaloneApp::originsRoot() const
|
||||
QString QtQuickApp::originsRoot() const
|
||||
{
|
||||
return templatesRoot() + QLatin1String("qmlapp/");
|
||||
}
|
||||
|
||||
QString QmlStandaloneApp::mainWindowClassName() const
|
||||
QString QtQuickApp::mainWindowClassName() const
|
||||
{
|
||||
return QLatin1String("QmlApplicationViewer");
|
||||
}
|
||||
|
||||
bool QmlStandaloneApp::adaptCurrentMainCppTemplateLine(QString &line) const
|
||||
bool QtQuickApp::adaptCurrentMainCppTemplateLine(QString &line) const
|
||||
{
|
||||
const QLatin1Char quote('"');
|
||||
bool adaptLine = true;
|
||||
@@ -215,7 +215,7 @@ bool QmlStandaloneApp::adaptCurrentMainCppTemplateLine(QString &line) const
|
||||
return adaptLine;
|
||||
}
|
||||
|
||||
void QmlStandaloneApp::handleCurrentProFileTemplateLine(const QString &line,
|
||||
void QtQuickApp::handleCurrentProFileTemplateLine(const QString &line,
|
||||
QTextStream &proFileTemplate, QTextStream &proFile,
|
||||
bool &uncommentNextLine) const
|
||||
{
|
||||
@@ -267,7 +267,7 @@ void QmlStandaloneApp::handleCurrentProFileTemplateLine(const QString &line,
|
||||
}
|
||||
}
|
||||
|
||||
void QmlStandaloneApp::clearModulesAndPlugins()
|
||||
void QtQuickApp::clearModulesAndPlugins()
|
||||
{
|
||||
qDeleteAll(m_modules);
|
||||
m_modules.clear();
|
||||
@@ -275,7 +275,7 @@ void QmlStandaloneApp::clearModulesAndPlugins()
|
||||
m_cppPlugins.clear();
|
||||
}
|
||||
|
||||
bool QmlStandaloneApp::addCppPlugin(const QString &qmldirLine, QmlModule *module)
|
||||
bool QtQuickApp::addCppPlugin(const QString &qmldirLine, QmlModule *module)
|
||||
{
|
||||
const QStringList qmldirLineElements =
|
||||
qmldirLine.split(QLatin1Char(' '), QString::SkipEmptyParts);
|
||||
@@ -321,7 +321,7 @@ bool QmlStandaloneApp::addCppPlugin(const QString &qmldirLine, QmlModule *module
|
||||
return true;
|
||||
}
|
||||
|
||||
bool QmlStandaloneApp::addCppPlugins(QmlModule *module)
|
||||
bool QtQuickApp::addCppPlugins(QmlModule *module)
|
||||
{
|
||||
QFile qmlDirFile(module->qmldir.absoluteFilePath());
|
||||
if (qmlDirFile.open(QIODevice::ReadOnly)) {
|
||||
@@ -336,7 +336,7 @@ bool QmlStandaloneApp::addCppPlugins(QmlModule *module)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool QmlStandaloneApp::addExternalModule(const QString &name, const QFileInfo &dir,
|
||||
bool QtQuickApp::addExternalModule(const QString &name, const QFileInfo &dir,
|
||||
const QFileInfo &contentDir)
|
||||
{
|
||||
QmlModule *module = new QmlModule(name, dir, contentDir, true, this);
|
||||
@@ -345,51 +345,51 @@ bool QmlStandaloneApp::addExternalModule(const QString &name, const QFileInfo &d
|
||||
}
|
||||
|
||||
#ifndef CREATORLESSTEST
|
||||
Core::GeneratedFiles QmlStandaloneApp::generateFiles(QString *errorMessage) const
|
||||
Core::GeneratedFiles QtQuickApp::generateFiles(QString *errorMessage) const
|
||||
{
|
||||
Core::GeneratedFiles files = AbstractMobileApp::generateFiles(errorMessage);
|
||||
if (!useExistingMainQml()) {
|
||||
files.append(file(generateFile(QmlAppGeneratedFileInfo::MainQmlFile, errorMessage), path(MainQml)));
|
||||
files.append(file(generateFile(QtQuickAppGeneratedFileInfo::MainQmlFile, errorMessage), path(MainQml)));
|
||||
files.last().setAttributes(Core::GeneratedFile::OpenEditorAttribute);
|
||||
}
|
||||
|
||||
files.append(file(generateFile(QmlAppGeneratedFileInfo::AppViewerPriFile, errorMessage), path(AppViewerPri)));
|
||||
files.append(file(generateFile(QmlAppGeneratedFileInfo::AppViewerCppFile, errorMessage), path(AppViewerCpp)));
|
||||
files.append(file(generateFile(QmlAppGeneratedFileInfo::AppViewerHFile, errorMessage), path(AppViewerH)));
|
||||
files.append(file(generateFile(QtQuickAppGeneratedFileInfo::AppViewerPriFile, errorMessage), path(AppViewerPri)));
|
||||
files.append(file(generateFile(QtQuickAppGeneratedFileInfo::AppViewerCppFile, errorMessage), path(AppViewerCpp)));
|
||||
files.append(file(generateFile(QtQuickAppGeneratedFileInfo::AppViewerHFile, errorMessage), path(AppViewerH)));
|
||||
|
||||
return files;
|
||||
}
|
||||
#endif // CREATORLESSTEST
|
||||
|
||||
bool QmlStandaloneApp::useExistingMainQml() const
|
||||
bool QtQuickApp::useExistingMainQml() const
|
||||
{
|
||||
return !m_mainQmlFile.filePath().isEmpty();
|
||||
}
|
||||
|
||||
const QList<QmlModule*> QmlStandaloneApp::modules() const
|
||||
const QList<QmlModule*> QtQuickApp::modules() const
|
||||
{
|
||||
return m_modules;
|
||||
}
|
||||
|
||||
QByteArray QmlStandaloneApp::generateFileExtended(int fileType,
|
||||
QByteArray QtQuickApp::generateFileExtended(int fileType,
|
||||
bool *versionAndCheckSum, QString *comment, QString *errorMessage) const
|
||||
{
|
||||
QByteArray data;
|
||||
switch (fileType) {
|
||||
case QmlAppGeneratedFileInfo::MainQmlFile:
|
||||
case QtQuickAppGeneratedFileInfo::MainQmlFile:
|
||||
data = readBlob(path(MainQmlOrigin), errorMessage);
|
||||
break;
|
||||
case QmlAppGeneratedFileInfo::AppViewerPriFile:
|
||||
case QtQuickAppGeneratedFileInfo::AppViewerPriFile:
|
||||
data = readBlob(path(AppViewerPriOrigin), errorMessage);
|
||||
data.append(readBlob(path(DeploymentPriOrigin), errorMessage));
|
||||
*comment = ProFileComment;
|
||||
*versionAndCheckSum = true;
|
||||
break;
|
||||
case QmlAppGeneratedFileInfo::AppViewerCppFile:
|
||||
case QtQuickAppGeneratedFileInfo::AppViewerCppFile:
|
||||
data = readBlob(path(AppViewerCppOrigin), errorMessage);
|
||||
*versionAndCheckSum = true;
|
||||
break;
|
||||
case QmlAppGeneratedFileInfo::AppViewerHFile:
|
||||
case QtQuickAppGeneratedFileInfo::AppViewerHFile:
|
||||
default:
|
||||
data = readBlob(path(AppViewerHOrigin), errorMessage);
|
||||
*versionAndCheckSum = true;
|
||||
@@ -398,21 +398,21 @@ QByteArray QmlStandaloneApp::generateFileExtended(int fileType,
|
||||
return data;
|
||||
}
|
||||
|
||||
int QmlStandaloneApp::stubVersionMinor() const
|
||||
int QtQuickApp::stubVersionMinor() const
|
||||
{
|
||||
return StubVersion;
|
||||
}
|
||||
|
||||
QList<AbstractGeneratedFileInfo> QmlStandaloneApp::updateableFiles(const QString &mainProFile) const
|
||||
QList<AbstractGeneratedFileInfo> QtQuickApp::updateableFiles(const QString &mainProFile) const
|
||||
{
|
||||
QList<AbstractGeneratedFileInfo> result;
|
||||
static const struct {
|
||||
int fileType;
|
||||
QString fileName;
|
||||
} files[] = {
|
||||
{QmlAppGeneratedFileInfo::AppViewerPriFile, appViewerPriFileName},
|
||||
{QmlAppGeneratedFileInfo::AppViewerHFile, appViewerHFileName},
|
||||
{QmlAppGeneratedFileInfo::AppViewerCppFile, appViewerCppFileName}
|
||||
{QtQuickAppGeneratedFileInfo::AppViewerPriFile, appViewerPriFileName},
|
||||
{QtQuickAppGeneratedFileInfo::AppViewerHFile, appViewerHFileName},
|
||||
{QtQuickAppGeneratedFileInfo::AppViewerCppFile, appViewerCppFileName}
|
||||
};
|
||||
const QFileInfo mainProFileInfo(mainProFile);
|
||||
const int size = sizeof(files) / sizeof(files[0]);
|
||||
@@ -421,10 +421,10 @@ QList<AbstractGeneratedFileInfo> QmlStandaloneApp::updateableFiles(const QString
|
||||
+ QLatin1Char('/') + appViewerOriginsSubDir + files[i].fileName;
|
||||
if (!QFile::exists(fileName))
|
||||
continue;
|
||||
QmlAppGeneratedFileInfo file;
|
||||
QtQuickAppGeneratedFileInfo file;
|
||||
file.fileType = files[i].fileType;
|
||||
file.fileInfo = QFileInfo(fileName);
|
||||
file.currentVersion = AbstractMobileApp::makeStubVersion(QmlStandaloneApp::StubVersion);
|
||||
file.currentVersion = AbstractMobileApp::makeStubVersion(QtQuickApp::StubVersion);
|
||||
result.append(file);
|
||||
}
|
||||
if (result.count() != size)
|
||||
@@ -432,7 +432,7 @@ QList<AbstractGeneratedFileInfo> QmlStandaloneApp::updateableFiles(const QString
|
||||
return result;
|
||||
}
|
||||
|
||||
const int QmlStandaloneApp::StubVersion = 10;
|
||||
const int QtQuickApp::StubVersion = 10;
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Qt4ProjectManager
|
||||
@@ -31,8 +31,8 @@
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
#ifndef QMLSTANDALONEAPP_H
|
||||
#define QMLSTANDALONEAPP_H
|
||||
#ifndef QTQUICKAPP_H
|
||||
#define QTQUICKAPP_H
|
||||
|
||||
#include "abstractmobileapp.h"
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
namespace Qt4ProjectManager {
|
||||
namespace Internal {
|
||||
|
||||
class QmlStandaloneApp;
|
||||
class QtQuickApp;
|
||||
|
||||
struct QmlModule
|
||||
{
|
||||
@@ -57,13 +57,13 @@ struct QmlModule
|
||||
};
|
||||
|
||||
QmlModule(const QString &name, const QFileInfo &rootDir, const QFileInfo &qmldir,
|
||||
bool isExternal, QmlStandaloneApp *qmlStandaloneApp);
|
||||
bool isExternal, QtQuickApp *qtQuickApp);
|
||||
QString path(Path path) const;
|
||||
const QString uri; // "com.foo.bar"
|
||||
const QFileInfo rootDir; // Location of "com/"
|
||||
const QFileInfo qmldir; // 'qmldir' file.
|
||||
const bool isExternal; // Either external or inside a source paths
|
||||
const QmlStandaloneApp *qmlStandaloneApp;
|
||||
const QtQuickApp *qtQuickApp;
|
||||
QHash<QString, struct QmlCppPlugin*> cppPlugins; // Just as info. No ownership.
|
||||
};
|
||||
|
||||
@@ -77,7 +77,7 @@ struct QmlCppPlugin
|
||||
const QFileInfo proFile; // .pro file for the plugin
|
||||
};
|
||||
|
||||
struct QmlAppGeneratedFileInfo : public AbstractGeneratedFileInfo
|
||||
struct QtQuickAppGeneratedFileInfo : public AbstractGeneratedFileInfo
|
||||
{
|
||||
enum ExtendedFileType {
|
||||
MainQmlFile = ExtendedFile,
|
||||
@@ -86,10 +86,10 @@ struct QmlAppGeneratedFileInfo : public AbstractGeneratedFileInfo
|
||||
AppViewerHFile
|
||||
};
|
||||
|
||||
QmlAppGeneratedFileInfo() : AbstractGeneratedFileInfo() {}
|
||||
QtQuickAppGeneratedFileInfo() : AbstractGeneratedFileInfo() {}
|
||||
};
|
||||
|
||||
class QmlStandaloneApp : public AbstractMobileApp
|
||||
class QtQuickApp : public AbstractMobileApp
|
||||
{
|
||||
public:
|
||||
enum ExtendedFileType {
|
||||
@@ -107,8 +107,8 @@ public:
|
||||
ModulesDir
|
||||
};
|
||||
|
||||
QmlStandaloneApp();
|
||||
virtual ~QmlStandaloneApp();
|
||||
QtQuickApp();
|
||||
virtual ~QtQuickApp();
|
||||
|
||||
void setMainQmlFile(const QString &qmlFile);
|
||||
QString mainQmlFile() const;
|
||||
@@ -152,4 +152,4 @@ private:
|
||||
} // namespace Internal
|
||||
} // namespace Qt4ProjectManager
|
||||
|
||||
#endif // QMLSTANDALONEAPP_H
|
||||
#endif // QTQUICKAPP_H
|
||||
@@ -33,9 +33,9 @@
|
||||
|
||||
#include "mobileappwizardpages.h"
|
||||
|
||||
#include "qmlstandaloneapp.h"
|
||||
#include "qmlstandaloneappwizard.h"
|
||||
#include "qmlstandaloneappwizardpages.h"
|
||||
#include "qtquickapp.h"
|
||||
#include "qtquickappwizard.h"
|
||||
#include "qtquickappwizardpages.h"
|
||||
#include "targetsetuppage.h"
|
||||
|
||||
#include "qt4projectmanagerconstants.h"
|
||||
@@ -59,8 +59,8 @@ public:
|
||||
explicit QmlStandaloneAppWizardDialog(QWidget *parent = 0);
|
||||
|
||||
private:
|
||||
class QmlStandaloneAppWizardSourcesPage *m_qmlSourcesPage;
|
||||
friend class QmlStandaloneAppWizard;
|
||||
class QtQuickAppWizardSourcesPage *m_qmlSourcesPage;
|
||||
friend class QtQuickAppWizard;
|
||||
};
|
||||
|
||||
QmlStandaloneAppWizardDialog::QmlStandaloneAppWizardDialog(QWidget *parent)
|
||||
@@ -70,36 +70,36 @@ QmlStandaloneAppWizardDialog::QmlStandaloneAppWizardDialog(QWidget *parent)
|
||||
setWindowTitle(tr("New Qt Quick Application"));
|
||||
setIntroDescription(tr("This wizard generates a Qt Quick application project."));
|
||||
|
||||
m_qmlSourcesPage = new QmlStandaloneAppWizardSourcesPage;
|
||||
m_qmlSourcesPage = new QtQuickAppWizardSourcesPage;
|
||||
addPageWithTitle(m_qmlSourcesPage, tr("QML Sources"));
|
||||
}
|
||||
|
||||
|
||||
class QmlStandaloneAppWizardPrivate
|
||||
class QtQuickAppWizardPrivate
|
||||
{
|
||||
class QmlStandaloneApp *standaloneApp;
|
||||
class QtQuickApp *app;
|
||||
class QmlStandaloneAppWizardDialog *wizardDialog;
|
||||
friend class QmlStandaloneAppWizard;
|
||||
friend class QtQuickAppWizard;
|
||||
};
|
||||
|
||||
QmlStandaloneAppWizard::QmlStandaloneAppWizard()
|
||||
QtQuickAppWizard::QtQuickAppWizard()
|
||||
: AbstractMobileAppWizard(parameters())
|
||||
, m_d(new QmlStandaloneAppWizardPrivate)
|
||||
, m_d(new QtQuickAppWizardPrivate)
|
||||
{
|
||||
m_d->standaloneApp = new QmlStandaloneApp;
|
||||
m_d->app = new QtQuickApp;
|
||||
m_d->wizardDialog = 0;
|
||||
}
|
||||
|
||||
QmlStandaloneAppWizard::~QmlStandaloneAppWizard()
|
||||
QtQuickAppWizard::~QtQuickAppWizard()
|
||||
{
|
||||
delete m_d->standaloneApp;
|
||||
delete m_d->app;
|
||||
delete m_d;
|
||||
}
|
||||
|
||||
Core::BaseFileWizardParameters QmlStandaloneAppWizard::parameters()
|
||||
Core::BaseFileWizardParameters QtQuickAppWizard::parameters()
|
||||
{
|
||||
Core::BaseFileWizardParameters parameters(ProjectWizard);
|
||||
parameters.setIcon(QIcon(QLatin1String(Constants::ICON_QML_STANDALONE)));
|
||||
parameters.setIcon(QIcon(QLatin1String(Constants::ICON_QTQUICK_APP)));
|
||||
parameters.setDisplayName(tr("Qt Quick Application"));
|
||||
parameters.setId(QLatin1String("QA.QMLA Application"));
|
||||
parameters.setDescription(tr("Creates a Qt Quick application project that can contain "
|
||||
@@ -114,13 +114,13 @@ Core::BaseFileWizardParameters QmlStandaloneAppWizard::parameters()
|
||||
return parameters;
|
||||
}
|
||||
|
||||
AbstractMobileAppWizardDialog *QmlStandaloneAppWizard::createWizardDialogInternal(QWidget *parent) const
|
||||
AbstractMobileAppWizardDialog *QtQuickAppWizard::createWizardDialogInternal(QWidget *parent) const
|
||||
{
|
||||
m_d->wizardDialog = new QmlStandaloneAppWizardDialog(parent);
|
||||
return m_d->wizardDialog;
|
||||
}
|
||||
|
||||
void QmlStandaloneAppWizard::projectPathChanged(const QString &path) const
|
||||
void QtQuickAppWizard::projectPathChanged(const QString &path) const
|
||||
{
|
||||
const QList<TargetSetupPage::ImportInfo> &qtVersions
|
||||
= TargetSetupPage::importInfosForKnownQtVersions(path);
|
||||
@@ -139,33 +139,33 @@ void QmlStandaloneAppWizard::projectPathChanged(const QString &path) const
|
||||
m_d->wizardDialog->m_targetsPage->setImportInfos(qmlQtVersions);
|
||||
}
|
||||
|
||||
void QmlStandaloneAppWizard::prepareGenerateFiles(const QWizard *w,
|
||||
void QtQuickAppWizard::prepareGenerateFiles(const QWizard *w,
|
||||
QString *errorMessage) const
|
||||
{
|
||||
Q_UNUSED(errorMessage)
|
||||
const QmlStandaloneAppWizardDialog *wizard = qobject_cast<const QmlStandaloneAppWizardDialog*>(w);
|
||||
const QString mainQmlFile = wizard->m_qmlSourcesPage->mainQmlFile();
|
||||
m_d->standaloneApp->setMainQmlFile(mainQmlFile);
|
||||
m_d->app->setMainQmlFile(mainQmlFile);
|
||||
}
|
||||
|
||||
bool QmlStandaloneAppWizard::postGenerateFilesInternal(const Core::GeneratedFiles &l,
|
||||
bool QtQuickAppWizard::postGenerateFilesInternal(const Core::GeneratedFiles &l,
|
||||
QString *errorMessage)
|
||||
{
|
||||
const bool success = ProjectExplorer::CustomProjectWizard::postGenerateOpen(l, errorMessage);
|
||||
if (success && !m_d->standaloneApp->mainQmlFile().isEmpty()) {
|
||||
ProjectExplorer::ProjectExplorerPlugin::instance()->setCurrentFile(0, m_d->standaloneApp->mainQmlFile());
|
||||
Core::EditorManager::instance()->openEditor(m_d->standaloneApp->mainQmlFile(),
|
||||
if (success && !m_d->app->mainQmlFile().isEmpty()) {
|
||||
ProjectExplorer::ProjectExplorerPlugin::instance()->setCurrentFile(0, m_d->app->mainQmlFile());
|
||||
Core::EditorManager::instance()->openEditor(m_d->app->mainQmlFile(),
|
||||
QString(), Core::EditorManager::ModeSwitch);
|
||||
}
|
||||
return success;
|
||||
}
|
||||
|
||||
AbstractMobileApp *QmlStandaloneAppWizard::app() const
|
||||
AbstractMobileApp *QtQuickAppWizard::app() const
|
||||
{
|
||||
return m_d->standaloneApp;
|
||||
return m_d->app;
|
||||
}
|
||||
|
||||
AbstractMobileAppWizardDialog *QmlStandaloneAppWizard::wizardDialog() const
|
||||
AbstractMobileAppWizardDialog *QtQuickAppWizard::wizardDialog() const
|
||||
{
|
||||
return m_d->wizardDialog;
|
||||
}
|
||||
@@ -173,4 +173,4 @@ AbstractMobileAppWizardDialog *QmlStandaloneAppWizard::wizardDialog() const
|
||||
} // namespace Internal
|
||||
} // namespace Qt4ProjectManager
|
||||
|
||||
#include "qmlstandaloneappwizard.moc"
|
||||
#include "qtquickappwizard.moc"
|
||||
@@ -31,21 +31,21 @@
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
#ifndef QMLSTANDALONEAPPWIZARD_H
|
||||
#define QMLSTANDALONEAPPWIZARD_H
|
||||
#ifndef QTQUICKAPPWIZARD_H
|
||||
#define QTQUICKAPPWIZARD_H
|
||||
|
||||
#include "abstractmobileappwizard.h"
|
||||
|
||||
namespace Qt4ProjectManager {
|
||||
namespace Internal {
|
||||
|
||||
class QmlStandaloneAppWizard : public AbstractMobileAppWizard
|
||||
class QtQuickAppWizard : public AbstractMobileAppWizard
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
QmlStandaloneAppWizard();
|
||||
virtual ~QmlStandaloneAppWizard();
|
||||
QtQuickAppWizard();
|
||||
virtual ~QtQuickAppWizard();
|
||||
|
||||
private:
|
||||
static Core::BaseFileWizardParameters parameters();
|
||||
@@ -59,10 +59,10 @@ private:
|
||||
virtual bool postGenerateFilesInternal(const Core::GeneratedFiles &l,
|
||||
QString *errorMessage);
|
||||
|
||||
class QmlStandaloneAppWizardPrivate *m_d;
|
||||
class QtQuickAppWizardPrivate *m_d;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Qt4ProjectManager
|
||||
|
||||
#endif // QMLSTANDALONEAPPWIZARD_H
|
||||
#endif // QTQUICKAPPWIZARD_H
|
||||
@@ -31,8 +31,8 @@
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
#include "qmlstandaloneappwizardpages.h"
|
||||
#include "ui_qmlstandaloneappwizardsourcespage.h"
|
||||
#include "qtquickappwizardpages.h"
|
||||
#include "ui_qtquickappwizardsourcespage.h"
|
||||
#include <coreplugin/coreconstants.h>
|
||||
|
||||
#include <QtGui/QDesktopServices>
|
||||
@@ -43,15 +43,15 @@
|
||||
namespace Qt4ProjectManager {
|
||||
namespace Internal {
|
||||
|
||||
class QmlStandaloneAppWizardSourcesPagePrivate
|
||||
class QtQuickAppWizardSourcesPagePrivate
|
||||
{
|
||||
Ui::QmlStandaloneAppWizardSourcesPage ui;
|
||||
friend class QmlStandaloneAppWizardSourcesPage;
|
||||
Ui::QtQuickAppWizardSourcesPage ui;
|
||||
friend class QtQuickAppWizardSourcesPage;
|
||||
};
|
||||
|
||||
QmlStandaloneAppWizardSourcesPage::QmlStandaloneAppWizardSourcesPage(QWidget *parent)
|
||||
QtQuickAppWizardSourcesPage::QtQuickAppWizardSourcesPage(QWidget *parent)
|
||||
: QWizardPage(parent)
|
||||
, m_d(new QmlStandaloneAppWizardSourcesPagePrivate)
|
||||
, m_d(new QtQuickAppWizardSourcesPagePrivate)
|
||||
{
|
||||
m_d->ui.setupUi(this);
|
||||
m_d->ui.mainQmlFileLineEdit->setExpectedKind(Utils::PathChooser::File);
|
||||
@@ -65,18 +65,18 @@ QmlStandaloneAppWizardSourcesPage::QmlStandaloneAppWizardSourcesPage(QWidget *pa
|
||||
m_d->ui.newQmlRadioButton->setChecked(true);
|
||||
}
|
||||
|
||||
QmlStandaloneAppWizardSourcesPage::~QmlStandaloneAppWizardSourcesPage()
|
||||
QtQuickAppWizardSourcesPage::~QtQuickAppWizardSourcesPage()
|
||||
{
|
||||
delete m_d;
|
||||
}
|
||||
|
||||
QString QmlStandaloneAppWizardSourcesPage::mainQmlFile() const
|
||||
QString QtQuickAppWizardSourcesPage::mainQmlFile() const
|
||||
{
|
||||
return m_d->ui.importExistingQmlRadioButton->isChecked() ?
|
||||
m_d->ui.mainQmlFileLineEdit->path() : QString();
|
||||
}
|
||||
|
||||
bool QmlStandaloneAppWizardSourcesPage::isComplete() const
|
||||
bool QtQuickAppWizardSourcesPage::isComplete() const
|
||||
{
|
||||
return !m_d->ui.importExistingQmlRadioButton->isChecked()
|
||||
|| m_d->ui.mainQmlFileLineEdit->isValid();
|
||||
@@ -31,32 +31,31 @@
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
#ifndef QMLSTANDALONEAPPWIZARDPAGES_H
|
||||
#define QMLSTANDALONEAPPWIZARDPAGES_H
|
||||
#ifndef QTQUICKAPPWIZARDPAGES_H
|
||||
#define QTQUICKAPPWIZARDPAGES_H
|
||||
|
||||
#include <QtGui/QWizardPage>
|
||||
#include "qmlstandaloneapp.h"
|
||||
|
||||
namespace Qt4ProjectManager {
|
||||
namespace Internal {
|
||||
|
||||
class QmlStandaloneAppWizardSourcesPage : public QWizardPage
|
||||
class QtQuickAppWizardSourcesPage : public QWizardPage
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DISABLE_COPY(QmlStandaloneAppWizardSourcesPage)
|
||||
Q_DISABLE_COPY(QtQuickAppWizardSourcesPage)
|
||||
|
||||
public:
|
||||
explicit QmlStandaloneAppWizardSourcesPage(QWidget *parent = 0);
|
||||
virtual ~QmlStandaloneAppWizardSourcesPage();
|
||||
explicit QtQuickAppWizardSourcesPage(QWidget *parent = 0);
|
||||
virtual ~QtQuickAppWizardSourcesPage();
|
||||
|
||||
QString mainQmlFile() const;
|
||||
virtual bool isComplete() const;
|
||||
|
||||
private:
|
||||
class QmlStandaloneAppWizardSourcesPagePrivate *m_d;
|
||||
class QtQuickAppWizardSourcesPagePrivate *m_d;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Qt4ProjectManager
|
||||
|
||||
#endif // QMLSTANDALONEAPPWIZARDPAGES_H
|
||||
#endif // QTQUICKAPPWIZARDPAGES_H
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>QmlStandaloneAppWizardSourcesPage</class>
|
||||
<widget class="QWizardPage" name="QmlStandaloneAppWizardSourcesPage">
|
||||
<class>QtQuickAppWizardSourcesPage</class>
|
||||
<widget class="QWizardPage" name="QtQuickAppWizardSourcesPage">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
@@ -3,6 +3,6 @@
|
||||
<file>images/console.png</file>
|
||||
<file>images/gui.png</file>
|
||||
<file>images/lib.png</file>
|
||||
<file>images/qml_standalone.png</file>
|
||||
<file>images/qtquickapp.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
||||
@@ -4,11 +4,11 @@ DEFINES += \
|
||||
CREATORLESSTEST
|
||||
APPSOURCEDIR = $$CREATORSOURCEDIR/src/plugins/qt4projectmanager/wizards
|
||||
HEADERS += \
|
||||
$$APPSOURCEDIR/qmlstandaloneapp.h \
|
||||
$$APPSOURCEDIR/qtquickapp.h \
|
||||
$$APPSOURCEDIR/html5app.h \
|
||||
$$APPSOURCEDIR/abstractmobileapp.h
|
||||
SOURCES += \
|
||||
$$APPSOURCEDIR/qmlstandaloneapp.cpp \
|
||||
$$APPSOURCEDIR/qtquickapp.cpp \
|
||||
$$APPSOURCEDIR/html5app.cpp \
|
||||
$$APPSOURCEDIR/abstractmobileapp.cpp \
|
||||
main.cpp \
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "qmlstandaloneapp.h"
|
||||
#include "qtquickapp.h"
|
||||
#include "html5app.h"
|
||||
#include <QtCore>
|
||||
|
||||
@@ -14,17 +14,17 @@ static bool writeFile(const QByteArray &data, const QString &targetFile)
|
||||
return file.write(data) != -1;
|
||||
}
|
||||
|
||||
bool QmlStandaloneApp::generateFiles(QString *errorMessage) const
|
||||
bool QtQuickApp::generateFiles(QString *errorMessage) const
|
||||
{
|
||||
return writeFile(generateFile(QmlAppGeneratedFileInfo::MainCppFile, errorMessage), path(MainCpp))
|
||||
&& writeFile(generateFile(QmlAppGeneratedFileInfo::AppProFile, errorMessage), path(AppPro))
|
||||
&& (useExistingMainQml() ? true : writeFile(generateFile(QmlAppGeneratedFileInfo::MainQmlFile, errorMessage), path(MainQml)))
|
||||
&& writeFile(generateFile(QmlAppGeneratedFileInfo::AppViewerPriFile, errorMessage), path(AppViewerPri))
|
||||
&& writeFile(generateFile(QmlAppGeneratedFileInfo::AppViewerCppFile, errorMessage), path(AppViewerCpp))
|
||||
&& writeFile(generateFile(QmlAppGeneratedFileInfo::AppViewerHFile, errorMessage), path(AppViewerH))
|
||||
&& writeFile(generateFile(QmlAppGeneratedFileInfo::SymbianSvgIconFile, errorMessage), path(SymbianSvgIcon))
|
||||
&& writeFile(generateFile(QmlAppGeneratedFileInfo::MaemoPngIconFile, errorMessage), path(MaemoPngIcon))
|
||||
&& writeFile(generateFile(QmlAppGeneratedFileInfo::DesktopFile, errorMessage), path(Desktop));
|
||||
return writeFile(generateFile(QtQuickAppGeneratedFileInfo::MainCppFile, errorMessage), path(MainCpp))
|
||||
&& writeFile(generateFile(QtQuickAppGeneratedFileInfo::AppProFile, errorMessage), path(AppPro))
|
||||
&& (useExistingMainQml() ? true : writeFile(generateFile(QtQuickAppGeneratedFileInfo::MainQmlFile, errorMessage), path(MainQml)))
|
||||
&& writeFile(generateFile(QtQuickAppGeneratedFileInfo::AppViewerPriFile, errorMessage), path(AppViewerPri))
|
||||
&& writeFile(generateFile(QtQuickAppGeneratedFileInfo::AppViewerCppFile, errorMessage), path(AppViewerCpp))
|
||||
&& writeFile(generateFile(QtQuickAppGeneratedFileInfo::AppViewerHFile, errorMessage), path(AppViewerH))
|
||||
&& writeFile(generateFile(QtQuickAppGeneratedFileInfo::SymbianSvgIconFile, errorMessage), path(SymbianSvgIcon))
|
||||
&& writeFile(generateFile(QtQuickAppGeneratedFileInfo::MaemoPngIconFile, errorMessage), path(MaemoPngIcon))
|
||||
&& writeFile(generateFile(QtQuickAppGeneratedFileInfo::DesktopFile, errorMessage), path(Desktop));
|
||||
}
|
||||
|
||||
bool Html5App::generateFiles(QString *errorMessage) const
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
#include "qmlstandaloneapp.h"
|
||||
#include "qtquickapp.h"
|
||||
#include "html5app.h"
|
||||
#include <QtCore>
|
||||
|
||||
@@ -44,7 +44,7 @@ int main(int argc, char *argv[])
|
||||
const QString projectPath = QLatin1String("testprojects");
|
||||
|
||||
{
|
||||
QmlStandaloneApp sAppNew;
|
||||
QtQuickApp sAppNew;
|
||||
sAppNew.setProjectPath(projectPath);
|
||||
sAppNew.setProjectName(QLatin1String("new_qml_app"));
|
||||
if (!sAppNew.generateFiles(&errorMessage))
|
||||
@@ -52,7 +52,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
{
|
||||
QmlStandaloneApp sAppImport01;
|
||||
QtQuickApp sAppImport01;
|
||||
sAppImport01.setProjectPath(projectPath);
|
||||
sAppImport01.setProjectName(QLatin1String("imported_scenario_01"));
|
||||
sAppImport01.setMainQmlFile(QLatin1String("../appwizards/qmlimportscenario_01/myqmlapp.qml"));
|
||||
@@ -62,7 +62,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
{
|
||||
const QString rootPath = QLatin1String("../appwizards/qmlimportscenario_02/");
|
||||
QmlStandaloneApp sAppImport02;
|
||||
QtQuickApp sAppImport02;
|
||||
sAppImport02.setProjectPath(projectPath);
|
||||
sAppImport02.setProjectName(QLatin1String("imported_scenario_02"));
|
||||
sAppImport02.setMainQmlFile(rootPath + QLatin1String("subfolder1/myqmlapp.qml"));
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "qmlstandaloneapp.h"
|
||||
#include "qtquickapp.h"
|
||||
#include <QtCore>
|
||||
|
||||
using namespace Qt4ProjectManager::Internal;
|
||||
@@ -27,14 +27,14 @@ bool processXmlFile(const QString &xmlFile)
|
||||
switch (token) {
|
||||
case QXmlStreamReader::StartElement:
|
||||
if (reader.name() == tag_app) {
|
||||
QmlStandaloneApp qmlApp;
|
||||
QtQuickApp app;
|
||||
QFileInfo projectPath;
|
||||
if (!reader.attributes().hasAttribute(attrib_projectPath)) {
|
||||
qDebug() << "Project without path found";
|
||||
continue;
|
||||
}
|
||||
projectPath = qtDir + reader.attributes().value(attrib_projectPath).toString();
|
||||
qmlApp.setProjectPath(projectPath.absoluteFilePath());
|
||||
app.setProjectPath(projectPath.absoluteFilePath());
|
||||
if (reader.attributes().hasAttribute(attrib_mainQmlFile)) {
|
||||
const QFileInfo qmlFileOrigin(
|
||||
qtDir + reader.attributes().value(attrib_mainQmlFile).toString());
|
||||
@@ -63,25 +63,25 @@ bool processXmlFile(const QString &xmlFile)
|
||||
#else // Q_OS_WIN
|
||||
// Implement me!
|
||||
#endif // Q_OS_WIN
|
||||
qmlApp.setMainQmlFile(qmlTargetPath.absoluteFilePath()
|
||||
app.setMainQmlFile(qmlTargetPath.absoluteFilePath()
|
||||
+ QLatin1Char('/') + qmlFileOrigin.fileName());
|
||||
}
|
||||
qmlApp.setProjectName(reader.attributes().hasAttribute(attrib_projectName)
|
||||
app.setProjectName(reader.attributes().hasAttribute(attrib_projectName)
|
||||
? reader.attributes().value(attrib_projectName).toString()
|
||||
: QFileInfo(qmlApp.mainQmlFile()).baseName());
|
||||
: QFileInfo(app.mainQmlFile()).baseName());
|
||||
if (reader.attributes().hasAttribute(attrib_screenOrientation)) {
|
||||
const QStringRef orientation = reader.attributes().value(attrib_screenOrientation);
|
||||
qmlApp.setOrientation(orientation == value_screenOrientationLockLandscape ?
|
||||
app.setOrientation(orientation == value_screenOrientationLockLandscape ?
|
||||
AbstractMobileApp::ScreenOrientationLockLandscape
|
||||
: orientation == value_screenOrientationLockPortrait ?
|
||||
AbstractMobileApp::ScreenOrientationLockPortrait
|
||||
: AbstractMobileApp::ScreenOrientationAuto);
|
||||
}
|
||||
if (reader.attributes().hasAttribute(attrib_networkAccess))
|
||||
qmlApp.setNetworkEnabled(
|
||||
app.setNetworkEnabled(
|
||||
reader.attributes().value(attrib_networkAccess).toString() == QLatin1String("true"));
|
||||
if (!qmlApp.generateFiles(0))
|
||||
qDebug() << "Unable to generate the files for" << qmlApp.projectName();
|
||||
if (!app.generateFiles(0))
|
||||
qDebug() << "Unable to generate the files for" << app.projectName();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -4,13 +4,15 @@ DEFINES += \
|
||||
CREATORLESSTEST
|
||||
APPSOURCEDIR = $$CREATORSOURCEDIR/src/plugins/qt4projectmanager/wizards
|
||||
HEADERS += \
|
||||
$$APPSOURCEDIR/qmlstandaloneapp.h \
|
||||
$$APPSOURCEDIR/qtquickapp.h \
|
||||
$$APPSOURCEDIR/html5app.h \
|
||||
$$APPSOURCEDIR/abstractmobileapp.h
|
||||
SOURCES += \
|
||||
$$APPSOURCEDIR/qmlstandaloneapp.cpp \
|
||||
$$APPSOURCEDIR/qtquickapp.cpp \
|
||||
$$APPSOURCEDIR/html5app.cpp \
|
||||
$$APPSOURCEDIR/abstractmobileapp.cpp \
|
||||
main.cpp \
|
||||
$$CREATORSOURCEDIR/tests/manual/qmlstandalone/helpers.cpp
|
||||
$$CREATORSOURCEDIR/tests/manual/appwizards/helpers.cpp
|
||||
INCLUDEPATH += $$APPSOURCEDIR
|
||||
OTHER_FILES = qtquickapps.xml
|
||||
RESOURCES += \
|
||||
|
||||
Reference in New Issue
Block a user