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:
Nikolai Kosjar
2013-06-03 14:57:13 +02:00
parent 5e5c5bb02b
commit b8a2983fd5
3 changed files with 11 additions and 25 deletions

View File

@@ -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;