summaryrefslogtreecommitdiffstats
path: root/tools/devtool
diff options
context:
space:
mode:
authorkh1 <karsten.heimrich@digia.com>2014-10-10 15:21:28 +0200
committerKarsten Heimrich <karsten.heimrich@digia.com>2014-10-10 15:35:56 +0200
commita88d6dc9d329387c7cb8fe4c53208561e0986daf (patch)
tree2159ce72a18b500670765db725be7c4fa9e536be /tools/devtool
parent1d080a743c7c7764b3459da3aab5302cf9adc98a (diff)
Fix relative path issue.
Change-Id: Ia866503bf503a4b1dce8fbb44cc4240463302eb8 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Diffstat (limited to 'tools/devtool')
-rw-r--r--tools/devtool/binaryreplace.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/devtool/binaryreplace.cpp b/tools/devtool/binaryreplace.cpp
index 4bd76178d..131bd5ea5 100644
--- a/tools/devtool/binaryreplace.cpp
+++ b/tools/devtool/binaryreplace.cpp
@@ -62,9 +62,10 @@ int BinaryReplace::replace(const QString &source, const QString &target)
{
const QUrl url = QUrl::fromUserInput(source);
QFutureWatcher<QInstaller::FileTaskResult> taskWatcher;
- if (url.isLocalFile()) {
+ if (url.isRelative() || url.isLocalFile()) {
taskWatcher.setFuture(QtConcurrent::run(&QInstaller::CopyFileTask::doTask,
- new QInstaller::CopyFileTask(QInstaller::FileTaskItem(url.toLocalFile()))));
+ new QInstaller::CopyFileTask(QInstaller::FileTaskItem(QFileInfo(source)
+ .absoluteFilePath()))));
} else {
taskWatcher.setFuture(QtConcurrent::run(&QInstaller::DownloadFileTask::doTask,
new QInstaller::DownloadFileTask(QInstaller::FileTaskItem(url.toString()))));