ProjectExplorer: Remove SysRootKitInformation::hasSysRoot()

This function is exactly the same as SysrootKitInformation::sysroot(),
except that is returns a boolean. And it's always used like this:
if (SysRootKitInformation::hasSysRoot(k))
    sysroot = SysRootKitInformation::SysrootKitInformation::sysroot(k);
Which means that the same code is executed twice in a row.
There is no point in this, so let's just remove it.

Change-Id: I95e4de101d6164ed48558b888e22ed8892fc6d9b
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This commit is contained in:
Christian Kandeler
2019-01-08 14:02:33 +01:00
parent 170b2e4638
commit d59663cfe4
6 changed files with 4 additions and 17 deletions

View File

@@ -223,7 +223,7 @@ QVariantMap DefaultPropertyProvider::autoGeneratedProperties(const ProjectExplor
QVariantMap data = defaultData;
const QString sysroot = ProjectExplorer::SysRootKitInformation::sysRoot(k).toUserOutput();
if (ProjectExplorer::SysRootKitInformation::hasSysRoot(k))
if (!sysroot.isEmpty())
data.insert(QLatin1String(QBS_SYSROOT), sysroot);
ProjectExplorer::ToolChain *tcC