1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-02 14:04:46 -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
+3 -3
View File
@@ -19,7 +19,7 @@
#include <cmath>
#include <QRegExp>
#include <QRegularExpression>
#include "maidenhead.h"
@@ -83,6 +83,6 @@ bool Maidenhead::isMaidenhead(const QString& maidenhead)
int length = maidenhead.length();
if ((length != 4) && (length != 6) && (length != 8))
return false;
QRegExp re("[A-Ra-r][A-Ra-r][0-9][0-9]([A-Xa-x][A-Xa-x]([0-9][0-9])?)?");
return re.exactMatch(maidenhead);
QRegularExpression re(QRegularExpression::anchoredPattern("[A-Ra-r][A-Ra-r][0-9][0-9]([A-Xa-x][A-Xa-x]([0-9][0-9])?)?"));
return re.match(maidenhead).hasMatch();
}