Commit f777930a authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Tobias Hunger
Browse files

ClearCase: Avoid running cleartool if it is not available

Also change isConfigured to use a plain QFileInfo like other VCS

Change-Id: I253d9a7d356a042dbc6c15236d77799b794f29d4
Reviewed-by: default avatarTobias Hunger <>
parent 20fe4725
......@@ -59,7 +59,11 @@ Core::Id ClearCaseControl::id() const
bool ClearCaseControl::isConfigured() const
return !Utils::SynchronousProcess::locateBinary(m_plugin->settings().ccCommand).isEmpty();
const QString binary = m_plugin->settings().ccBinaryPath;
if (binary.isEmpty())
return false;
QFileInfo fi(binary);
return fi.exists() && fi.isFile() && fi.isExecutable();
bool ClearCaseControl::supportsOperation(Operation operation) const
......@@ -212,7 +212,7 @@ QString ClearCasePlugin::findTopLevel(const QString &directory) const
// Snapshot view
QString topLevel =
findRepositoryForDirectory(directory, QLatin1String(ClearCase::Constants::CLEARCASE_ROOT_FILE));
if (!topLevel.isEmpty())
if (!topLevel.isEmpty() || !clearCaseControl()->isConfigured())
return topLevel;
// Dynamic view
bool isDynamic;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment