diff options
author | axis <qt-info@nokia.com> | 2010-03-16 08:47:16 (GMT) |
---|---|---|
committer | axis <qt-info@nokia.com> | 2010-03-16 08:47:16 (GMT) |
commit | 815af5a5e42f0d9eb7ee85e7e1bf1faae8d3a47c (patch) | |
tree | 5d5e3ebc84dd6866a060b0d5416b6db873905e4e /qmake | |
parent | 7ca339be57f1b8dbf9e289fae578c110813eb767 (diff) | |
parent | fdcb62d5d6a3e295273042555d2551eb491a5b2d (diff) | |
download | Qt-815af5a5e42f0d9eb7ee85e7e1bf1faae8d3a47c.zip Qt-815af5a5e42f0d9eb7ee85e7e1bf1faae8d3a47c.tar.gz Qt-815af5a5e42f0d9eb7ee85e7e1bf1faae8d3a47c.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt into 4.7-s60
Conflicts:
demos/embedded/anomaly/anomaly.pro
demos/embedded/flightinfo/flightinfo.pro
demos/embedded/lightmaps/lightmaps.pro
demos/embedded/weatherinfo/weatherinfo.pro
examples/network/fortuneclient/fortuneclient.pro
examples/network/fortuneserver/fortuneserver.pro
examples/network/network-chat/network-chat.pro
mkspecs/common/symbian/symbian.conf
mkspecs/features/symbian/platform_paths.prf
qmake/generators/symbian/symmake.cpp
qmake/generators/symbian/symmake.h
src/s60installs/s60installs.pro
Diffstat (limited to 'qmake')
-rw-r--r-- | qmake/generators/symbian/symbian_makefile.h | 2 | ||||
-rw-r--r-- | qmake/generators/symbian/symbiancommon.cpp | 77 | ||||
-rw-r--r-- | qmake/generators/symbian/symbiancommon.h | 9 | ||||
-rw-r--r-- | qmake/generators/symbian/symmake.cpp | 2 | ||||
-rw-r--r-- | qmake/generators/symbian/symmake.h | 5 |
5 files changed, 80 insertions, 15 deletions
diff --git a/qmake/generators/symbian/symbian_makefile.h b/qmake/generators/symbian/symbian_makefile.h index c51c780..f9d3c24 100644 --- a/qmake/generators/symbian/symbian_makefile.h +++ b/qmake/generators/symbian/symbian_makefile.h @@ -61,7 +61,7 @@ public: { QString numberOfIcons; QString iconFile; - QStringList userRssRules; + QMap<QString, QStringList> userRssRules; readRssRules(numberOfIcons, iconFile, userRssRules); // Generate pkg files if there are any actual files to deploy diff --git a/qmake/generators/symbian/symbiancommon.cpp b/qmake/generators/symbian/symbiancommon.cpp index b85f711..1de4b65 100644 --- a/qmake/generators/symbian/symbiancommon.cpp +++ b/qmake/generators/symbian/symbiancommon.cpp @@ -51,6 +51,12 @@ #define RSS_RULES_BASE "RSS_RULES." #define RSS_TAG_NBROFICONS "number_of_icons" #define RSS_TAG_ICONFILE "icon_file" +#define RSS_TAG_HEADER "header" +#define RSS_TAG_SERVICE_LIST "service_list" +#define RSS_TAG_FILE_OWNERSHIP_LIST "file_ownership_list" +#define RSS_TAG_DATATYPE_LIST "datatype_list" +#define RSS_TAG_FOOTER "footer" +#define RSS_TAG_DEFAULT "default_rules" // Same as just giving rules without tag #define MANUFACTURER_NOTE_FILE "manufacturer_note.txt" #define DEFAULT_MANUFACTURER_NOTE \ @@ -421,7 +427,7 @@ QString SymbianCommonGenerator::removePathSeparators(QString &file) return ret; } -void SymbianCommonGenerator::writeRegRssFile(QStringList &userItems) +void SymbianCommonGenerator::writeRegRssFile(QMap<QString, QStringList> &userItems) { QString filename(fixedTarget); filename.append("_reg.rss"); @@ -440,6 +446,8 @@ void SymbianCommonGenerator::writeRegRssFile(QStringList &userItems) t << endl; t << "#include <" << fixedTarget << ".rsg>" << endl; t << "#include <appinfo.rh>" << endl; + foreach(QString item, userItems[RSS_TAG_HEADER]) + t << item << endl; t << endl; t << "UID2 KUidAppRegistrationResourceFile" << endl; t << "UID3 " << uid3 << endl << endl; @@ -447,16 +455,51 @@ void SymbianCommonGenerator::writeRegRssFile(QStringList &userItems) t << "\t{" << endl; t << "\tapp_file=\"" << fixedTarget << "\";" << endl; t << "\tlocalisable_resource_file=\"" RESOURCE_DIRECTORY_RESOURCE << fixedTarget << "\";" << endl; + + writeRegRssList(t, userItems[RSS_TAG_SERVICE_LIST], + QLatin1String(RSS_TAG_SERVICE_LIST), + QLatin1String("SERVICE_INFO")); + writeRegRssList(t, userItems[RSS_TAG_FILE_OWNERSHIP_LIST], + QLatin1String(RSS_TAG_FILE_OWNERSHIP_LIST), + QLatin1String("FILE_OWNERSHIP_INFO")); + writeRegRssList(t, userItems[RSS_TAG_DATATYPE_LIST], + QLatin1String(RSS_TAG_DATATYPE_LIST), + QLatin1String("DATATYPE")); t << endl; - foreach(QString item, userItems) - t << "\t" << item << endl; + foreach(QString item, userItems[RSS_TAG_DEFAULT]) + t << "\t" << item.replace("\n","\n\t") << endl; t << "\t}" << endl; + + foreach(QString item, userItems[RSS_TAG_FOOTER]) + t << item << endl; } else { PRINT_FILE_CREATE_ERROR(filename) } } +void SymbianCommonGenerator::writeRegRssList(QTextStream &t, + QStringList &userList, + const QString &listTag, + const QString &listItem) +{ + int itemCount = userList.count(); + if (itemCount) { + t << "\t" << listTag << " ="<< endl; + t << "\t\t{" << endl; + foreach(QString item, userList) { + t << "\t\t" << listItem << endl; + t << "\t\t\t{" << endl; + t << "\t\t\t" << item.replace("\n","\n\t\t\t") << endl; + t << "\t\t\t}"; + if (--itemCount) + t << ","; + t << endl; + } + t << "\t\t}; "<< endl; + } +} + void SymbianCommonGenerator::writeRssFile(QString &numberOfIcons, QString &iconFile) { QString filename(fixedTarget); @@ -539,7 +582,9 @@ void SymbianCommonGenerator::writeLocFile(QStringList &symbianLangCodes) } } -void SymbianCommonGenerator::readRssRules(QString &numberOfIcons, QString &iconFile, QStringList &userRssRules) +void SymbianCommonGenerator::readRssRules(QString &numberOfIcons, + QString &iconFile, QMap<QString, + QStringList> &userRssRules) { QMakeProject *project = generator->project; for (QMap<QString, QStringList>::iterator it = project->variables().begin(); it != project->variables().end(); ++it) { @@ -552,14 +597,16 @@ void SymbianCommonGenerator::readRssRules(QString &numberOfIcons, QString &iconF QStringList newValues; QStringList values = it.value(); foreach(QString item, values) { - // If there is no stringlist defined for a rule, use rule name directly + // If there is no stringlist defined for a rule, use rule value directly // This is convenience for defining single line statements if (project->values(item).isEmpty()) { newValues << item; } else { + QStringList itemList; foreach(QString itemRow, project->values(item)) { - newValues << itemRow; + itemList << itemRow; } + newValues << itemList.join("\n"); } } // Verify thet there is exactly one value in RSS_TAG_NBROFICONS @@ -580,6 +627,14 @@ void SymbianCommonGenerator::readRssRules(QString &numberOfIcons, QString &iconF RSS_RULES_BASE, RSS_TAG_ICONFILE); continue; } + } else if (newKey == RSS_TAG_HEADER + || newKey == RSS_TAG_SERVICE_LIST + || newKey == RSS_TAG_FILE_OWNERSHIP_LIST + || newKey == RSS_TAG_DATATYPE_LIST + || newKey == RSS_TAG_FOOTER + || newKey == RSS_TAG_DEFAULT) { + userRssRules[newKey] = newValues; + continue; } else { fprintf(stderr, "Warning: Unsupported key:'%s%s'\n", RSS_RULES_BASE, newKey.toLatin1().constData()); @@ -588,15 +643,17 @@ void SymbianCommonGenerator::readRssRules(QString &numberOfIcons, QString &iconF } } + QStringList newValues; foreach(QString item, project->values(RSS_RULES)) { - // If there is no stringlist defined for a rule, use rule name directly - // This is convenience for defining single line mmp statements + // If there is no stringlist defined for a rule, use rule value directly + // This is convenience for defining single line statements if (project->values(item).isEmpty()) { - userRssRules << item; + newValues << item; } else { - userRssRules << project->values(item); + newValues << project->values(item); } } + userRssRules[RSS_TAG_DEFAULT] << newValues; // Validate that either both RSS_TAG_NBROFICONS and RSS_TAG_ICONFILE keys exist // or neither of them exist diff --git a/qmake/generators/symbian/symbiancommon.h b/qmake/generators/symbian/symbiancommon.h index 9aaa9a1..e2b1173 100644 --- a/qmake/generators/symbian/symbiancommon.h +++ b/qmake/generators/symbian/symbiancommon.h @@ -71,10 +71,15 @@ protected: void generatePkgFile(const QString &iconFile, DeploymentList &depList, bool epocBuild); bool containsStartWithItem(const QChar &c, const QStringList& src); - void writeRegRssFile(QStringList &useritems); + void writeRegRssFile(QMap<QString, QStringList> &useritems); + void writeRegRssList(QTextStream &t, QStringList &userList, + const QString &listTag, + const QString &listItem); void writeRssFile(QString &numberOfIcons, QString &iconfile); void writeLocFile(QStringList &symbianLangCodes); - void readRssRules(QString &numberOfIcons, QString &iconFile, QStringList &userRssRules); + void readRssRules(QString &numberOfIcons, + QString &iconFile, + QMap<QString, QStringList> &userRssRules); QStringList symbianLangCodesFromTsFiles(); void fillQt2S60LangMapTable(); diff --git a/qmake/generators/symbian/symmake.cpp b/qmake/generators/symbian/symmake.cpp index 83d1149..569f529 100644 --- a/qmake/generators/symbian/symmake.cpp +++ b/qmake/generators/symbian/symmake.cpp @@ -179,7 +179,7 @@ bool SymbianMakefileGenerator::writeMakefile(QTextStream &t) QString numberOfIcons; QString iconFile; - QStringList userRssRules; + QMap<QString, QStringList> userRssRules; readRssRules(numberOfIcons, iconFile, userRssRules); // Get the application translations and convert to symbian OS lang code, i.e. decical number diff --git a/qmake/generators/symbian/symmake.h b/qmake/generators/symbian/symmake.h index a7610b0..d9ca390 100644 --- a/qmake/generators/symbian/symmake.h +++ b/qmake/generators/symbian/symmake.h @@ -88,7 +88,10 @@ protected: QString &checkString); void writeHeader(QTextStream &t); - void writeBldInfContent(QTextStream& t, bool addDeploymentExtension, const QString &iconFile, DeploymentList &depList); + void writeBldInfContent(QTextStream& t, + bool addDeploymentExtension, + const QString &iconFile, + DeploymentList &depList); static bool removeDuplicatedStrings(QStringList& stringList); |