mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-12-15 00:28:58 -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);
|
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();
|
QList<QRgb> colorlist = colors.toList();
|
||||||
|
#endif
|
||||||
//don't do the algoritmh if we have less than 16 different colors
|
//don't do the algoritmh if we have less than 16 different colors
|
||||||
if(colorlist.size() <= (1 << bits)) {
|
if(colorlist.size() <= (1 << bits)) {
|
||||||
for(int i = 0; i < colors.count(); ++i)
|
for(int i = 0; i < colors.count(); ++i)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue