Fix readability-implicit-bool-conversion issues

This commit is contained in:
Kurt Hindenburg
2019-07-16 20:58:53 -04:00
parent 397a99d030
commit ccc4c2eee6
7 changed files with 21 additions and 21 deletions

View File

@@ -100,7 +100,7 @@ void ConfigurationDialog::addPage(KPageWidgetItem *item, bool manage)
if (_shown && manage) {
QPushButton *defaultButton = buttonBox()->button(QDialogButtonBox::RestoreDefaults);
if (defaultButton) {
if (defaultButton != nullptr) {
bool isDefault = defaultButton->isEnabled() && _manager->isDefault();
defaultButton->setEnabled(!isDefault);
}
@@ -134,7 +134,7 @@ void ConfigurationDialog::settingsChangedSlot()
void ConfigurationDialog::setApplyButtonEnabled(bool enabled)
{
QPushButton *applyButton = buttonBox()->button(QDialogButtonBox::Apply);
if (applyButton) {
if (applyButton != nullptr) {
applyButton->setEnabled(enabled);
}
}
@@ -142,7 +142,7 @@ void ConfigurationDialog::setApplyButtonEnabled(bool enabled)
void ConfigurationDialog::setRestoreDefaultsButtonEnabled(bool enabled)
{
QPushButton *restoreDefaultsButton = buttonBox()->button(QDialogButtonBox::RestoreDefaults);
if (restoreDefaultsButton) {
if (restoreDefaultsButton != nullptr) {
restoreDefaultsButton->setEnabled(enabled);
}
}