From 98346aaab1b4016a1e44aef715761552a3b80775 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Thu, 18 Jul 2019 16:11:41 +0200 Subject: [PATCH] ProjectExplorer: Use monospace font in task tool tips for compile issues Otherwise, error message alignment can get messed up, as the default tool tip font is typically not proportional. Fixes: QTCREATORBUG-18264 Change-Id: I7c827d859720c4d3a89726000f00930219c68351 Reviewed-by: hjk --- src/plugins/projectexplorer/taskhub.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/plugins/projectexplorer/taskhub.cpp b/src/plugins/projectexplorer/taskhub.cpp index 10b04c4d5b0..d299e8d86a5 100644 --- a/src/plugins/projectexplorer/taskhub.cpp +++ b/src/plugins/projectexplorer/taskhub.cpp @@ -71,7 +71,13 @@ public: : QApplication::translate("TaskHub", "Warning")); setPriority(task.type == Task::Error ? TextEditor::TextMark::NormalPriority : TextEditor::TextMark::LowPriority); - setToolTip(task.description); + if (task.category == Constants::TASK_CATEGORY_COMPILE) { + setToolTip("" + QApplication::translate("TaskHub", "Build Issue") + + "
" + + task.description.toHtmlEscaped() + ""); + } else { + setToolTip(task.description); + } setIcon(task.icon); setVisible(!task.icon.isNull()); } @@ -154,7 +160,7 @@ void TaskHub::addTask(Task task) task.line = -1; task.movedLine = task.line; - if ((task.options & Task::AddTextMark) && task.line != -1) + if ((task.options & Task::AddTextMark) && task.line != -1 && task.type != Task::Unknown) task.setMark(new TaskMark(task)); emit m_instance->taskAdded(task); }