forked from qt-creator/qt-creator
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:
@@ -985,12 +985,12 @@ FilePath FilePath::parentDir() const
|
||||
{
|
||||
const QString basePath = path();
|
||||
if (basePath.isEmpty())
|
||||
return FilePath();
|
||||
return {};
|
||||
|
||||
const QString path = basePath + QLatin1String("/..");
|
||||
const QString parent = doCleanPath(path);
|
||||
if (parent == path)
|
||||
return FilePath();
|
||||
return {};
|
||||
|
||||
return withNewPath(parent);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user