Revert "Clang: Fix text format for completion details" from 3.6

This reverts commit c5f70a3bad1ee2457741459cafb6419c67c417ad.

We will set the rich text unconditionally in a follow-up change to
simplify things.

Change-Id: I59aad8e33011ef68aa7c32ec80bb02edfd29c6a6
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
This commit is contained in:
Nikolai Kosjar
2016-01-19 14:44:08 +01:00
committed by Marco Bubke
parent 61709e9266
commit 06a99af0f6
4 changed files with 0 additions and 22 deletions

View File

@@ -38,7 +38,6 @@ ClangAssistProposalModel::ClangAssistProposalModel(
ClangBackEnd::CompletionCorrection neededCorrection)
: m_neededCorrection(neededCorrection)
{
setDetailTextFormat(Qt::RichText);
}
bool ClangAssistProposalModel::isSortable(const QString &/*prefix*/) const

View File

@@ -130,7 +130,6 @@ private:
} // Anonymous
GenericProposalModel::GenericProposalModel()
: m_detailTextFormat(Qt::AutoText)
{}
GenericProposalModel::~GenericProposalModel()
@@ -146,16 +145,6 @@ void GenericProposalModel::loadContent(const QList<AssistProposalItem *> &items)
m_idByText.insert(m_originalItems.at(i)->text(), i);
}
Qt::TextFormat GenericProposalModel::detailTextFormat() const
{
return m_detailTextFormat;
}
void GenericProposalModel::setDetailTextFormat(Qt::TextFormat detailTextFormat)
{
m_detailTextFormat = detailTextFormat;
}
void GenericProposalModel::reset()
{
m_currentItems = m_originalItems;

View File

@@ -67,16 +67,12 @@ public:
void setSortingAllowed(bool isAllowed);
bool isSortingAllowed() const;
Qt::TextFormat detailTextFormat() const;
void setDetailTextFormat(Qt::TextFormat detailTextFormat);
protected:
QList<AssistProposalItem *> m_currentItems;
private:
QHash<QString, int> m_idByText;
QList<AssistProposalItem *> m_originalItems;
Qt::TextFormat m_detailTextFormat;
};
} // TextEditor

View File

@@ -163,11 +163,6 @@ public:
m_label->setText(text);
}
void setTextFormat(Qt::TextFormat textFormat)
{
m_label->setTextFormat(textFormat);
}
// Workaround QTCREATORBUG-11653
void calculateMaximumWidth()
{
@@ -311,7 +306,6 @@ 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();