Skip to content

Commit e6a89a9

Browse files
committed
qt/tonalutils: Split Tonal character regex to one location
1 parent d3491a3 commit e6a89a9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/qt/tonalutils.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ bool TonalUtils::Supported()
3838
return false;
3939
}
4040

41-
static QRegExpValidator tv(QRegExp("-?(?:[\\d\\xe9d9-\\xe9df]+\\.?|[\\d\\xe9d9-\\xe9df]*\\.[\\d\\xe9d9-\\xe9df]*)"), nullptr);
41+
#define RE_TONAL_DIGIT "[\\d\\xe9d9-\\xe9df]"
42+
static QRegExpValidator tv(QRegExp("-?(?:" RE_TONAL_DIGIT "+\\.?|" RE_TONAL_DIGIT "*\\." RE_TONAL_DIGIT "*)"), nullptr);
4243

4344
QValidator::State TonalUtils::validate(QString&input, int&pos)
4445
{

0 commit comments

Comments
 (0)