summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@digia.com>2010-09-03 08:33:38 (GMT)
committerMiikka Heikkinen <miikka.heikkinen@digia.com>2010-09-03 12:04:07 (GMT)
commit5c978d026d378f7deaa14a87cf103ed43f14c413 (patch)
treecc83932a0ff8951819626f9ef5ce617d6156720d /qmake
parentd5373433d2a6d632e06d3873003069d49e17e2cd (diff)
downloadQt-5c978d026d378f7deaa14a87cf103ed43f14c413.zip
Qt-5c978d026d378f7deaa14a87cf103ed43f14c413.tar.gz
Qt-5c978d026d378f7deaa14a87cf103ed43f14c413.tar.bz2
Fix Symbian handling of projects with special characters in TARGET
Plenty of filenames got generated with spaces which didn't work as that was not taken into account. Harmonized TARGET fixing across prf files and qmake Symbian generator code. Task-number: QTBUG-13363 Reviewed-by: Thomas Zander
Diffstat (limited to 'qmake')
-rw-r--r--qmake/generators/symbian/symbiancommon.cpp19
1 files changed, 7 insertions, 12 deletions
diff --git a/qmake/generators/symbian/symbiancommon.cpp b/qmake/generators/symbian/symbiancommon.cpp
index 155dbc9..a60ae07 100644
--- a/qmake/generators/symbian/symbiancommon.cpp
+++ b/qmake/generators/symbian/symbiancommon.cpp
@@ -129,7 +129,7 @@ bool SymbianCommonGenerator::containsStartWithItem(const QChar &c, const QString
void SymbianCommonGenerator::removeSpecialCharacters(QString& str)
{
- // When modifying this method check also application_icon.prf
+ // When modifying this method check also symbianRemoveSpecialCharacters in symbian.conf
str.replace(QString("/"), QString("_"));
str.replace(QString("\\"), QString("_"));
str.replace(QString(" "), QString("_"));
@@ -137,7 +137,7 @@ void SymbianCommonGenerator::removeSpecialCharacters(QString& str)
void SymbianCommonGenerator::removeEpocSpecialCharacters(QString& str)
{
- // When modifying this method check also application_icon.prf
+ // When modifying this method check also symbianRemoveSpecialCharacters in symbian.conf
str.replace(QString("-"), QString("_"));
str.replace(QString(":"), QString("_"));
str.replace(QString("."), QString("_"));
@@ -154,13 +154,8 @@ QString romPath(const QString& path)
void SymbianCommonGenerator::generatePkgFile(const QString &iconFile, bool epocBuild)
{
QMakeProject *project = generator->project;
- QString pkgTarget = project->first("QMAKE_ORIG_TARGET");
- if (pkgTarget.isEmpty())
- pkgTarget = project->first("TARGET");
- pkgTarget = generator->unescapeFilePath(pkgTarget);
- pkgTarget = removePathSeparators(pkgTarget);
QString pkgFilename = Option::output_dir + QLatin1Char('/') +
- QString("%1_template.pkg").arg(pkgTarget);
+ QString("%1_template.pkg").arg(fixedTarget);
QFile pkgFile(pkgFilename);
if (!pkgFile.open(QIODevice::WriteOnly | QIODevice::Text)) {
@@ -169,7 +164,7 @@ void SymbianCommonGenerator::generatePkgFile(const QString &iconFile, bool epocB
}
QString stubPkgFileName = Option::output_dir + QLatin1Char('/') +
- QString("%1_stub.pkg").arg(pkgTarget);
+ QString("%1_stub.pkg").arg(fixedTarget);
QFile stubPkgFile(stubPkgFileName);
if (!stubPkgFile.open(QIODevice::WriteOnly | QIODevice::Text)) {
@@ -193,7 +188,7 @@ void SymbianCommonGenerator::generatePkgFile(const QString &iconFile, bool epocB
// Header info
QString wrapperPkgFilename = Option::output_dir + QLatin1Char('/') + QString("%1_installer.%2")
- .arg(pkgTarget).arg("pkg");
+ .arg(fixedTarget).arg("pkg");
QString headerComment = "; %1 generated by qmake at %2\n"
"; This file is generated by qmake and should not be modified by the user\n"
@@ -535,7 +530,7 @@ void SymbianCommonGenerator::generatePkgFile(const QString &iconFile, bool epocB
// Wrapped files deployment
QString currentPath = qmake_getpwd();
- QString sisName = QString("%1.sis").arg(pkgTarget);
+ QString sisName = QString("%1.sis").arg(fixedTarget);
twf << "\"" << currentPath << "/" << sisName << "\" - \"c:\\private\\2002CCCE\\import\\" << sisName << "\"" << endl;
QString bootStrapPath = QLibraryInfo::location(QLibraryInfo::PrefixPath);
@@ -552,7 +547,7 @@ QString SymbianCommonGenerator::removePathSeparators(QString &file)
if (QDir::separator().unicode() != '/')
ret.replace(QDir::separator(), QLatin1Char('/'));
- if (ret.indexOf(QLatin1Char('/')) > 0)
+ if (ret.indexOf(QLatin1Char('/')) >= 0)
ret.remove(0, ret.lastIndexOf(QLatin1Char('/')) + 1);
return ret;