mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-23 20:14:05 +00:00
修复C++20标准编译不通过
This commit is contained in:
parent
9f97c99862
commit
476178cb3c
|
@ -11,6 +11,7 @@
|
|||
#include <QtAlgorithms>
|
||||
#include <QMap>
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
|
||||
#include "favoritespanewidget.hh"
|
||||
#include "gddebug.hh"
|
||||
|
@ -908,7 +909,11 @@ void FavoritesModel::removeItemsForIndexes( const QModelIndexList & idxList )
|
|||
{
|
||||
QModelIndexList idxSublist = itemsToDelete[ i ];
|
||||
// std::greater does not work as operator < not implemented
|
||||
#if __cplusplus >= 201703L
|
||||
std::sort( idxSublist.begin(), idxSublist.end(), std::not_fn( std::less< QModelIndex >() ) );
|
||||
#else
|
||||
std::sort( idxSublist.begin(), idxSublist.end(), std::not2( std::less< QModelIndex >() ) );
|
||||
#endif
|
||||
|
||||
it = idxSublist.begin();
|
||||
for( ; it != idxSublist.end(); ++it )
|
||||
|
|
Loading…
Reference in a new issue