summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2010-02-26 12:07:02 (GMT)
committeraxis <qt-info@nokia.com>2010-02-26 12:32:59 (GMT)
commit721d7a47ba22fd791f2569427dd6285ac3384ff5 (patch)
tree9b697c8aeed64431d2d3968041e4a5740304e2f2 /qmake
parent1edd1229b5a2381da2a85ebbfb4539d83a13ef3f (diff)
downloadQt-721d7a47ba22fd791f2569427dd6285ac3384ff5.zip
Qt-721d7a47ba22fd791f2569427dd6285ac3384ff5.tar.gz
Qt-721d7a47ba22fd791f2569427dd6285ac3384ff5.tar.bz2
Removed restrictions on file names from the Symbian makefile system.
Spaces in filenames still won't work, but that is very tricky to fix because you cannot escape filenames inside the QMAKE_EXTRA_COMPILERS section. Task: QTBUG-8555
Diffstat (limited to 'qmake')
-rw-r--r--qmake/generators/symbian/symbiancommon.cpp19
-rw-r--r--qmake/generators/symbian/symbiancommon.h1
-rw-r--r--qmake/generators/symbian/symmake.cpp4
-rw-r--r--qmake/generators/symbian/symmake_abld.cpp4
4 files changed, 19 insertions, 9 deletions
diff --git a/qmake/generators/symbian/symbiancommon.cpp b/qmake/generators/symbian/symbiancommon.cpp
index 9992faa..c7f8cd4 100644
--- a/qmake/generators/symbian/symbiancommon.cpp
+++ b/qmake/generators/symbian/symbiancommon.cpp
@@ -68,9 +68,13 @@ void SymbianCommonGenerator::init()
fixedTarget = project->first("QMAKE_ORIG_TARGET");
if (fixedTarget.isEmpty())
fixedTarget = project->first("TARGET");
- fixedTarget = generator->escapeFilePath(fixedTarget);
+ fixedTarget = generator->unescapeFilePath(fixedTarget);
fixedTarget = removePathSeparators(fixedTarget);
- removeSpecialCharacters(fixedTarget);
+ if (project->first("MAKEFILE_GENERATOR") == "SYMBIAN_ABLD"
+ || project->first("MAKEFILE_GENERATOR") == "SYMBIAN_SBSV2")
+ removeEpocSpecialCharacters(fixedTarget);
+ else
+ removeSpecialCharacters(fixedTarget);
// This should not be empty since the mkspecs are supposed to set it if missing.
uid3 = project->first("TARGET.UID3").trimmed();
@@ -120,10 +124,16 @@ void SymbianCommonGenerator::removeSpecialCharacters(QString& str)
// When modifying this method check also application_icon.prf
str.replace(QString("/"), QString("_"));
str.replace(QString("\\"), QString("_"));
+ str.replace(QString(" "), QString("_"));
+}
+
+void SymbianCommonGenerator::removeEpocSpecialCharacters(QString& str)
+{
+ // When modifying this method check also application_icon.prf
str.replace(QString("-"), QString("_"));
str.replace(QString(":"), QString("_"));
str.replace(QString("."), QString("_"));
- str.replace(QString(" "), QString("_"));
+ removeSpecialCharacters(str);
}
void SymbianCommonGenerator::generatePkgFile(const QString &iconFile, DeploymentList &depList, bool epocBuild)
@@ -132,7 +142,7 @@ void SymbianCommonGenerator::generatePkgFile(const QString &iconFile, Deployment
QString pkgTarget = project->first("QMAKE_ORIG_TARGET");
if (pkgTarget.isEmpty())
pkgTarget = project->first("TARGET");
- pkgTarget = generator->escapeFilePath(pkgTarget);
+ pkgTarget = generator->unescapeFilePath(pkgTarget);
pkgTarget = removePathSeparators(pkgTarget);
QString pkgFilename = QString("%1_template.%2").arg(pkgTarget).arg("pkg");
if (!Option::output_dir.isEmpty())
@@ -309,7 +319,6 @@ void SymbianCommonGenerator::generatePkgFile(const QString &iconFile, Deployment
QDir mifIconDir(project->first("DESTDIR"));
QFileInfo mifIcon(mifIconDir.relativeFilePath(project->first("TARGET")));
QString mifIconFileName = mifIcon.fileName();
- mifIconFileName.replace(QRegExp("[-: .]"), "_");
mifIconFileName.append(".mif");
t << QString("\"%1/%2\" - \"!:%3\"")
.arg(mifIcon.path())
diff --git a/qmake/generators/symbian/symbiancommon.h b/qmake/generators/symbian/symbiancommon.h
index 32f9483..9aaa9a1 100644
--- a/qmake/generators/symbian/symbiancommon.h
+++ b/qmake/generators/symbian/symbiancommon.h
@@ -67,6 +67,7 @@ protected:
QString removePathSeparators(QString &file);
void removeSpecialCharacters(QString& str);
+ void removeEpocSpecialCharacters(QString& str);
void generatePkgFile(const QString &iconFile, DeploymentList &depList, bool epocBuild);
bool containsStartWithItem(const QChar &c, const QStringList& src);
diff --git a/qmake/generators/symbian/symmake.cpp b/qmake/generators/symbian/symmake.cpp
index 5283bfa..5b230e4 100644
--- a/qmake/generators/symbian/symmake.cpp
+++ b/qmake/generators/symbian/symmake.cpp
@@ -173,7 +173,7 @@ void SymbianMakefileGenerator::writeHeader(QTextStream &t)
bldinfDefine.append(generate_uid(project->projectFile()));
bldinfDefine.prepend("BLD_INF_");
- removeSpecialCharacters(bldinfDefine);
+ removeEpocSpecialCharacters(bldinfDefine);
t << "#define " << bldinfDefine.toUpper() << endl << endl;
}
@@ -1032,7 +1032,7 @@ void SymbianMakefileGenerator::writeBldInfContent(QTextStream &t, bool addDeploy
QString uid = generate_uid(fullProName);
QString bldinfDefine = QString("BLD_INF_") + subdirFileName + QString("_") + uid;
bldinfDefine = bldinfDefine.toUpper();
- removeSpecialCharacters(bldinfDefine);
+ removeEpocSpecialCharacters(bldinfDefine);
t << "#ifndef " << bldinfDefine << endl;
t << "\t#include \"" << bldinfFilename << "\"" << endl;
diff --git a/qmake/generators/symbian/symmake_abld.cpp b/qmake/generators/symbian/symmake_abld.cpp
index b620258..aec16fd 100644
--- a/qmake/generators/symbian/symmake_abld.cpp
+++ b/qmake/generators/symbian/symmake_abld.cpp
@@ -69,7 +69,7 @@ SymbianAbldMakefileGenerator::~SymbianAbldMakefileGenerator() { }
void SymbianAbldMakefileGenerator::writeMkFile(const QString& wrapperFileName, bool deploymentOnly)
{
QString gnuMakefileName = QLatin1String("Makefile_") + uid3;
- removeSpecialCharacters(gnuMakefileName);
+ removeEpocSpecialCharacters(gnuMakefileName);
gnuMakefileName.append(".mk");
QFile ft(gnuMakefileName);
@@ -451,7 +451,7 @@ void SymbianAbldMakefileGenerator::writeBldInfMkFilePart(QTextStream& t, bool ad
// do not get that, special deployment only makefile is generated for them if needed.
if (targetType != TypeSubdirs || addDeploymentExtension) {
QString gnuMakefileName = QLatin1String("Makefile_") + uid3;
- removeSpecialCharacters(gnuMakefileName);
+ removeEpocSpecialCharacters(gnuMakefileName);
gnuMakefileName.append(".mk");
t << "gnumakefile " << gnuMakefileName << endl;
}