Skip to content

Commit

Permalink
Improve double validation, and tests for int validation
Browse files Browse the repository at this point in the history
  • Loading branch information
RudolfCardinal committed Jul 9, 2024
1 parent 5a13853 commit 68d7a8e
Show file tree
Hide file tree
Showing 9 changed files with 1,012 additions and 424 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@

# Qt
build-*/
*.pro.user
*.pro.user*
*.stash
tablet_qt/.qtc_clangd/
tablet_qt/build/
tablet_qt/Makefile
tablet_qt/tests/build/

# Temporary
*~
Expand Down
4 changes: 2 additions & 2 deletions tablet_qt/lib/nhs.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@ QValidator::State nhs::validateNhsNumber(const QString& s, bool allow_empty)
{
if (s.isEmpty()) {
if (allow_empty) {
#ifdef NUMERICFUNC_DEBUG_VALIDATOR
#ifdef NHS_DEBUG_VALIDATOR
qDebug() << Q_FUNC_INFO << "empty -> Acceptable (as allow_empty)";
#endif
return QValidator::Acceptable;
}
#ifdef NUMERICFUNC_DEBUG_VALIDATOR
#ifdef NHS_DEBUG_VALIDATOR
qDebug() << Q_FUNC_INFO << "empty -> Intermediate";
#endif
return QValidator::Intermediate;
Expand Down
Loading

0 comments on commit 68d7a8e

Please sign in to comment.