Skip to content

Commit f71ad91

Browse files
committed
Switch away from deprecated API
1 parent 2d2fe8f commit f71ad91

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/ui/WebWidget.cpp

+12-1
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,18 @@ void WebWidget::setOption(int identifier, const QVariant &value)
650650

651651
void WebWidget::setOptions(const QHash<int, QVariant> &options, const QStringList &excludedOptions)
652652
{
653-
const QList<int> identifiers((m_options.keys() + options.keys()).toSet().toList());
653+
QList<int> identifiers(m_options.keys());
654+
identifiers.reserve(identifiers.count() + options.count());
655+
656+
QHash<int, QVariant>::const_iterator iterator;
657+
658+
for (iterator = options.begin(); iterator != options.end(); ++iterator)
659+
{
660+
if (!identifiers.contains(iterator.key()))
661+
{
662+
identifiers.append(iterator.key());
663+
}
664+
}
654665

655666
m_options = options;
656667

0 commit comments

Comments
 (0)