forked from qt-creator/qt-creator
Cppcheck: Finish progress bar on fail
Fixes: QTCREATORBUG-27961 Change-Id: If1bbd5b14ec77e8bde1617c692388a2868e3ce0f Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
@@ -140,7 +140,7 @@ void CppcheckRunner::handleDone()
|
||||
if (m_process.result() == ProcessResult::FinishedWithSuccess)
|
||||
m_tool.finishParsing();
|
||||
else
|
||||
Core::MessageManager::writeSilently(m_process.exitMessage());
|
||||
m_tool.finishWithFail(m_process.exitMessage());
|
||||
|
||||
m_currentFiles.clear();
|
||||
m_process.close();
|
||||
|
@@ -304,4 +304,12 @@ void CppcheckTool::finishParsing()
|
||||
m_progress->reportFinished();
|
||||
}
|
||||
|
||||
void CppcheckTool::finishWithFail(const QString &exitMessage)
|
||||
{
|
||||
if (!exitMessage.isEmpty())
|
||||
Core::MessageManager::writeSilently(exitMessage);
|
||||
QTC_ASSERT(m_progress, return);
|
||||
m_progress->cancelAndFinish();
|
||||
}
|
||||
|
||||
} // Cppcheck::Internal
|
||||
|
@@ -42,6 +42,7 @@ public:
|
||||
void parseOutputLine(const QString &line);
|
||||
void parseErrorLine(const QString &line);
|
||||
void finishParsing();
|
||||
void finishWithFail(const QString &exitMessage);
|
||||
|
||||
private:
|
||||
void updateArguments();
|
||||
|
Reference in New Issue
Block a user