Port away from deprecated QList<>::toSet
GIT_SILENT
This commit is contained in:
parent
06b8e78fad
commit
d6f15e9f2b
@ -359,7 +359,12 @@ bool Theme::findInRectsCache(const QString &image, const QString &element, QRect
|
|||||||
|
|
||||||
QHash<QString, QSet<QString> >::iterator it = d->invalidElements.find(image);
|
QHash<QString, QSet<QString> >::iterator it = d->invalidElements.find(image);
|
||||||
if (it == d->invalidElements.end()) {
|
if (it == d->invalidElements.end()) {
|
||||||
QSet<QString> elements = imageGroup.readEntry("invalidElements", QStringList()).toSet();
|
const QStringList elementList = imageGroup.readEntry("invalidElements", QStringList());
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
|
||||||
|
const QSet<QString> elements(elementList.begin(), elementList.end());
|
||||||
|
#else
|
||||||
|
const QSet<QString> elements = elementList.toSet();
|
||||||
|
#endif
|
||||||
d->invalidElements.insert(image, elements);
|
d->invalidElements.insert(image, elements);
|
||||||
invalid = elements.contains(element);
|
invalid = elements.contains(element);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user