mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-24 04:24:09 +00:00
optimize: qGreater was obsolete use std::less instead
This commit is contained in:
parent
f4ab1ed6a6
commit
baf6685618
|
@ -907,9 +907,8 @@ void FavoritesModel::removeItemsForIndexes( const QModelIndexList & idxList )
|
||||||
for( int i = lowestLevel; i >= 0; i-- )
|
for( int i = lowestLevel; i >= 0; i-- )
|
||||||
{
|
{
|
||||||
QModelIndexList idxSublist = itemsToDelete[ i ];
|
QModelIndexList idxSublist = itemsToDelete[ i ];
|
||||||
//std::greater does not work ,operator < not implemented ,use std:less first ,then std::reverse.
|
// std::greater does not work as operator < not implemented
|
||||||
std::sort(idxSublist.begin(), idxSublist.end(), std::less<QModelIndex>());
|
std::sort( idxSublist.begin(), idxSublist.end(), std::not2( std::less< QModelIndex >() ) );
|
||||||
std::reverse(idxSublist.begin(), idxSublist.end());
|
|
||||||
|
|
||||||
it = idxSublist.begin();
|
it = idxSublist.begin();
|
||||||
for( ; it != idxSublist.end(); ++it )
|
for( ; it != idxSublist.end(); ++it )
|
||||||
|
|
Loading…
Reference in a new issue