forked from qt-creator/qt-creator
Utils: Remove FileName::isNull
... and its uses in order to shrink the FileName interface. Change-Id: I4b9a229d98ad53c4f189e381c89241981ddbed2e Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -97,7 +97,6 @@ public:
|
||||
|
||||
using QString::clear;
|
||||
using QString::isEmpty;
|
||||
using QString::isNull;
|
||||
|
||||
private:
|
||||
FileName(const QString &string);
|
||||
|
||||
@@ -71,7 +71,7 @@ Abi NimToolChain::targetAbi() const
|
||||
|
||||
bool NimToolChain::isValid() const
|
||||
{
|
||||
if (m_compilerCommand.isNull())
|
||||
if (m_compilerCommand.isEmpty())
|
||||
return false;
|
||||
QFileInfo fi = compilerCommand().toFileInfo();
|
||||
return fi.isExecutable();
|
||||
|
||||
@@ -329,7 +329,7 @@ QList<Abi> GccToolChain::supportedAbis() const
|
||||
|
||||
bool GccToolChain::isValid() const
|
||||
{
|
||||
if (m_compilerCommand.isNull())
|
||||
if (m_compilerCommand.isEmpty())
|
||||
return false;
|
||||
|
||||
QFileInfo fi = compilerCommand().toFileInfo();
|
||||
|
||||
@@ -259,15 +259,15 @@ bool QbsBuildStep::hasCustomInstallRoot() const
|
||||
|
||||
Utils::FileName QbsBuildStep::installRoot(VariableHandling variableHandling) const
|
||||
{
|
||||
Utils::FileName root = Utils::FileName::fromString(qbsConfiguration(variableHandling)
|
||||
.value(Constants::QBS_INSTALL_ROOT_KEY).toString());
|
||||
if (root.isNull()) {
|
||||
const QbsBuildConfiguration * const bc
|
||||
= static_cast<QbsBuildConfiguration *>(buildConfiguration());
|
||||
root = bc->buildDirectory().appendPath(bc->configurationName())
|
||||
.appendPath(qbs::InstallOptions::defaultInstallRoot());
|
||||
}
|
||||
return root;
|
||||
const QString root =
|
||||
qbsConfiguration(variableHandling).value(Constants::QBS_INSTALL_ROOT_KEY).toString();
|
||||
if (!root.isNull())
|
||||
return Utils::FileName::fromString(root);
|
||||
|
||||
const QbsBuildConfiguration * const bc
|
||||
= static_cast<QbsBuildConfiguration *>(buildConfiguration());
|
||||
return bc->buildDirectory().appendPath(bc->configurationName())
|
||||
.appendPath(qbs::InstallOptions::defaultInstallRoot());
|
||||
}
|
||||
|
||||
int QbsBuildStep::maxJobs() const
|
||||
|
||||
@@ -549,7 +549,7 @@ void QtOptionsPageWidget::addQtDir()
|
||||
BuildableHelperLibrary::filterForQmakeFileDialog(),
|
||||
0,
|
||||
QFileDialog::DontResolveSymlinks));
|
||||
if (qtVersion.isNull())
|
||||
if (qtVersion.isEmpty())
|
||||
return;
|
||||
|
||||
QFileInfo fi = qtVersion.toFileInfo();
|
||||
@@ -621,7 +621,7 @@ void QtOptionsPageWidget::editPath()
|
||||
BuildableHelperLibrary::filterForQmakeFileDialog(),
|
||||
0,
|
||||
QFileDialog::DontResolveSymlinks));
|
||||
if (qtVersion.isNull())
|
||||
if (qtVersion.isEmpty())
|
||||
return;
|
||||
BaseQtVersion *version = QtVersionFactory::createQtVersionFromQMakePath(qtVersion);
|
||||
if (!version)
|
||||
|
||||
Reference in New Issue
Block a user