[office/tellico] /: Allow disabling of the ISBN validation in the entry edit dialog

Robby Stephenson <[email protected]>
Newsgroups gmane.comp.kde.cvs,gmane.comp.kde.doc
Message-ID <[email protected]>
Git commit be29f49e3f72cdc8e6db2b987d86235522f7410c by Robby Stephenson.
Committed on 10/08/2026 at 02:09.
Pushed by rstephenson into branch 'master'.

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  +1    -1    doc/details.docbook
M  +4    -3    src/gui/linefieldwidget.cpp

https://invent.kde.org/office/tellico/-/commit/be29f49e3f72cdc8e6db2b987d86235522f7410c

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/doc/details.docbook b/doc/details.docbook
index 0c83e2ede..705347177 100644
--- a/doc/details.docbook
+++ b/doc/details.docbook
@@ -245,7 +245,7 @@ Book collections have 27 default fields:
 </para>
 
 <para>
[suppressed due to size limit]
[suppressed due to size limit]
 </para>
 
 </sect2>
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);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.