forked from qt-creator/qt-creator
Perforce: Use more direct check for executable presence
The !isEmpty check is actually redundant, but currently cheaper than the diversion through FilePath::fileAccess(). Change-Id: I44e6ec128c78cccf57c7276da70577a87b8c2f96 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -1117,11 +1117,8 @@ bool PerforcePluginPrivate::isVcsFileOrDirectory(const FilePath &filePath) const
|
|||||||
|
|
||||||
bool PerforcePluginPrivate::isConfigured() const
|
bool PerforcePluginPrivate::isConfigured() const
|
||||||
{
|
{
|
||||||
const QString binary = m_settings.p4BinaryPath.value();
|
const FilePath binary = m_settings.p4BinaryPath();
|
||||||
if (binary.isEmpty())
|
return !binary.isEmpty() && binary.isExecutableFile();
|
||||||
return false;
|
|
||||||
QFileInfo fi(binary);
|
|
||||||
return fi.exists() && fi.isFile() && fi.isExecutable();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PerforcePluginPrivate::supportsOperation(Operation operation) const
|
bool PerforcePluginPrivate::supportsOperation(Operation operation) const
|
||||||
|
Reference in New Issue
Block a user