From: Manuel Nickschas Date: Tue, 7 Jan 2020 19:31:31 +0000 (+0100) Subject: qa: Avoid deprecation warnings for QList/QSet conversions X-Git-Tag: test-travis-01~17 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=52209badc8e769e50aa3019b63689dda0e79e9d0;hp=52209badc8e769e50aa3019b63689dda0e79e9d0 qa: Avoid deprecation warnings for QList/QSet conversions 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. ---