summaryrefslogtreecommitdiff
path: root/src/ivicore
diff options
context:
space:
mode:
authorDominik Holland <dominik.holland@qt.io>2020-01-24 09:53:50 +0100
committerDominik Holland <dominik.holland@qt.io>2020-01-24 16:14:48 +0000
commit10a66233eea4ff4b055bcd587b578af182e3ef07 (patch)
treee2c0ec945325fb5ab0f4dffbba428054bc35aa8d /src/ivicore
parent5f1e1e9eb6861480259913b4be59735df267e3ce (diff)
downloadqtivi-10a66233eea4ff4b055bcd587b578af182e3ef07.tar.gz
Fix compilation warnings when using Qt 5.14
The used API is now deprecated, but as the replacement was also introduced with 5.14, we need to ifdef the usage to stay compatible with older versions. Change-Id: I6bae0684274b7255e6e12916499524225ab8d3af Reviewed-by: Robert Griebl <robert.griebl@qt.io>
Diffstat (limited to 'src/ivicore')
-rw-r--r--src/ivicore/qiviservicemanager.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ivicore/qiviservicemanager.cpp b/src/ivicore/qiviservicemanager.cpp
index 2100ce4..df37c4b 100644
--- a/src/ivicore/qiviservicemanager.cpp
+++ b/src/ivicore/qiviservicemanager.cpp
@@ -328,14 +328,22 @@ void QIviServiceManagerPrivate::addBackend(Backend *backend)
const QString newBackendFile = backend->metaData.value(fileNameLiteral).toString();
const QString newBackendFileBase = qtivi_helper::backendBaseName(newBackendFile);
const QStringList ifaceList = backend->metaData.value(interfacesLiteral).toStringList();
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
+ const QSet<QString> newInterfaces = QSet<QString>(ifaceList.begin(), ifaceList.end());
+#else
const QSet<QString> newInterfaces = ifaceList.toSet();
+#endif
bool addBackend = true;
if (!newBackendFile.isEmpty()) {
for (int i = 0; i < m_backends.count(); i++) {
Backend *b = m_backends[i];
const QStringList curIfaceList = backend->metaData.value(interfacesLiteral).toStringList();
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
+ const QSet<QString> interfaces = QSet<QString>(curIfaceList.begin(), curIfaceList.end());
+#else
const QSet<QString> interfaces = curIfaceList.toSet();
+#endif
if (interfaces == newInterfaces && b->name == backend->name) {
const QString fileName = b->metaData.value(fileNameLiteral).toString();
if (fileName == newBackendFile) {