From 532ed2e2798ab145b7cc02fa8a35c126e0b84d3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Rouits?= Date: Mon, 6 Jan 2025 07:46:36 +0100 Subject: [PATCH] Fix Spk Dialog. --- speakerdialog.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/speakerdialog.cpp b/speakerdialog.cpp index 211f0f5..046887a 100644 --- a/speakerdialog.cpp +++ b/speakerdialog.cpp @@ -61,17 +61,17 @@ SpeakerDialog::~SpeakerDialog() void SpeakerDialog::onVendorTextChanged(QString text) { - if (text.isNull() || text.isEmpty()) + if (text.isEmpty()) ui->speakerButtonBox->button(QDialogButtonBox::Ok)->setEnabled(false); - else if (!ui->modelLineEdit->text().isNull() && !ui->modelLineEdit->text().isEmpty()) + else if (!ui->modelLineEdit->text().isEmpty()) ui->speakerButtonBox->button(QDialogButtonBox::Ok)->setEnabled(true); } void SpeakerDialog::onModelTextChanged(QString text) { - if (text.isNull() || text.isEmpty()) + if (text.isEmpty()) ui->speakerButtonBox->button(QDialogButtonBox::Ok)->setEnabled(false); - else if (!ui->vendorLineEdit->text().isNull() && !ui->vendorLineEdit->text().isEmpty()) + else if (!ui->vendorLineEdit->text().isEmpty()) ui->speakerButtonBox->button(QDialogButtonBox::Ok)->setEnabled(true); } @@ -103,7 +103,7 @@ void SpeakerDialog::onSpeakerAccepted() spk.computeEmptyParams(); - if (oldVendor.isNull() || oldModel.isNull()) { + if (oldVendor.isEmpty() || oldModel.isEmpty()) { SpeakerDb::insertOrReplace(vendor, model, spk); } else { SpeakerDb::insertOrReplace(oldVendor, oldModel, spk);