forked from qt-creator/qt-creator
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
This commit is contained in:
@@ -28,7 +28,8 @@ symbian:TARGET.UID3 = 0xE1111234
|
||||
# The .cpp file which was generated for your project. Feel free to hack it.
|
||||
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_DEPLOYMENT_PRI (wizard will remove the include and append deployment.pri to qmlapplicationviewer.pri, instead) #
|
||||
include(../shared/deployment.pri)
|
||||
qtcAddDeployment()
|
||||
|
||||
@@ -319,7 +319,6 @@ Core::GeneratedFiles AbstractMobileApp::generateFiles(QString *errorMessage) con
|
||||
files << file(generateFile(AbstractGeneratedFileInfo::SymbianSvgIconFile, errorMessage), path(SymbianSvgIcon));
|
||||
files << file(generateFile(AbstractGeneratedFileInfo::MaemoPngIconFile, errorMessage), path(MaemoPngIcon));
|
||||
files << file(generateFile(AbstractGeneratedFileInfo::DesktopFile, errorMessage), path(Desktop));
|
||||
files << file(generateFile(AbstractGeneratedFileInfo::DeploymentPriFile, errorMessage), path(DeploymentPri));
|
||||
return files;
|
||||
}
|
||||
#endif // CREATORLESSTEST
|
||||
|
||||
@@ -94,6 +94,7 @@ Core::GeneratedFiles MobileApp::generateFiles(QString *errorMessage) const
|
||||
{
|
||||
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::MainWindowHFile, errorMessage), path(MainWindowH)));
|
||||
files.append(file(generateFile(MobileAppGeneratedFileInfo::MainWindowUiFile, errorMessage), path(MainWindowUi)));
|
||||
|
||||
@@ -261,6 +261,8 @@ void QmlStandaloneApp::handleCurrentProFileTemplateLine(const QString &line,
|
||||
}
|
||||
|
||||
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,
|
||||
break;
|
||||
case QmlAppGeneratedFileInfo::AppViewerPriFile:
|
||||
data = readBlob(path(AppViewerPriOrigin), errorMessage);
|
||||
data.append(readBlob(path(DeploymentPriOrigin), errorMessage));
|
||||
*comment = ProFileComment;
|
||||
*versionAndCheckSum = true;
|
||||
break;
|
||||
@@ -408,9 +411,7 @@ static QList<QmlAppGeneratedFileInfo> updateableFiles(const QString &mainProFile
|
||||
} files[] = {
|
||||
{QmlAppGeneratedFileInfo::AppViewerPriFile, appViewerPriFileName},
|
||||
{QmlAppGeneratedFileInfo::AppViewerHFile, appViewerHFileName},
|
||||
{QmlAppGeneratedFileInfo::AppViewerCppFile, appViewerCppFileName},
|
||||
{QmlAppGeneratedFileInfo::DeploymentPriFile,
|
||||
QLatin1String("../") + AbstractMobileApp::DeploymentPriFileName}
|
||||
{QmlAppGeneratedFileInfo::AppViewerCppFile, appViewerCppFileName}
|
||||
};
|
||||
const QFileInfo mainProFileInfo(mainProFile);
|
||||
const int size = sizeof(files) / sizeof(files[0]);
|
||||
|
||||
@@ -52,8 +52,7 @@ bool QmlStandaloneApp::generateFiles(QString *errorMessage) const
|
||||
&& 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))
|
||||
&& writeFile(generateFile(QmlAppGeneratedFileInfo::DeploymentPriFile, errorMessage), path(DeploymentPri));
|
||||
&& writeFile(generateFile(QmlAppGeneratedFileInfo::DesktopFile, errorMessage), path(Desktop));
|
||||
}
|
||||
|
||||
QString AbstractMobileApp::templatesRoot()
|
||||
|
||||
Reference in New Issue
Block a user