1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-01 21:54:55 -04:00

Remove use of deprecated QRegExp.

This commit is contained in:
srcejon
2024-06-10 14:01:57 +01:00
parent 4f822b4daf
commit 41716632d4
18 changed files with 256 additions and 210 deletions
+5 -4
View File
@@ -23,7 +23,7 @@
#include <QHash>
#include <QJsonArray>
#include <QJsonObject>
#include <QRegExp>
#include <QRegularExpression>
struct SatNogsTransmitter {
@@ -196,10 +196,11 @@ struct SatNogsSatellite {
// tle0 is of the form:
// MOZHAYETS 4 (RS-22)
// GOES 9 [-]
QRegExp re("([A-Za-z0-9\\- ]+)([\\(]([A-Z0-9\\- ]+)[\\)])?");
if (re.indexIn(tle->m_tle0) != -1)
QRegularExpression re("([A-Za-z0-9\\- ]+)([\\(]([A-Z0-9\\- ]+)[\\)])?");
QRegularExpressionMatch match = re.match(tle->m_tle0);
if (match.hasMatch())
{
QStringList groups = re.capturedTexts();
QStringList groups = match.capturedTexts();
m_name = groups[1].trimmed();
if ((groups.size() >= 4) && (groups[3] != "-") && !groups[3].isEmpty())
m_names = QStringList({groups[3].trimmed()});