Commit 814cd330 authored by hjk's avatar hjk
Browse files

Subversion: Use QTC_ASSERT when appropriate



Change-Id: I07520305e770b02a86828058162fd95b7df44fb6
Reviewed-by: Orgad Shaneh's avatarOrgad Shaneh <orgads@gmail.com>
parent 6728ea32
...@@ -508,7 +508,7 @@ SubversionSubmitEditor *SubversionPlugin::openSubversionSubmitEditor(const QStri ...@@ -508,7 +508,7 @@ SubversionSubmitEditor *SubversionPlugin::openSubversionSubmitEditor(const QStri
Core::IEditor *editor = Core::EditorManager::openEditor(fileName, Core::IEditor *editor = Core::EditorManager::openEditor(fileName,
Constants::SUBVERSIONCOMMITEDITOR_ID); Constants::SUBVERSIONCOMMITEDITOR_ID);
SubversionSubmitEditor *submitEditor = qobject_cast<SubversionSubmitEditor*>(editor); SubversionSubmitEditor *submitEditor = qobject_cast<SubversionSubmitEditor*>(editor);
QTC_CHECK(submitEditor); QTC_ASSERT(submitEditor, return 0);
setSubmitEditor(submitEditor); setSubmitEditor(submitEditor);
submitEditor->registerActions(m_submitUndoAction, m_submitRedoAction, m_submitCurrentLogAction, m_submitDiffAction); submitEditor->registerActions(m_submitUndoAction, m_submitRedoAction, m_submitCurrentLogAction, m_submitDiffAction);
connect(submitEditor, SIGNAL(diffSelectedFiles(QStringList)), this, SLOT(diffCommitFiles(QStringList))); connect(submitEditor, SIGNAL(diffSelectedFiles(QStringList)), this, SLOT(diffCommitFiles(QStringList)));
...@@ -694,6 +694,7 @@ void SubversionPlugin::startCommit(const QString &workingDir, const QStringList ...@@ -694,6 +694,7 @@ void SubversionPlugin::startCommit(const QString &workingDir, const QStringList
m_commitMessageFileName = saver.fileName(); m_commitMessageFileName = saver.fileName();
// Create a submit editor and set file list // Create a submit editor and set file list
SubversionSubmitEditor *editor = openSubversionSubmitEditor(m_commitMessageFileName); SubversionSubmitEditor *editor = openSubversionSubmitEditor(m_commitMessageFileName);
QTC_ASSERT(editor, return);
editor->setStatusList(statusOutput); editor->setStatusList(statusOutput);
} }
......
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