summaryrefslogtreecommitdiffstats
path: root/qmake/generators
diff options
context:
space:
mode:
Diffstat (limited to 'qmake/generators')
-rw-r--r--qmake/generators/symbian/symmake.cpp35
-rw-r--r--qmake/generators/symbian/symmake.h2
2 files changed, 14 insertions, 23 deletions
diff --git a/qmake/generators/symbian/symmake.cpp b/qmake/generators/symbian/symmake.cpp
index a712434..217c1c3 100644
--- a/qmake/generators/symbian/symmake.cpp
+++ b/qmake/generators/symbian/symmake.cpp
@@ -109,11 +109,13 @@ QString SymbianMakefileGenerator::fixPathForMmp(const QString& origPath, const Q
{
static QString epocRootStr;
if (epocRootStr.isEmpty()) {
- QFileInfo efi(epocRoot());
- epocRootStr = efi.canonicalFilePath();
- if (epocRootStr.isEmpty()) {
+ epocRootStr = epocRoot();
+ QFileInfo efi(epocRootStr);
+ if (!efi.exists() || epocRootStr.isEmpty()) {
fprintf(stderr, "Unable to resolve epocRoot '%s' to real dir on current drive, defaulting to '/' for mmp paths\n", qPrintable(epocRoot()));
epocRootStr = "/";
+ } else {
+ epocRootStr = efi.absoluteFilePath();
}
if (!epocRootStr.endsWith("/"))
epocRootStr += "/";
@@ -137,16 +139,8 @@ QString SymbianMakefileGenerator::fixPathForMmp(const QString& origPath, const Q
return resultPath;
}
-QString SymbianMakefileGenerator::canonizePath(const QString& origPath)
+QString SymbianMakefileGenerator::absolutizePath(const QString& origPath)
{
- // Since current path gets appended almost always anyway, use it as default
- // for nonexisting paths.
- static QString defaultPath;
- if (defaultPath.isEmpty()) {
- QFileInfo fi(".");
- defaultPath = fi.canonicalFilePath();
- }
-
// Prepend epocroot to any paths beginning with "/epoc32/"
QString resultPath = QDir::fromNativeSeparators(origPath);
if (resultPath.startsWith("/epoc32/", Qt::CaseInsensitive))
@@ -154,16 +148,13 @@ QString SymbianMakefileGenerator::canonizePath(const QString& origPath)
QFileInfo fi(fileInfo(resultPath));
if (fi.isDir()) {
- resultPath = fi.canonicalFilePath();
+ resultPath = fi.absoluteFilePath();
} else {
- resultPath = fi.canonicalPath();
+ resultPath = fi.absolutePath();
}
resultPath = QDir::cleanPath(resultPath);
- if (resultPath.isEmpty())
- resultPath = defaultPath;
-
return resultPath;
}
@@ -695,7 +686,7 @@ void SymbianMakefileGenerator::initMmpVariables()
srcpaths << project->values("UI_DIR");
QDir current = QDir::current();
- QString canonizedCurrent = canonizePath(".");
+ QString absolutizedCurrent = absolutizePath(".");
for (int j = 0; j < srcpaths.size(); ++j) {
QFileInfo fi(fileInfo(srcpaths.at(j)));
@@ -703,10 +694,10 @@ void SymbianMakefileGenerator::initMmpVariables()
if (fi.suffix().startsWith("c")) {
if (fi.filePath().length() > fi.fileName().length()) {
appendIfnotExist(srcincpaths, fi.path());
- sources[canonizePath(fi.path())] += fi.fileName();
+ sources[absolutizePath(fi.path())] += fi.fileName();
} else {
- sources[canonizedCurrent] += fi.fileName();
- appendIfnotExist(srcincpaths, canonizedCurrent);
+ sources[absolutizedCurrent] += fi.fileName();
+ appendIfnotExist(srcincpaths, absolutizedCurrent);
}
}
}
@@ -720,7 +711,7 @@ void SymbianMakefileGenerator::initMmpVariables()
incpaths << project->values("UI_DIR");
for (int j = 0; j < incpaths.size(); ++j) {
- QString includepath = canonizePath(incpaths.at(j));
+ QString includepath = absolutizePath(incpaths.at(j));
appendIfnotExist(sysincspaths, includepath);
appendAbldTempDirs(sysincspaths, includepath);
}
diff --git a/qmake/generators/symbian/symmake.h b/qmake/generators/symbian/symmake.h
index 77d61da..542284c 100644
--- a/qmake/generators/symbian/symmake.h
+++ b/qmake/generators/symbian/symmake.h
@@ -84,7 +84,7 @@ protected:
void removeSpecialCharacters(QString& str);
QString fixPathForMmp(const QString& origPath, const QDir& parentDir);
- QString canonizePath(const QString& origPath);
+ QString absolutizePath(const QString& origPath);
virtual bool writeMakefile(QTextStream &t);
void generatePkgFile(const QString &iconFile, DeploymentList &depList);