Reject trailing-dot input like "12." in numeric elementInformation fields

numericInfoPattern()'s integer branch no longer allows an optional
trailing ".", so "12." is now Intermediate rather than Acceptable --
already-built hasAcceptableInput() guard then keeps it from being
stored, same as a lone ".". Previously it validated fine and got
saved verbatim, silently freezing in that form since nothing ever
normalized it afterward.
This commit is contained in:
Levi Jetzer
2026-08-21 15:22:41 +02:00
parent 7c941e4697
commit 02e6eceb65
+1 -1
View File
@@ -225,7 +225,7 @@ QString QETInformation::elementInfoToVar(const QString &info)
*/
QRegularExpression QETInformation::numericInfoPattern()
{
return QRegularExpression(QStringLiteral(R"(^[0-9]+\.?[0-9]{0,2}$|^[0-9]*\.[0-9]{1,2}$)"));
return QRegularExpression(QStringLiteral(R"(^[0-9]+$|^[0-9]*\.[0-9]{1,2}$)"));
}
/**