PluginDialog: Fix warnings

Change-Id: Icf4b80cccf0eac8f0f2ec5efddb41342e5cfa188
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Tobias Hunger
2020-03-23 12:11:00 +01:00
parent d3ab2bb990
commit 95947f280f

View File

@@ -73,9 +73,9 @@ const char kApplicationInstall[] = "ApplicationInstall";
static bool hasLibSuffix(const QString &path)
{
return HostOsInfo().isWindowsHost() && path.endsWith(".dll", Qt::CaseInsensitive)
|| HostOsInfo().isLinuxHost() && QFileInfo(path).completeSuffix().startsWith(".so")
|| HostOsInfo().isMacHost() && path.endsWith(".dylib");
return (HostOsInfo().isWindowsHost() && path.endsWith(".dll", Qt::CaseInsensitive))
|| (HostOsInfo().isLinuxHost() && QFileInfo(path).completeSuffix().startsWith(".so"))
|| (HostOsInfo().isMacHost() && path.endsWith(".dylib"));
}
static bool isZipFile(const QString &path)
@@ -101,12 +101,13 @@ static Utils::optional<Tool> unzipTool(const FilePath &src, const FilePath &dest
Utils::HostOsInfo::withExecutableSuffix("7z"));
if (!sevenzip.isEmpty())
return Tool{sevenzip, {"x", QString("-o") + dest.toString(), "-y", src.toString()}};
return Utils::nullopt;
const FilePath cmake = Utils::Environment::systemEnvironment().searchInPath(
Utils::HostOsInfo::withExecutableSuffix("cmake"));
if (!cmake.isEmpty())
return Tool{cmake, {"-E", "tar", "xvf", src.toString()}};
return {};
}
class SourcePage : public WizardPage