From f70051903a326b4575f7ba2452226ba26ee9ee48 Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Thu, 11 Sep 2014 10:48:23 +0200 Subject: [PATCH] ClearCase: change QTC_CHECK to QTC_ASSERT and remove dead stores. When the QTC_CHECK would fail, a nullptr deref would happen directly after the check. The dead stores are not harmfull, but add noise when checking for dead stores that are due to logic errors. Change-Id: I8285b1b3d941491b581536a7a10678cab7e0ade4 Reviewed-by: Orgad Shaneh --- src/plugins/clearcase/clearcaseplugin.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugins/clearcase/clearcaseplugin.cpp b/src/plugins/clearcase/clearcaseplugin.cpp index 252126a8538..67fd8ef7a6a 100644 --- a/src/plugins/clearcase/clearcaseplugin.cpp +++ b/src/plugins/clearcase/clearcaseplugin.cpp @@ -606,13 +606,13 @@ bool ClearCasePlugin::initialize(const QStringList & /*arguments */, QString *er connect(m_checkInSelectedAction, SIGNAL(triggered()), this, SLOT(checkInSelected())); m_checkInDiffAction = new QAction(VcsBaseSubmitEditor::diffIcon(), tr("Diff Selected Files"), this); - command = ActionManager::registerAction(m_checkInDiffAction , Constants::DIFF_SELECTED, clearcasecheckincontext); + ActionManager::registerAction(m_checkInDiffAction , Constants::DIFF_SELECTED, clearcasecheckincontext); m_submitUndoAction = new QAction(tr("&Undo"), this); - command = ActionManager::registerAction(m_submitUndoAction, Core::Constants::UNDO, clearcasecheckincontext); + ActionManager::registerAction(m_submitUndoAction, Core::Constants::UNDO, clearcasecheckincontext); m_submitRedoAction = new QAction(tr("&Redo"), this); - command = ActionManager::registerAction(m_submitRedoAction, Core::Constants::REDO, clearcasecheckincontext); + ActionManager::registerAction(m_submitRedoAction, Core::Constants::REDO, clearcasecheckincontext); return true; } @@ -774,7 +774,7 @@ ClearCaseSubmitEditor *ClearCasePlugin::openClearCaseSubmitEditor(const QString IEditor *editor = EditorManager::openEditor(fileName, Constants::CLEARCASECHECKINEDITOR_ID); ClearCaseSubmitEditor *submitEditor = qobject_cast(editor); - QTC_CHECK(submitEditor); + QTC_ASSERT(submitEditor, return 0); submitEditor->registerActions(m_submitUndoAction, m_submitRedoAction, m_checkInSelectedAction, m_checkInDiffAction); connect(submitEditor, SIGNAL(diffSelectedFiles(QStringList)), this, SLOT(diffCheckInFiles(QStringList))); submitEditor->setCheckScriptWorkingDirectory(m_checkInView);