diff --git a/src/plugins/projectexplorer/taskwindow.cpp b/src/plugins/projectexplorer/taskwindow.cpp index a569fd5f21c7b3024566c9f585ef0c4cb15f5f93..5b7d700e6278a8292442e3485af73fda296ae167 100644 --- a/src/plugins/projectexplorer/taskwindow.cpp +++ b/src/plugins/projectexplorer/taskwindow.cpp @@ -786,6 +786,7 @@ QSize TaskDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelInd // Layout the description int leading = fontLeading; int height = 0; + description.replace('\n', QChar::LineSeparator); QTextLayout tl(description); tl.beginLayout(); while (true) { @@ -858,7 +859,7 @@ void TaskDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, int width = opt.rect.width() - model->sizeOfFile() - model->sizeOfLineNumber() - 12 - 22; if (!selected) { // in small mode we lay out differently - QString bottom = index.data(TaskModel::Description).toString(); + QString bottom = index.data(TaskModel::Description).toString().split('\n').first(); painter->drawText(22, 2 + opt.rect.top() + fm.ascent(), bottom); if (fm.width(bottom) > width) { // draw a gradient to mask the text @@ -876,6 +877,7 @@ void TaskDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, // Layout the description int leading = fm.leading(); int height = 0; + description.replace('\n', QChar::LineSeparator); QTextLayout tl(description); tl.beginLayout(); while (true) {