summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
authorBruno Abinader <bruno.abinader@openbossa.org>2010-10-08 12:09:25 (GMT)
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2010-10-08 12:12:17 (GMT)
commitf8a6897cf79821b2c5a8443ce18cf66aa5a8d0d8 (patch)
tree13657298402be9ba032666bca3e6909a0d0bb50d /qmake
parent13017507c92550de7db5f04e205e7e92812d5586 (diff)
downloadQt-f8a6897cf79821b2c5a8443ce18cf66aa5a8d0d8.zip
Qt-f8a6897cf79821b2c5a8443ce18cf66aa5a8d0d8.tar.gz
Qt-f8a6897cf79821b2c5a8443ce18cf66aa5a8d0d8.tar.bz2
Added missing native separator transforms.
This patch fixes the deployment of files when using Qt For Symbian SDK on Linux. Merge-request: 839 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Diffstat (limited to 'qmake')
-rw-r--r--qmake/generators/symbian/initprojectdeploy_symbian.cpp7
-rw-r--r--qmake/generators/symbian/symmake_abld.cpp10
2 files changed, 14 insertions, 3 deletions
diff --git a/qmake/generators/symbian/initprojectdeploy_symbian.cpp b/qmake/generators/symbian/initprojectdeploy_symbian.cpp
index 776a646..5963773 100644
--- a/qmake/generators/symbian/initprojectdeploy_symbian.cpp
+++ b/qmake/generators/symbian/initprojectdeploy_symbian.cpp
@@ -59,7 +59,12 @@
static QString fixPathToEpocOS(const QString &src)
{
QString ret = Option::fixPathToTargetOS(src);
- return ret.replace('/', '\\');
+
+ bool pathHasDriveLetter = false;
+ if (ret.size() > 1)
+ pathHasDriveLetter = (ret.at(1) == QLatin1Char(':'));
+
+ return pathHasDriveLetter ? ret.replace('/', '\\') : QDir::toNativeSeparators(ret);
}
static bool isPlugin(const QFileInfo& info, const QString& devicePath)
diff --git a/qmake/generators/symbian/symmake_abld.cpp b/qmake/generators/symbian/symmake_abld.cpp
index 7416cbe..127d5c0 100644
--- a/qmake/generators/symbian/symmake_abld.cpp
+++ b/qmake/generators/symbian/symmake_abld.cpp
@@ -427,7 +427,8 @@ bool SymbianAbldMakefileGenerator::writeDeploymentTargets(QTextStream &t, bool i
t << WINSCW_DEPLOYMENT_TARGET ":" << endl;
QString remoteTestPath = epocRoot()
- + QLatin1String(isRom ? "epoc32\\data\\z\\private\\" : "epoc32\\winscw\\c\\private\\")
+ + QDir::toNativeSeparators(QLatin1String(isRom ? "epoc32/data/z/private/"
+ : "epoc32/winscw/c/private/"))
+ privateDirUid;
DeploymentList depList;
@@ -439,11 +440,16 @@ bool SymbianAbldMakefileGenerator::writeDeploymentTargets(QTextStream &t, bool i
t << "\t-echo Deploying changed files..." << endl;
for (int i = 0; i < depList.size(); ++i) {
+#ifdef Q_OS_WIN32
// Xcopy prompts for selecting file or directory if target doesn't exist,
// and doesn't provide switch to force file selection. It does provide dir forcing, though,
// so strip the last part of the destination.
t << "\t-$(XCOPY) \"" << depList.at(i).from << "\" \""
<< depList.at(i).to.left(depList.at(i).to.lastIndexOf("\\") + 1) << "\"" << endl;
+#else
+ t << "\t-$(XCOPY) \"" << QDir::toNativeSeparators(depList.at(i).from) << "\" \""
+ << QDir::toNativeSeparators(depList.at(i).to) << "\"" << endl;
+#endif
}
t << endl;
@@ -455,7 +461,7 @@ bool SymbianAbldMakefileGenerator::writeDeploymentTargets(QTextStream &t, bool i
QStringList cleanList;
for (int i = 0; i < depList.size(); ++i) {
- cleanList.append(depList.at(i).to);
+ cleanList.append(QDir::toNativeSeparators(depList.at(i).to));
}
generateCleanCommands(t, cleanList, "$(DEL_FILE)", "", "", "");