forked from qt-creator/qt-creator
QtSupport: Fix QtOutputFormatter auto tests
The comment above FileInProjectFinder::findFile() states:
"If all fails, it returns the original path from the file URL."
So if nothing was found in the resource, fall back to this
strategy.
Broken by 55b0cc7814
Fixes: QTCREATORBUG-22044
Change-Id: I09e18aebc6727720d45775ec56f55f9f16d43f86
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
committed by
André Hartmann
parent
b97639158c
commit
dac7d4962c
@@ -146,9 +146,11 @@ QString FileInProjectFinder::findFile(const QUrl &fileUrl, bool *success) const
|
||||
|
||||
if (fileUrl.scheme() == "qrc" || fileUrl.toString().startsWith(':')) {
|
||||
const QString result = m_qrcUrlFinder.find(fileUrl);
|
||||
if (success)
|
||||
*success = !result.isEmpty();
|
||||
return result;
|
||||
if (!result.isEmpty()) {
|
||||
if (success)
|
||||
*success = true;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
QString originalPath = fileUrl.toLocalFile();
|
||||
|
Reference in New Issue
Block a user