From 772a9a943aafb799df9a7bcdb5700ca11ea08b69 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 6 Oct 2009 17:12:52 +0200 Subject: Trk/S60: Determine symbol file correctly. --- .../qt-s60/s60devicerunconfiguration.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.cpp') diff --git a/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.cpp b/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.cpp index c0e43169a6..81f1112415 100644 --- a/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.cpp +++ b/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.cpp @@ -209,9 +209,18 @@ static QString localExecutableFromPkgFile(const QString &pkgFileName, QString *e // "/foo.exe" - "!:\device_bin\foo.exe" const QRegExp exePattern = QRegExp(QLatin1String("^\"([^\"]+\\.exe)\" +-.*$")); Q_ASSERT(exePattern.isValid()); - foreach(const QString &line, QString::fromLocal8Bit(pkgFile.readAll()).split(QLatin1Char('\n'))) - if (exePattern.exactMatch(line)) - return exePattern.cap(1); + + foreach(const QString &line, QString::fromLocal8Bit(pkgFile.readAll()).split(QLatin1Char('\n'))) { + if (exePattern.exactMatch(line)) { + QString rc = exePattern.cap(1); +#ifdef Q_OS_WIN + // Sometimes, the drive letter is missing. Use that of the pkg file + if (rc.at(0) == QLatin1Char('/')) + rc.insert(0, pkgFileName.left(2)); +#endif + return rc; + } + } *errorMessage = S60DeviceRunConfiguration::tr("Unable to find the executable in the package file %1.").arg(pkgFileName); return QString(); } -- cgit v1.2.1