[office/tellico/4.2] /: Allow disabling of the ISBN validation in the entry edit dialog
Robby Stephenson <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit 818b4c812152b71c08fdf01b575b8cc83df062a4 by Robby Stephenson. Committed on 10/08/2026 at 02:11. Pushed by rstephenson into branch '4.2'. Allow disabling of the ISBN validation in the entry edit dialog The ISBN field needs a property of format = false. BUG: 514622 FIXED-IN: 4.2.2 M +4 -0 ChangeLog M +4 -3 src/gui/linefieldwidget.cpp https://invent.kde.org/office/tellico/-/commit/818b4c812152b71c08fdf01b575b8cc83df062a4 diff --git a/ChangeLog b/ChangeLog index b4a37bcc2..184d54fa9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2026-08-09 Robby Stephenson <[email protected]> + + * Added option to disable ISBN validation (Bug 514622). + 2026-08-08 Robby Stephenson <[email protected]> * Updated ISBN formatting, with script from Alex Oio. diff --git a/src/gui/linefieldwidget.cpp b/src/gui/linefieldwidget.cpp index 18ab74e32..6e588093e 100644 --- a/src/gui/linefieldwidget.cpp +++ b/src/gui/linefieldwidget.cpp @@ -46,8 +46,8 @@ LineFieldWidget::LineFieldWidget(Tellico::Data::FieldPtr field_, QWidget* parent createCompletionObject(field_->name()); } - // Bug 521157: only validate if not marked for multiple values - if(field_->name() == QLatin1StringView("isbn")) { + if(field_->name() == QLatin1StringView("isbn") && + field_->property(QStringLiteral("format")) != QLatin1String("false")) { auto val = new ISBNValidator(this); val->setAllowMultiple(field_->hasFlag(Data::Field::AllowMultiple)); m_lineEdit->setValidator(val); @@ -85,7 +85,8 @@ void LineFieldWidget::updateFieldHook(Tellico::Data::FieldPtr, Tellico::Data::Fi m_lineEdit->setCompletionObject(nullptr); } - if(newField_->name() == QLatin1StringView("isbn")) { + if(newField_->name() == QLatin1StringView("isbn") && + field_->property(QStringLiteral("format")) != QLatin1String("false")) { auto val = new ISBNValidator(this); val->setAllowMultiple(newField_->hasFlag(Data::Field::AllowMultiple)); m_lineEdit->setValidator(val);