summaryrefslogtreecommitdiffstats
path: root/qmake/generators
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-03-15 20:04:57 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-03-15 20:04:57 (GMT)
commitfdcb62d5d6a3e295273042555d2551eb491a5b2d (patch)
tree0a8b3a3ef3f71efdfac856fd49b153ddc4ebb034 /qmake/generators
parent33c6983a19942c151fa0bcc878b5219e0b641ba9 (diff)
parent90d7b8dd7968c3e63cd3d9b7e8e1b5d83b20b475 (diff)
downloadQt-fdcb62d5d6a3e295273042555d2551eb491a5b2d.zip
Qt-fdcb62d5d6a3e295273042555d2551eb491a5b2d.tar.gz
Qt-fdcb62d5d6a3e295273042555d2551eb491a5b2d.tar.bz2
Merge branch 'qt-4.7-from-4.6' of scm.dev.nokia.troll.no:qt/qt-integration into 4.7-integration
* 'qt-4.7-from-4.6' of scm.dev.nokia.troll.no:qt/qt-integration: (65 commits) QSslKey: Do not make OpenSSL prompt for a password on stdin Typo fix in qtestlib Moved Symbian audio backend into QtMultimedia.dll Updated Symbian DEF files Updated qt.iby Fixed filename cases to support building Qt for Symbian in Linux Moved softkey "Options" action handling from QMainWindow to QMenuBar. HotFix for fluidlauncher default size caused by 6d44dadd. Removed compiler warning from qdesktopwidget_s60.cpp. Ensure that the entire CLOB can be returned from an Oracle database QAudioInput sometimes not writing to QIODevice isalpha() is unspecified for values outside uchar and EOF Fixed bug in QTransform::type() after using operator/ or operator*. Updated WebKit from /home/shausman/src/webkit/trunk to qtwebkit/qtwebkit-4.6 ( 266a6c4f1938dd9edf4a8125faf91c62495e3ce2 ) Doc: Removed lie that access to QBuffer is unbuffered. Minisplitter doesn't paint to the bottom/right Support for adding user specified list type content in rss file Fixed RSS_RULES statement in application_icon.prf Avoid unnecessary memory allocation in the jpeg handler's image detection QVarLenghtArray: Call constructor when resizing the array for Movable types. ...
Diffstat (limited to 'qmake/generators')
-rw-r--r--qmake/generators/symbian/symmake.cpp79
-rw-r--r--qmake/generators/symbian/symmake.h14
2 files changed, 79 insertions, 14 deletions
diff --git a/qmake/generators/symbian/symmake.cpp b/qmake/generators/symbian/symmake.cpp
index b15baf4..b84f0f1 100644
--- a/qmake/generators/symbian/symmake.cpp
+++ b/qmake/generators/symbian/symmake.cpp
@@ -70,6 +70,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 MMP_TARGET "TARGET"
#define MMP_TARGETTYPE "TARGETTYPE"
@@ -192,7 +198,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
@@ -1418,7 +1424,7 @@ void SymbianMakefileGenerator::writeBldInfContent(QTextStream &t, bool addDeploy
}
}
-void SymbianMakefileGenerator::writeRegRssFile(QStringList &userItems)
+void SymbianMakefileGenerator::writeRegRssFile(QMap<QString, QStringList> &userItems)
{
QString filename(fixedTarget);
filename.append("_reg.rss");
@@ -1435,6 +1441,8 @@ void SymbianMakefileGenerator::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;
@@ -1442,16 +1450,51 @@ void SymbianMakefileGenerator::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 SymbianMakefileGenerator::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 SymbianMakefileGenerator::writeRssFile(QString &numberOfIcons, QString &iconFile)
{
QString filename(fixedTarget);
@@ -1530,7 +1573,9 @@ void SymbianMakefileGenerator::writeLocFile(QStringList &symbianLangCodes)
}
}
-void SymbianMakefileGenerator::readRssRules(QString &numberOfIcons, QString &iconFile, QStringList &userRssRules)
+void SymbianMakefileGenerator::readRssRules(QString &numberOfIcons,
+ QString &iconFile, QMap<QString,
+ QStringList> &userRssRules)
{
for (QMap<QString, QStringList>::iterator it = project->variables().begin(); it != project->variables().end(); ++it) {
if (it.key().startsWith(RSS_RULES_BASE)) {
@@ -1542,14 +1587,16 @@ void SymbianMakefileGenerator::readRssRules(QString &numberOfIcons, QString &ico
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
@@ -1570,6 +1617,14 @@ void SymbianMakefileGenerator::readRssRules(QString &numberOfIcons, QString &ico
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());
@@ -1578,15 +1633,17 @@ void SymbianMakefileGenerator::readRssRules(QString &numberOfIcons, QString &ico
}
}
+ 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/symmake.h b/qmake/generators/symbian/symmake.h
index fa55ae7..0847ee8 100644
--- a/qmake/generators/symbian/symmake.h
+++ b/qmake/generators/symbian/symmake.h
@@ -107,7 +107,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);
@@ -127,10 +130,15 @@ protected:
void writeCustomDefFile();
- 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();