mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-12-01 04:46:47 -05:00
Replaced deprecated QList::toList by range constructors
This commit is contained in:
parent
bdae3b35b4
commit
a530bd9adb
1 changed files with 4 additions and 0 deletions
|
|
@ -340,7 +340,11 @@ void ImageUtil::quantization(const QImage &img, QVector<QRgb> &palette)
|
|||
colors.insert(pixel);
|
||||
}
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK (5, 14, 0)
|
||||
QList<QRgb> colorlist(colors.begin(), colors.end());
|
||||
#else
|
||||
QList<QRgb> colorlist = colors.toList();
|
||||
#endif
|
||||
//don't do the algoritmh if we have less than 16 different colors
|
||||
if(colorlist.size() <= (1 << bits)) {
|
||||
for(int i = 0; i < colors.count(); ++i)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue