Code deduplication.

The 'include(deployment.pri)' is now removed in a central place.
This commit is contained in:
Alessandro Portale
2011-03-18 17:50:15 +01:00
parent dece4dccc7
commit 1cce35ecf5
3 changed files with 4 additions and 6 deletions

View File

@@ -280,6 +280,8 @@ QByteArray AbstractMobileApp::generateProFile(QString *errorMessage) const
}
if (foldersCount > 0)
out << "DEPLOYMENTFOLDERS = " << folders.join(QLatin1String(" ")) << endl;
} else if (line.contains(QLatin1String("# INCLUDE_DEPLOYMENT_PRI"))) {
in.readLine(); // eats 'include(deployment.pri)'
} else {
handleCurrentProFileTemplateLine(line, in, out, commentOutNextLine);
}

View File

@@ -149,12 +149,10 @@ void Html5App::handleCurrentProFileTemplateLine(const QString &line,
QTextStream &proFileTemplate, QTextStream &proFile,
bool &commentOutNextLine) const
{
Q_UNUSED(proFileTemplate)
Q_UNUSED(proFile)
if (line.contains(QLatin1String("# INCLUDE_DEPLOYMENT_PRI"))) {
proFileTemplate.readLine(); // eats 'include(deployment.pri)'
} else if (line.contains(QLatin1String("# TOUCH_OPTIMIZED_NAVIGATION"))) {
if (line.contains(QLatin1String("# TOUCH_OPTIMIZED_NAVIGATION")))
commentOutNextLine = !m_touchOptimizedNavigationEnabled;
}
}
#ifndef CREATORLESSTEST

View File

@@ -243,8 +243,6 @@ void QtQuickApp::handleCurrentProFileTemplateLine(const QString &line,
}
proFile << endl;
} else if (line.contains(QLatin1String("# INCLUDE_DEPLOYMENT_PRI"))) {
proFileTemplate.readLine(); // eats 'include(deployment.pri)'
}
}