Skip to content

Commit

Permalink
fixed limit
Browse files Browse the repository at this point in the history
reverted the fix for this comment musescore#25782 (review)
  • Loading branch information
Eism committed Dec 10, 2024
1 parent 2c7851c commit 0eb90f9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ TEST_F(DoubleInputValidatorTests, Validate) {
{ "2.", QValidator::Intermediate, "2" },
{ "-100.1", QValidator::Intermediate, "-100" },
{ "100.1", QValidator::Intermediate, "100" },
{ "1.123", QValidator::Intermediate, "1.12" },
{ "abc", QValidator::Invalid, "" }
{ "1.123", QValidator::Invalid },
{ "abc", QValidator::Invalid }
};

int pos = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ QValidator::State DoubleInputValidator::validate(QString& inputStr, int& cursorP
state = Acceptable;
}
} else if (inputStr.contains(QRegularExpression("^\\-?\\d{0,3}\\.?$"))
|| inputStr.contains(QRegularExpression(QString("^\\-?\\d{0,3}\\.\\d{%1,}$").arg(m_decimal)))) {
|| inputStr.contains(QRegularExpression(QString("^\\-?\\d{0,3}\\.\\d{0,%1}$").arg(m_decimal)))) {
state = Intermediate;
} else {
cursorPos = 0;
Expand Down

0 comments on commit 0eb90f9

Please sign in to comment.