diff options
author | Andre Hartmann <aha_1980@gmx.de> | 2019-01-03 20:53:24 +0100 |
---|---|---|
committer | André Hartmann <aha_1980@gmx.de> | 2019-01-04 11:30:30 +0000 |
commit | 2bb24633ac0ad0b8e8e72ef4d0737e30130d946f (patch) | |
tree | 0d0cdb2be13b729f288fc1b3a446186bffde97dd | |
parent | 4cc32d411abd42b941e2f5267d45c0b72d18d737 (diff) | |
download | qt-creator-2bb24633ac0ad0b8e8e72ef4d0737e30130d946f.tar.gz |
FileInProjectFinder: Fix findFile() for nonexisting files
The comment above this function says:
If all fails, it returns the original path
from the file URL.
That broke with 7b0b4c92cdd, which caused the auto
tests in QtSupportPlugin::testQtOutputFormatter
to fail.
Fixes: QTCREATORBUG-21792
Change-Id: I9ed66c86e7a165fe198ee3fcf1bf8b72d850a2d5
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
-rw-r--r-- | src/libs/utils/fileinprojectfinder.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libs/utils/fileinprojectfinder.cpp b/src/libs/utils/fileinprojectfinder.cpp index 33a779a91d..2be64260e8 100644 --- a/src/libs/utils/fileinprojectfinder.cpp +++ b/src/libs/utils/fileinprojectfinder.cpp @@ -144,7 +144,7 @@ QString FileInProjectFinder::findFile(const QUrl &fileUrl, bool *success) const if (originalPath.isEmpty()) // e.g. qrc:// originalPath = fileUrl.path(); - QString result; + QString result = originalPath; bool found = findFileOrDirectory(originalPath, [&](const QString &fileName, int) { result = fileName; }); |