forked from qt-creator/qt-creator
Debugger: Dissolve AnalyzerUtils::logToIssuesPane()
If the Error + popup combo is generic it should live in TaskHub. If it is not, end user code should decide when to popup. Not an intermediate level. Change-Id: I195ba8c17c5cc192ff9762ed6f45629143bcbb35 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -53,6 +53,7 @@
|
||||
#include <projectexplorer/project.h>
|
||||
#include <projectexplorer/runconfiguration.h>
|
||||
#include <projectexplorer/target.h>
|
||||
#include <projectexplorer/taskhub.h>
|
||||
#include <projectexplorer/session.h>
|
||||
#include <projectexplorer/buildconfiguration.h>
|
||||
|
||||
@@ -592,8 +593,9 @@ void MemcheckTool::loadExternalXmlLogFile()
|
||||
QFile *logFile = new QFile(filePath);
|
||||
if (!logFile->open(QIODevice::ReadOnly | QIODevice::Text)) {
|
||||
delete logFile;
|
||||
AnalyzerUtils::logToIssuesPane(Task::Error,
|
||||
tr("Memcheck: Failed to open file for reading: %1").arg(filePath));
|
||||
QString msg = tr("Memcheck: Failed to open file for reading: %1").arg(filePath);
|
||||
TaskHub::addTask(Task::Error, msg, Debugger::Constants::ANALYZERTASK_ID);
|
||||
TaskHub::requestPopup();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -623,8 +625,9 @@ void MemcheckTool::parserError(const Error &error)
|
||||
|
||||
void MemcheckTool::internalParserError(const QString &errorString)
|
||||
{
|
||||
AnalyzerUtils::logToIssuesPane(Task::Error,
|
||||
tr("Memcheck: Error occurred parsing Valgrind output: %1").arg(errorString));
|
||||
QString msg = tr("Memcheck: Error occurred parsing Valgrind output: %1").arg(errorString);
|
||||
TaskHub::addTask(Task::Error, msg, Debugger::Constants::ANALYZERTASK_ID);
|
||||
TaskHub::requestPopup();
|
||||
}
|
||||
|
||||
void MemcheckTool::clearErrorView()
|
||||
|
||||
Reference in New Issue
Block a user