forked from qt-creator/qt-creator
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 7b0b4c92cd
, 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>
This commit is contained in:
committed by
André Hartmann
parent
4cc32d411a
commit
2bb24633ac
@@ -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;
|
||||
});
|
||||
|
Reference in New Issue
Block a user