From 372b10db87fa11bbd66fe36ba7d569dc9de6fa47 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Thu, 21 Jul 2011 15:32:20 +0200 Subject: [PATCH] FileInProjectFinder: Fix compilation with 4.7.4 Don't depend on QUrl::isLocalFile, which only exists in 4.8. Change-Id: I67a8e35c8754396424c5578216bc6deb02ae0d50 Reviewed-on: http://codereview.qt.nokia.com/1959 Reviewed-by: Qt Sanity Bot Reviewed-by: Christian Kandeler --- src/libs/utils/fileinprojectfinder.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/libs/utils/fileinprojectfinder.cpp b/src/libs/utils/fileinprojectfinder.cpp index aa57785dd57..13092accb45 100644 --- a/src/libs/utils/fileinprojectfinder.cpp +++ b/src/libs/utils/fileinprojectfinder.cpp @@ -98,13 +98,9 @@ void FileInProjectFinder::setProjectFiles(const QStringList &projectFiles) */ QString FileInProjectFinder::findFile(const QUrl &fileUrl, bool *success) const { - QString originalPath; - if (fileUrl.isLocalFile()) { - originalPath = fileUrl.toLocalFile(); - } else { - // strip e.g. leading qrc:// + QString originalPath = fileUrl.toLocalFile(); + if (originalPath.isEmpty()) // e.g. qrc:// originalPath = fileUrl.path(); - } if (originalPath.isEmpty()) { if (success)