diff options
author | hjk <hjk@qt.io> | 2020-01-15 08:56:11 +0100 |
---|---|---|
committer | hjk <hjk@qt.io> | 2020-01-20 10:11:59 +0000 |
commit | 0334b6e491a3688f2455e075595afde87b8f76af (patch) | |
tree | cc63a1fae976a46ea6ddc5d2cb956d1d7ac37516 /src/plugins/debugger | |
parent | 7e19d1af7c356dae703e110f9d24b75429ef8fb5 (diff) |
ProjectManager: Add convenience Task subclasses
For Compile, BuildSystem and Deployment. Unclutters user code and reduces
binary size.
Change-Id: Ia18e917bb411754162e9f4ec6056d752a020bb50
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/plugins/debugger')
-rw-r--r-- | src/plugins/debugger/cdb/cdbengine.cpp | 6 | ||||
-rw-r--r-- | src/plugins/debugger/debuggerkitinformation.cpp | 13 | ||||
-rw-r--r-- | src/plugins/debugger/gdb/gdbengine.cpp | 3 |
3 files changed, 11 insertions, 11 deletions
diff --git a/src/plugins/debugger/cdb/cdbengine.cpp b/src/plugins/debugger/cdb/cdbengine.cpp index ec6edfd0839..ea769c7fee0 100644 --- a/src/plugins/debugger/cdb/cdbengine.cpp +++ b/src/plugins/debugger/cdb/cdbengine.cpp @@ -2147,9 +2147,9 @@ void CdbEngine::handleExtensionMessage(char t, int token, const QString &what, c const FilePath fileName = FilePath::fromUserInput(exception.file); const QString taskEntry = tr("Debugger encountered an exception: %1").arg( exception.toString(false).trimmed()); - TaskHub::addTask(type, taskEntry, - Constants::TASK_CATEGORY_DEBUGGER_RUNTIME, - fileName, exception.lineNumber); + TaskHub::addTask(Task(type, taskEntry, + fileName, exception.lineNumber, + Constants::TASK_CATEGORY_DEBUGGER_RUNTIME)); } return; } diff --git a/src/plugins/debugger/debuggerkitinformation.cpp b/src/plugins/debugger/debuggerkitinformation.cpp index 356dd9ed952..f13fcb10384 100644 --- a/src/plugins/debugger/debuggerkitinformation.cpp +++ b/src/plugins/debugger/debuggerkitinformation.cpp @@ -355,27 +355,26 @@ Tasks DebuggerKitAspect::validateDebugger(const Kit *k) if (const DebuggerItem *item = debugger(k)) path = item->command().toUserOutput(); - const Core::Id id = ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM; if (errors & NoDebugger) - result << Task(Task::Warning, tr("No debugger set up."), FilePath(), -1, id); + result << BuildSystemTask(Task::Warning, tr("No debugger set up.")); if (errors & DebuggerNotFound) - result << Task(Task::Error, tr("Debugger \"%1\" not found.").arg(path), - FilePath(), -1, id); + result << BuildSystemTask(Task::Error, tr("Debugger \"%1\" not found.").arg(path)); + if (errors & DebuggerNotExecutable) - result << Task(Task::Error, tr("Debugger \"%1\" not executable.").arg(path), FilePath(), -1, id); + result << BuildSystemTask(Task::Error, tr("Debugger \"%1\" not executable.").arg(path)); if (errors & DebuggerNeedsAbsolutePath) { const QString message = tr("The debugger location must be given as an " "absolute path (%1).").arg(path); - result << Task(Task::Error, message, FilePath(), -1, id); + result << BuildSystemTask(Task::Error, message); } if (errors & DebuggerDoesNotMatch) { const QString message = tr("The ABI of the selected debugger does not " "match the toolchain ABI."); - result << Task(Task::Warning, message, FilePath(), -1, id); + result << BuildSystemTask(Task::Warning, message); } return result; } diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index 39ed4dc04a2..8d87cfde054 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -329,7 +329,8 @@ void GdbEngine::handleResponse(const QString &buff) m_lastWinException = msgWinException(data, &exCode); showMessage(m_lastWinException, LogMisc); const Task::TaskType type = isFatalWinException(exCode) ? Task::Error : Task::Warning; - TaskHub::addTask(type, m_lastWinException, Constants::TASK_CATEGORY_DEBUGGER_RUNTIME); + TaskHub::addTask(Task(type, m_lastWinException, {}, -1, + Constants::TASK_CATEGORY_DEBUGGER_RUNTIME)); } break; } |