Deal with recent Qt methods deprecation (#3801)

* Deal with recent Qt methods deprecation

 * Use std::sort, std::less instead of qSort/qLess
 * Use QFontMetrics::horizontalAdvance instead of ::width
 * Use qApp->primaryScreen() instead of QDesktopWidget
 * use lambas instead of QSignalMapper
 * Use QTreeWidgetItem::setForeground instead of ::setTextColor
 * Use QDir::setPath instead of operator=(QString)
 * Use QList::swapItemsAt instead of ::swap

* fix error
This commit is contained in:
ctrlaltca 2019-08-28 02:06:54 +02:00 committed by Zach H
parent f54165025e
commit b6df5a4ac3
17 changed files with 71 additions and 40 deletions

View file

@ -11,6 +11,7 @@
#include <QDir>
#include <QFile>
#include <QMessageBox>
#include <algorithm>
#include <utility>
const char *CardDatabase::TOKENS_SETNAME = "TK";
@ -105,7 +106,7 @@ public:
void SetList::sortByKey()
{
qSort(begin(), end(), KeyCompareFunctor());
std::sort(begin(), end(), KeyCompareFunctor());
}
int SetList::getEnabledSetsNum()