summaryrefslogtreecommitdiffstats
path: root/qmake/generators
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@digia.com>2010-10-07 12:36:45 (GMT)
committerMiikka Heikkinen <miikka.heikkinen@digia.com>2010-10-07 12:39:37 (GMT)
commit9cb24d1c4b7359ec84708ba770050de720b50cdf (patch)
tree3f66354ac7a113c21931f47c0239798dcc246679 /qmake/generators
parent50b2477e6ffd64a0730cc5c0f0a6190b1a6b5861 (diff)
downloadQt-9cb24d1c4b7359ec84708ba770050de720b50cdf.zip
Qt-9cb24d1c4b7359ec84708ba770050de720b50cdf.tar.gz
Qt-9cb24d1c4b7359ec84708ba770050de720b50cdf.tar.bz2
Implement support for DEPLOYMENT.display_name in Symbian
The default package name and the default name that appears in the application menu is derived from the TARGET variable. Often the default is not optimal for displaying to end user. To set a better display name for these purposes DEPLOYMENT.display_name variable can now be used. Task-number: QTBUG-14280 Reviewed-by: Janne Anttila
Diffstat (limited to 'qmake/generators')
-rw-r--r--qmake/generators/symbian/symbiancommon.cpp21
1 files changed, 14 insertions, 7 deletions
diff --git a/qmake/generators/symbian/symbiancommon.cpp b/qmake/generators/symbian/symbiancommon.cpp
index 5e8bc4a..0938b58 100644
--- a/qmake/generators/symbian/symbiancommon.cpp
+++ b/qmake/generators/symbian/symbiancommon.cpp
@@ -320,7 +320,9 @@ void SymbianCommonGenerator::generatePkgFile(const QString &iconFile, bool epocB
// Package header
QString sisHeader = "; SIS header: name, uid, version\n#{\"%1\"},(%2),%3\n\n";
- QString visualTarget = generator->escapeFilePath(project->first("TARGET"));
+ QString visualTarget = project->values("DEPLOYMENT.display_name").join(" ");
+ if (visualTarget.isEmpty())
+ visualTarget = generator->escapeFilePath(project->first("TARGET"));
visualTarget = removePathSeparators(visualTarget);
QString wrapperTarget = visualTarget + " installer";
@@ -641,6 +643,11 @@ void SymbianCommonGenerator::writeLocFile(QStringList &symbianLangCodes)
if (ft.open(QIODevice::WriteOnly)) {
generatedFiles << ft.fileName();
QTextStream t(&ft);
+
+ QString displayName = generator->project->values("DEPLOYMENT.display_name").join(" ");
+ if (displayName.isEmpty())
+ displayName = generator->escapeFilePath(generator->project->first("TARGET"));
+
t << "// ============================================================================" << endl;
t << "// * Generated by qmake (" << qmake_version() << ") (Qt " QT_VERSION_STR ") on: ";
t << QDateTime::currentDateTime().toString(Qt::ISODate) << endl;
@@ -649,16 +656,16 @@ void SymbianCommonGenerator::writeLocFile(QStringList &symbianLangCodes)
t << "// ============================================================================" << endl;
t << endl;
t << "#ifdef LANGUAGE_SC" << endl;
- t << "#define STRING_r_short_caption \"" << fixedTarget << "\"" << endl;
- t << "#define STRING_r_caption \"" << fixedTarget << "\"" << endl;
+ t << "#define STRING_r_short_caption \"" << displayName << "\"" << endl;
+ t << "#define STRING_r_caption \"" << displayName << "\"" << endl;
foreach(QString lang, symbianLangCodes) {
t << "#elif defined LANGUAGE_" << lang << endl;
- t << "#define STRING_r_short_caption \"" << fixedTarget << "\"" << endl;
- t << "#define STRING_r_caption \"" << fixedTarget << "\"" << endl;
+ t << "#define STRING_r_short_caption \"" << displayName << "\"" << endl;
+ t << "#define STRING_r_caption \"" << displayName << "\"" << endl;
}
t << "#else" << endl;
- t << "#define STRING_r_short_caption \"" << fixedTarget << "\"" << endl;
- t << "#define STRING_r_caption \"" << fixedTarget << "\"" << endl;
+ t << "#define STRING_r_short_caption \"" << displayName << "\"" << endl;
+ t << "#define STRING_r_caption \"" << displayName << "\"" << endl;
t << "#endif" << endl;
} else {
PRINT_FILE_CREATE_ERROR(filename);