summaryrefslogtreecommitdiffstats
path: root/qmake/generators/symbian/symmake.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qmake/generators/symbian/symmake.cpp')
-rw-r--r--qmake/generators/symbian/symmake.cpp37
1 files changed, 27 insertions, 10 deletions
diff --git a/qmake/generators/symbian/symmake.cpp b/qmake/generators/symbian/symmake.cpp
index 0b0033a..e1426ab 100644
--- a/qmake/generators/symbian/symmake.cpp
+++ b/qmake/generators/symbian/symmake.cpp
@@ -187,8 +187,8 @@ bool SymbianMakefileGenerator::writeMakefile(QTextStream &t)
QMap<QString, QStringList> userRssRules;
readRssRules(numberOfIcons, iconFile, userRssRules);
- // Get the application translations and convert to symbian OS lang code, i.e. decical number
- QStringList symbianLangCodes = symbianLangCodesFromTsFiles();
+ SymbianLocalizationList symbianLocalizationList;
+ parseTsFiles(&symbianLocalizationList);
// Generate pkg files if there are any actual files to deploy
bool generatePkg = false;
@@ -205,7 +205,7 @@ bool SymbianMakefileGenerator::writeMakefile(QTextStream &t)
}
if (generatePkg) {
- generatePkgFile(iconFile, true);
+ generatePkgFile(iconFile, true, symbianLocalizationList);
}
writeBldInfContent(t, generatePkg, iconFile);
@@ -242,13 +242,13 @@ bool SymbianMakefileGenerator::writeMakefile(QTextStream &t)
writeMkFile(wrapperFileName, false);
QString absoluteMmpFileName = Option::output_dir + QLatin1Char('/') + mmpFileName;
- writeMmpFile(absoluteMmpFileName, symbianLangCodes);
+ writeMmpFile(absoluteMmpFileName, symbianLocalizationList);
if (targetType == TypeExe) {
if (!project->isActiveConfig("no_icon")) {
writeRegRssFile(userRssRules);
writeRssFile(numberOfIcons, iconFile);
- writeLocFile(symbianLangCodes);
+ writeLocFile(symbianLocalizationList);
}
}
@@ -489,7 +489,7 @@ void SymbianMakefileGenerator::writeMmpFileHeader(QTextStream &t)
t << "// ==============================================================================" << endl << endl;
}
-void SymbianMakefileGenerator::writeMmpFile(QString &filename, QStringList &symbianLangCodes)
+void SymbianMakefileGenerator::writeMmpFile(QString &filename, const SymbianLocalizationList &symbianLocalizationList)
{
QFile ft(filename);
if (ft.open(QIODevice::WriteOnly)) {
@@ -501,7 +501,7 @@ void SymbianMakefileGenerator::writeMmpFile(QString &filename, QStringList &symb
writeMmpFileTargetPart(t);
- writeMmpFileResourcePart(t, symbianLangCodes);
+ writeMmpFileResourcePart(t, symbianLocalizationList);
writeMmpFileMacrosPart(t);
@@ -643,7 +643,7 @@ void SymbianMakefileGenerator::writeMmpFileTargetPart(QTextStream& t)
Application registration resource files should be installed to the
\private\10003a3f\import\apps directory.
*/
-void SymbianMakefileGenerator::writeMmpFileResourcePart(QTextStream& t, QStringList &symbianLangCodes)
+void SymbianMakefileGenerator::writeMmpFileResourcePart(QTextStream& t, const SymbianLocalizationList &symbianLocalizationList)
{
if ((targetType == TypeExe) &&
!project->isActiveConfig("no_icon")) {
@@ -653,8 +653,10 @@ void SymbianMakefileGenerator::writeMmpFileResourcePart(QTextStream& t, QStringL
t << "SOURCEPATH\t\t\t. " << endl;
t << "LANG SC "; // no endl
- foreach(QString lang, symbianLangCodes) {
- t << lang << " "; // no endl
+ SymbianLocalizationListIterator iter(symbianLocalizationList);
+ while (iter.hasNext()) {
+ const SymbianLocalization &loc = iter.next();
+ t << loc.symbianLanguageCode << " "; // no endl
}
t << endl;
t << MMP_START_RESOURCE "\t\t" << locTarget << endl;
@@ -1108,3 +1110,18 @@ void SymbianMakefileGenerator::generateDistcleanTargets(QTextStream& t)
t << "distclean: clean dodistclean" << endl;
t << endl;
}
+
+// Returns a string that can be used as a dependency to loc file on other targets
+QString SymbianMakefileGenerator::generateLocFileTarget(QTextStream& t, const QString& locCmd)
+{
+ QString locFile;
+ if (targetType == TypeExe && !project->isActiveConfig("no_icon")) {
+ locFile = Option::fixPathToLocalOS(generateLocFileName());
+ t << locFile << QLatin1String(": ") << project->values("SYMBIAN_MATCHED_TRANSLATIONS").join(" ") << endl;
+ t << locCmd << endl;
+ t << endl;
+ locFile += QLatin1Char(' ');
+ }
+
+ return locFile;
+} \ No newline at end of file