Commit df520ac8 authored by Knut Petter Svendsen's avatar Knut Petter Svendsen
Browse files

ClearCase: Better debug output



Change-Id: I1daeda0159558377a43f04845b974155ddc77d57
Reviewed-by: Orgad Shaneh's avatarOrgad Shaneh <orgads@gmail.com>
parent 7f5a031a
...@@ -700,6 +700,27 @@ ClearCaseSubmitEditor *ClearCasePlugin::openClearCaseSubmitEditor(const QString ...@@ -700,6 +700,27 @@ ClearCaseSubmitEditor *ClearCasePlugin::openClearCaseSubmitEditor(const QString
return submitEditor; return submitEditor;
} }
QString fileStatusToText(FileStatus fileStatus)
{
switch (fileStatus.status)
{
case FileStatus::CheckedIn:
return QLatin1String("CheckedIn");
case FileStatus::CheckedOut:
return QLatin1String("CheckedOut");
case FileStatus::Hijacked:
return QLatin1String("Hijacked");
case FileStatus::Missing:
return QLatin1String("Missing");
case FileStatus::NotManaged:
return QLatin1String("ViewPrivate");
case FileStatus::Unknown:
return QLatin1String("Unknown");
default:
return QLatin1String("default");
}
}
void ClearCasePlugin::updateStatusActions() void ClearCasePlugin::updateStatusActions()
{ {
FileStatus fileStatus = FileStatus::Unknown; FileStatus fileStatus = FileStatus::Unknown;
...@@ -709,7 +730,8 @@ void ClearCasePlugin::updateStatusActions() ...@@ -709,7 +730,8 @@ void ClearCasePlugin::updateStatusActions()
fileStatus = m_statusMap->value(absoluteFileName, FileStatus(FileStatus::Unknown)); fileStatus = m_statusMap->value(absoluteFileName, FileStatus(FileStatus::Unknown));
if (Constants::debug) if (Constants::debug)
qDebug() << Q_FUNC_INFO << absoluteFileName << ", status = " << fileStatus.status; qDebug() << Q_FUNC_INFO << absoluteFileName << ", status = "
<< fileStatusToText(fileStatus.status) << "(" << fileStatus.status << ")";
} }
m_checkOutAction->setEnabled(hasFile && (fileStatus.status & (FileStatus::CheckedIn | FileStatus::Hijacked))); m_checkOutAction->setEnabled(hasFile && (fileStatus.status & (FileStatus::CheckedIn | FileStatus::Hijacked)));
......
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