diff options
Diffstat (limited to 'src/plugins/qmldesigner/components/formeditor/formeditorannotationicon.cpp')
-rw-r--r-- | src/plugins/qmldesigner/components/formeditor/formeditorannotationicon.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/plugins/qmldesigner/components/formeditor/formeditorannotationicon.cpp b/src/plugins/qmldesigner/components/formeditor/formeditorannotationicon.cpp index 5fa24f1a5c..fe1cc7ef9e 100644 --- a/src/plugins/qmldesigner/components/formeditor/formeditorannotationicon.cpp +++ b/src/plugins/qmldesigner/components/formeditor/formeditorannotationicon.cpp @@ -269,7 +269,7 @@ void FormEditorAnnotationIcon::createReader() for (const Comment &comment : m_annotation.comments()) { QGraphicsItem *commentBubble = createCommentBubble(commentRect, comment.title(), - comment.author(), comment.text(), + comment.author(), comment.deescapedText(), comment.timestampStr(), this); comments.push_back(commentBubble); } @@ -339,7 +339,7 @@ QGraphicsItem *FormEditorAnnotationIcon::createCommentBubble(QRectF rect, const authorItem->update(); QGraphicsTextItem *textItem = new QGraphicsTextItem(frameItem); - textItem->setPlainText(text); + textItem->setHtml(text); textItem->setDefaultTextColor(textColor); textItem->setTextWidth(rect.width()); textItem->setPos(authorItem->x(), authorItem->boundingRect().height() + authorItem->y() + 5); @@ -444,14 +444,15 @@ void FormEditorAnnotationIcon::removeAnnotationDialog() if (!m_customId.isNull()) { dialogTitle = m_customId; } - QMessageBox *deleteDialog = new QMessageBox(Core::ICore::dialogParent()); + QPointer<QMessageBox> deleteDialog = new QMessageBox(Core::ICore::dialogParent()); deleteDialog->setWindowTitle(dialogTitle); deleteDialog->setText(tr("Delete this annotation?")); deleteDialog->setStandardButtons(QMessageBox::Yes | QMessageBox::No); deleteDialog->setDefaultButton(QMessageBox::Yes); int result = deleteDialog->exec(); - if (deleteDialog) deleteDialog->deleteLater(); + if (deleteDialog) + deleteDialog->deleteLater(); if (result == QMessageBox::Yes) { m_modelNode.removeCustomId(); |