From 09f70b01a1fc016f259a881f13b7e231f0471588 Mon Sep 17 00:00:00 2001 From: Sergey Fedorov Date: Sun, 8 Sep 2024 16:09:08 +0800 Subject: [PATCH] qtsingleapplication: unbreak build with Qt4 diff --git qtsingleapplication/src/qtlocalpeer.cpp qtsingleapplication/src/qtlocalpeer.cpp index 7e99171..d39355b 100644 --- src/qtlocalpeer.cpp +++ src/qtlocalpeer.cpp @@ -5,7 +5,9 @@ #include "qtlocalpeer.h" #include #include +#if QT_VERSION >= QT_VERSION_CHECK(5,0,0) #include +#endif #include #if defined(Q_OS_WIN) @@ -42,7 +44,11 @@ QtLocalPeer::QtLocalPeer(QObject* parent, const QString &appId) #endif prefix = id.section(QLatin1Char('/'), -1); } +#if QT_VERSION >= QT_VERSION_CHECK(5,0,0) prefix.remove(QRegularExpression("[^a-zA-Z]")); +#else + prefix.remove(QRegExp("[^a-zA-Z]")); +#endif prefix.truncate(6); QByteArray idc = id.toUtf8();