From 9408b834d4eb20264a526beb3bbbb1c5882db564 Mon Sep 17 00:00:00 2001 From: Leslie Zhai Date: Tue, 1 Aug 2017 14:24:42 +0800 Subject: Add readCheckSystemConfig before checkSystem to fix "do not show again" from system configuration problems dialog is not remembered issue. A great patch by Wolfgang Bauer! BUG: 381368 --- src/k3bsystemproblemdialog.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/k3bsystemproblemdialog.cpp b/src/k3bsystemproblemdialog.cpp index d04a0bd..0d0f363 100644 --- a/src/k3bsystemproblemdialog.cpp +++ b/src/k3bsystemproblemdialog.cpp @@ -175,6 +175,9 @@ void K3b::SystemProblemDialog::checkSystem( QWidget* parent, NotificationLevel l bool showDeviceSettingsButton = false; bool showBinSettingsButton = false; + if (!readCheckSystemConfig()) + return; + if( k3bcore->deviceManager()->allDevices().isEmpty() ) { problems.append( K3b::SystemProblem( K3b::SystemProblem::CRITICAL, i18n("No optical drive found."), @@ -711,13 +714,13 @@ QList K3b::SystemProblemDialog::checkForAutomounting() bool K3b::SystemProblemDialog::readCheckSystemConfig() { - KConfigGroup cfgGrp( KSharedConfig::openConfig(), "General Options" ); + KConfigGroup cfgGrp(KSharedConfig::openConfig(), "General Options"); - K3b::Version configVersion( cfgGrp.readEntry( "Last system check version", "0.1" ) ); - if( configVersion < k3bcore->version() ) - cfgGrp.writeEntry( "check system config", true ); + K3b::Version configVersion(cfgGrp.readEntry( "Last system check version", "0.1" )); + if (configVersion < k3bcore->version()) + cfgGrp.writeEntry("check system config", true); - return cfgGrp.readEntry( "check system config", true ); + return cfgGrp.readEntry("check system config", false); } -- cgit v0.11.2