From 751d352c8ee317511da0a3f3fa39cbf1e7d220f0 Mon Sep 17 00:00:00 2001 From: hjk Date: Thu, 6 Feb 2025 13:08:27 +0100 Subject: [PATCH] Utils: Remove some double negations in FilePath Leftover of the needsDevice() -> !isLocal() change. Change-Id: I1a97cc274c01c272cd54745397eff442490f08d2 Reviewed-by: Marcus Tillmanns --- src/libs/utils/filepath.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/libs/utils/filepath.cpp b/src/libs/utils/filepath.cpp index a3263e4a0e9..e56f82a1cb7 100644 --- a/src/libs/utils/filepath.cpp +++ b/src/libs/utils/filepath.cpp @@ -1122,7 +1122,7 @@ FilePath FilePath::parentDir() const FilePath FilePath::absolutePath() const { - if (!!isLocal() && isEmpty()) + if (isLocal() && isEmpty()) return *this; const FilePath parentPath = isAbsolutePath() ? parentDir() @@ -1134,7 +1134,7 @@ FilePath FilePath::absoluteFilePath() const { if (isAbsolutePath()) return cleanPath(); - if (!!isLocal() && isEmpty()) + if (isLocal() && isEmpty()) return cleanPath(); return FilePath::currentWorkingPath().resolvePath(*this); @@ -1167,7 +1167,7 @@ const QString &FilePath::specialDeviceRootPath() FilePath FilePath::normalizedPathName() const { FilePath result = *this; - if (!!isLocal()) // FIXME: Assumes no remote Windows and Mac for now. + if (isLocal()) // FIXME: Assumes no remote Windows and Mac for now. result.setParts(scheme(), host(), FileUtils::normalizedPathName(path())); return result; } @@ -2039,7 +2039,7 @@ bool FilePath::setPermissions(QFile::Permissions permissions) const OsType FilePath::osType() const { - if (!!isLocal()) + if (isLocal()) return HostOsInfo::hostOs(); QTC_ASSERT(deviceFileHooks().osType, return HostOsInfo::hostOs()); @@ -2367,7 +2367,7 @@ FilePath FilePath::resolvePath(const QString &tail) const expected_str FilePath::localSource() const { - if (!!isLocal()) + if (isLocal()) return *this; QTC_ASSERT(deviceFileHooks().localSource,