[office/tellico] src/gui: Fix compile
Robby Stephenson <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit a4e7dc249ff7dc6d7cd0bf2cb9346511d0a44ddf by Robby Stephenson.
Committed on 10/08/2026 at 02:16.
Pushed by rstephenson into branch 'master'.
Fix compile
M +9 -5 src/gui/linefieldwidget.cpp
https://invent.kde.org/office/tellico/-/commit/a4e7dc249ff7dc6d7cd0bf2cb9346511d0a44ddf
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);
+ }
}
}