forked from qt-creator/qt-creator
Clang: Fix text format for completion details
The tooltip text right to the completion list item is prepared for rich text (html) interpretation, but the QLabel the text will finally be displayed with has no explicit text format set and thus defaults to auto detection. The auto detection works fine for e.g. "<i>int optionalArg</ i>" but fails for "const Foo&". Task-number: QTCREATORBUG-15630 Change-Id: Ia58d65ee542730e4823c69150d452cdde98112f8 Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
This commit is contained in:
@@ -168,6 +168,11 @@ public:
|
||||
m_label->setText(text);
|
||||
}
|
||||
|
||||
void setTextFormat(Qt::TextFormat textFormat)
|
||||
{
|
||||
m_label->setTextFormat(textFormat);
|
||||
}
|
||||
|
||||
// Workaround QTCREATORBUG-11653
|
||||
void calculateMaximumWidth()
|
||||
{
|
||||
@@ -312,6 +317,7 @@ void GenericProposalWidgetPrivate::maybeShowInfoTip()
|
||||
|
||||
m_infoFrame->move(m_completionListView->infoFramePos());
|
||||
m_infoFrame->setText(infoTip);
|
||||
m_infoFrame->setTextFormat(m_model->detailTextFormat());
|
||||
m_infoFrame->calculateMaximumWidth();
|
||||
m_infoFrame->adjustSize();
|
||||
m_infoFrame->show();
|
||||
|
||||
Reference in New Issue
Block a user