[office/tellico/4.2] src/gui: Fix compile

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

Fix compile

M  +9    -5    src/gui/linefieldwidget.cpp

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

diff --git a/src/gui/linefieldwidget.cpp b/src/gui/linefieldwidget.cpp
index 6e588093e..ff7962463 100644
--- a/src/gui/linefieldwidget.cpp
+++ b/src/gui/linefieldwidget.cpp
@@ -85,11 +85,15 @@ void LineFieldWidget::updateFieldHook(Tellico::Data::FieldPtr, Tellico::Data::Fi
     m_lineEdit->setCompletionObject(nullptr);
   }
 
-  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);
+  // name wom't change but property might
+  if(newField_->name() == QLatin1StringView("isbn")) {
+    if(newField_->property(QStringLiteral("format")) == QLatin1StringView("false")) {
+      m_lineEdit->setValidator(nullptr);
+    } else {
+      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.