signon/signon-8.61-qt6-4.patch

37 lines
1.1 KiB
Diff

From b48507f58d66356fbcdd349d14e6e145a4a60bbd Mon Sep 17 00:00:00 2001
From: Nicolas Fella <nicolas.fella@gmx.de>
Date: Tue, 5 Jul 2022 17:38:08 +0200
Subject: [PATCH] Port away from deprecated QString::SplitBehavior
---
src/signond/signonidentityinfo.cpp | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/signond/signonidentityinfo.cpp b/src/signond/signonidentityinfo.cpp
index a5ae15de..bf7985fd 100644
--- a/src/signond/signonidentityinfo.cpp
+++ b/src/signond/signonidentityinfo.cpp
@@ -27,6 +27,7 @@
#include <QDBusArgument>
#include <QDataStream>
#include <QDebug>
+#include <QtGlobal>
namespace SignonDaemonNS {
@@ -104,7 +105,11 @@ bool SignonIdentityInfo::checkMethodAndMechanism(const QString &method,
* mechanisms is allowed.
*/
QStringList mechanisms =
+#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
+ mechanism.split(QLatin1Char(' '), Qt::SkipEmptyParts);
+#else
mechanism.split(QLatin1Char(' '), QString::SkipEmptyParts);
+#endif
/* if the list is empty of it has only one element, then we already know
* that it didn't pass the previous checks */
--
GitLab