[PATCH 4/6] qa: Avoid deprecation warnings for QList/QSet conversions
authorManuel Nickschas <sputnick@quassel-irc.org>
Tue, 7 Jan 2020 19:31:31 +0000 (20:31 +0100)
committerFelix Geyer <fgeyer@debian.org>
Fri, 12 Feb 2021 17:40:17 +0000 (17:40 +0000)
commit05dd655973d3d0fe8c8b15791f457137543bb9a1
tree830687c85f9a6a3ea90f79a2f59210967a4fe31d
parent5d71b83602b2eca6572751c4b5cad54e8170b5d5
[PATCH 4/6] qa: Avoid deprecation warnings for QList/QSet conversions

From 52209badc8e769e50aa3019b63689dda0e79e9d0 Mon Sep 17 00:00:00 2001
Bug: https://bugs.quassel-irc.org/issues/1544
Bug-Ubuntu: https://bugs.launchpad.net/quassel/+bug/1885436
Origin: upstream, https://github.com/quassel/quassel/pull/518
Origin: upstream, https://github.com/quassel/quassel/commit/52209badc8e769e50aa3019b63689dda0e79e9d0

Qt 5.14 deprecated the explicit functions for converting between
QSet and QList, preferring instead the use of range-based ctors.
Unfortunately, those ctors were only added in Qt 5.14, so we can't
use them when compiling against older versions.

Add a util function for QList->QSet to keep the version check in
a single place. Replace the other direction by using QSet::values().
In some cases, conversions could be avoided altogether, or an STL
container be used easily, so do that.

Gbp-Pq: Topic qt514
Gbp-Pq: Name 0004-qa-Avoid-deprecation-warnings-for-QList-QSet-convers.patch
12 files changed:
src/client/backlogrequester.cpp
src/client/backlogrequester.h
src/client/bufferviewoverlay.cpp
src/client/clientbacklogmanager.cpp
src/client/messagefilter.cpp
src/common/ircuser.cpp
src/common/util.h
src/core/corebuffersyncer.cpp
src/qtui/chatview.cpp
src/qtui/chatviewsearchcontroller.cpp
src/qtui/settingspages/chatmonitorsettingspage.cpp
src/uisupport/bufferviewfilter.cpp