forked from qt-creator/qt-creator
CppEditor: Fix sorting of quick fixes "Add {public, private, ...} declaration"
Change-Id: I43f09042a525a798d95b3365873be24eafd423e9 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
@@ -118,13 +118,11 @@ struct ContentLessThan
|
||||
} // Anonymous
|
||||
|
||||
BasicProposalItemListModel::BasicProposalItemListModel()
|
||||
: m_isSortingAllowed(true)
|
||||
{}
|
||||
|
||||
BasicProposalItemListModel::BasicProposalItemListModel(const QList<BasicProposalItem *> &items)
|
||||
: m_currentItems(items)
|
||||
, m_originalItems(items)
|
||||
, m_isSortingAllowed(true)
|
||||
{
|
||||
mapPersistentIds();
|
||||
}
|
||||
@@ -141,16 +139,6 @@ void BasicProposalItemListModel::loadContent(const QList<BasicProposalItem *> &i
|
||||
mapPersistentIds();
|
||||
}
|
||||
|
||||
void BasicProposalItemListModel::setSortingAllowed(bool isAllowed)
|
||||
{
|
||||
m_isSortingAllowed = isAllowed;
|
||||
}
|
||||
|
||||
bool BasicProposalItemListModel::isSortingAllowed() const
|
||||
{
|
||||
return m_isSortingAllowed;
|
||||
}
|
||||
|
||||
void BasicProposalItemListModel::mapPersistentIds()
|
||||
{
|
||||
for (int i = 0; i < m_originalItems.size(); ++i)
|
||||
@@ -270,8 +258,6 @@ bool BasicProposalItemListModel::isSortable(const QString &prefix) const
|
||||
{
|
||||
Q_UNUSED(prefix);
|
||||
|
||||
if (!isSortingAllowed())
|
||||
return false;
|
||||
if (m_currentItems.size() < kMaxSort)
|
||||
return true;
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user