Various Plugins: Simplify return FilePath statements

Change-Id: Ia9efb86f722caca1492b577d51442f1f23b804b4
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Jarek Kobus
2023-08-02 08:09:26 +02:00
parent 82712e12f8
commit 8dd46d0399
24 changed files with 35 additions and 38 deletions

View File

@@ -98,9 +98,9 @@ Utils::FilePath QmlProfilerDetailsRewriter::getLocalFile(const QString &remoteFi
{
const Utils::FilePath localFile = m_projectFinder.findFile(remoteFile).constFirst();
if (!localFile.exists() || !localFile.isReadableFile())
return Utils::FilePath();
return {};
if (!QmlJS::ModelManagerInterface::guessLanguageOfFile(localFile).isQmlLikeOrJsLanguage())
return Utils::FilePath();
return {};
return localFile.canonicalPath();
}