Commit e1aa2935 authored by Alessandro Portale's avatar Alessandro Portale
Browse files

Qt Quick app wizard: Merge two .pri files into one

As an project tree unclutter measure, we now append the
deployment.pri to the qmlapplicationviewer.pri while generating
the stub for Qt Quick Apps.

At the same tame we keep te Qt Mobile App wizard intact, which
continues to generate the deployment.pri file.

And we also keep the qmlapp/app.pro template functioning as
project, therefore we leave the include(../shared/deployment.pri)
in qmlapp/app.pro and let the wizard remove that incude.

Task-Number: QTCREATORBUG-2568
Reviewed-By: ck
parent a95ed642
...@@ -28,7 +28,8 @@ symbian:TARGET.UID3 = 0xE1111234 ...@@ -28,7 +28,8 @@ symbian:TARGET.UID3 = 0xE1111234
# The .cpp file which was generated for your project. Feel free to hack it. # The .cpp file which was generated for your project. Feel free to hack it.
SOURCES += main.cpp SOURCES += main.cpp
# Please do not modify the following three lines. Required for deployment. # Please do not modify the following two lines. Required for deployment.
include(qmlapplicationviewer/qmlapplicationviewer.pri) include(qmlapplicationviewer/qmlapplicationviewer.pri)
# INCLUDE_DEPLOYMENT_PRI (wizard will remove the include and append deployment.pri to qmlapplicationviewer.pri, instead) #
include(../shared/deployment.pri) include(../shared/deployment.pri)
qtcAddDeployment() qtcAddDeployment()
...@@ -319,7 +319,6 @@ Core::GeneratedFiles AbstractMobileApp::generateFiles(QString *errorMessage) con ...@@ -319,7 +319,6 @@ Core::GeneratedFiles AbstractMobileApp::generateFiles(QString *errorMessage) con
files << file(generateFile(AbstractGeneratedFileInfo::SymbianSvgIconFile, errorMessage), path(SymbianSvgIcon)); files << file(generateFile(AbstractGeneratedFileInfo::SymbianSvgIconFile, errorMessage), path(SymbianSvgIcon));
files << file(generateFile(AbstractGeneratedFileInfo::MaemoPngIconFile, errorMessage), path(MaemoPngIcon)); files << file(generateFile(AbstractGeneratedFileInfo::MaemoPngIconFile, errorMessage), path(MaemoPngIcon));
files << file(generateFile(AbstractGeneratedFileInfo::DesktopFile, errorMessage), path(Desktop)); files << file(generateFile(AbstractGeneratedFileInfo::DesktopFile, errorMessage), path(Desktop));
files << file(generateFile(AbstractGeneratedFileInfo::DeploymentPriFile, errorMessage), path(DeploymentPri));
return files; return files;
} }
#endif // CREATORLESSTEST #endif // CREATORLESSTEST
......
...@@ -94,6 +94,7 @@ Core::GeneratedFiles MobileApp::generateFiles(QString *errorMessage) const ...@@ -94,6 +94,7 @@ Core::GeneratedFiles MobileApp::generateFiles(QString *errorMessage) const
{ {
Core::GeneratedFiles files = AbstractMobileApp::generateFiles(errorMessage); Core::GeneratedFiles files = AbstractMobileApp::generateFiles(errorMessage);
files.append(file(generateFile(AbstractGeneratedFileInfo::DeploymentPriFile, errorMessage), path(DeploymentPri)));
files.append(file(generateFile(MobileAppGeneratedFileInfo::MainWindowCppFile, errorMessage), path(MainWindowCpp))); files.append(file(generateFile(MobileAppGeneratedFileInfo::MainWindowCppFile, errorMessage), path(MainWindowCpp)));
files.append(file(generateFile(MobileAppGeneratedFileInfo::MainWindowHFile, errorMessage), path(MainWindowH))); files.append(file(generateFile(MobileAppGeneratedFileInfo::MainWindowHFile, errorMessage), path(MainWindowH)));
files.append(file(generateFile(MobileAppGeneratedFileInfo::MainWindowUiFile, errorMessage), path(MainWindowUi))); files.append(file(generateFile(MobileAppGeneratedFileInfo::MainWindowUiFile, errorMessage), path(MainWindowUi)));
......
...@@ -261,6 +261,8 @@ void QmlStandaloneApp::handleCurrentProFileTemplateLine(const QString &line, ...@@ -261,6 +261,8 @@ void QmlStandaloneApp::handleCurrentProFileTemplateLine(const QString &line,
} }
proFile << endl; proFile << endl;
} else if (line.contains(QLatin1String("# INCLUDE_DEPLOYMENT_PRI"))) {
proFileTemplate.readLine(); // eats 'include(deployment.pri)'
} }
} }
...@@ -378,6 +380,7 @@ QByteArray QmlStandaloneApp::generateFileExtended(int fileType, ...@@ -378,6 +380,7 @@ QByteArray QmlStandaloneApp::generateFileExtended(int fileType,
break; break;
case QmlAppGeneratedFileInfo::AppViewerPriFile: case QmlAppGeneratedFileInfo::AppViewerPriFile:
data = readBlob(path(AppViewerPriOrigin), errorMessage); data = readBlob(path(AppViewerPriOrigin), errorMessage);
data.append(readBlob(path(DeploymentPriOrigin), errorMessage));
*comment = ProFileComment; *comment = ProFileComment;
*versionAndCheckSum = true; *versionAndCheckSum = true;
break; break;
...@@ -408,9 +411,7 @@ static QList<QmlAppGeneratedFileInfo> updateableFiles(const QString &mainProFile ...@@ -408,9 +411,7 @@ static QList<QmlAppGeneratedFileInfo> updateableFiles(const QString &mainProFile
} files[] = { } files[] = {
{QmlAppGeneratedFileInfo::AppViewerPriFile, appViewerPriFileName}, {QmlAppGeneratedFileInfo::AppViewerPriFile, appViewerPriFileName},
{QmlAppGeneratedFileInfo::AppViewerHFile, appViewerHFileName}, {QmlAppGeneratedFileInfo::AppViewerHFile, appViewerHFileName},
{QmlAppGeneratedFileInfo::AppViewerCppFile, appViewerCppFileName}, {QmlAppGeneratedFileInfo::AppViewerCppFile, appViewerCppFileName}
{QmlAppGeneratedFileInfo::DeploymentPriFile,
QLatin1String("../") + AbstractMobileApp::DeploymentPriFileName}
}; };
const QFileInfo mainProFileInfo(mainProFile); const QFileInfo mainProFileInfo(mainProFile);
const int size = sizeof(files) / sizeof(files[0]); const int size = sizeof(files) / sizeof(files[0]);
......
...@@ -52,8 +52,7 @@ bool QmlStandaloneApp::generateFiles(QString *errorMessage) const ...@@ -52,8 +52,7 @@ bool QmlStandaloneApp::generateFiles(QString *errorMessage) const
&& writeFile(generateFile(QmlAppGeneratedFileInfo::AppViewerHFile, errorMessage), path(AppViewerH)) && writeFile(generateFile(QmlAppGeneratedFileInfo::AppViewerHFile, errorMessage), path(AppViewerH))
&& writeFile(generateFile(QmlAppGeneratedFileInfo::SymbianSvgIconFile, errorMessage), path(SymbianSvgIcon)) && writeFile(generateFile(QmlAppGeneratedFileInfo::SymbianSvgIconFile, errorMessage), path(SymbianSvgIcon))
&& writeFile(generateFile(QmlAppGeneratedFileInfo::MaemoPngIconFile, errorMessage), path(MaemoPngIcon)) && writeFile(generateFile(QmlAppGeneratedFileInfo::MaemoPngIconFile, errorMessage), path(MaemoPngIcon))
&& writeFile(generateFile(QmlAppGeneratedFileInfo::DesktopFile, errorMessage), path(Desktop)) && writeFile(generateFile(QmlAppGeneratedFileInfo::DesktopFile, errorMessage), path(Desktop));
&& writeFile(generateFile(QmlAppGeneratedFileInfo::DeploymentPriFile, errorMessage), path(DeploymentPri));
} }
QString AbstractMobileApp::templatesRoot() QString AbstractMobileApp::templatesRoot()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment