Commit 4d488345 authored by Knut Petter Svendsen's avatar Knut Petter Svendsen Committed by Eike Ziller
Browse files

ClearCase: Fixed soft assert when currentState has no file

The first time updateStatusActions was executed the currentState
had no file, then currentState().relativeCurrentFile() would
give an soft assert.

Change-Id: I4566ace3e538c9834a4a47857f4234a527c37641
Reviewed-by: Orgad Shaneh's avatarOrgad Shaneh <>
Reviewed-by: default avatarEike Ziller <>
parent 5db9e59e
......@@ -607,13 +607,15 @@ ClearCaseSubmitEditor *ClearCasePlugin::openClearCaseSubmitEditor(const QString
void ClearCasePlugin::updateStatusActions()
FileStatus fileStatus = FileStatus::Unknown;
bool hasFile = currentState().hasFile();
if (hasFile) {
QString fileName = currentState().relativeCurrentFile();
FileStatus fileStatus = m_statusMap->value(fileName, FileStatus(FileStatus::Unknown));
fileStatus = m_statusMap->value(fileName, FileStatus(FileStatus::Unknown));
if (ClearCase::Constants::debug)
qDebug() << Q_FUNC_INFO << fileName << ", status = " << fileStatus.status;
m_checkOutAction->setEnabled(hasFile && (fileStatus.status & (FileStatus::CheckedIn | FileStatus::Hijacked)));
m_undoCheckOutAction->setEnabled(hasFile && (fileStatus.status & FileStatus::CheckedOut));
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