From 91437397e3e824e1393ccfdb169c7314a8c646ca5f594277e2378eaedab4ace7 Mon Sep 17 00:00:00 2001 From: Luca Beltrame Date: Tue, 1 Aug 2017 21:08:28 +0000 Subject: [PATCH 1/2] Accepting request 513701 from home:wolfi323:branches:KDE:Applications - Add upstream patches to not show the system configuration problems dialog if disabled (kde#381368, boo#1051368) * Fix-do-not-show-again.patch * Add-readCheckSystemConfig.patch OBS-URL: https://build.opensuse.org/request/show/513701 OBS-URL: https://build.opensuse.org/package/show/KDE:Applications/k3b?expand=0&rev=30 --- Add-readCheckSystemConfig.patch | 49 ++++++++++++++++++++++++++++++ Fix-do-not-show-again.patch | 53 +++++++++++++++++++++++++++++++++ k3b.changes | 8 +++++ k3b.spec | 8 ++++- 4 files changed, 117 insertions(+), 1 deletion(-) create mode 100644 Add-readCheckSystemConfig.patch create mode 100644 Fix-do-not-show-again.patch diff --git a/Add-readCheckSystemConfig.patch b/Add-readCheckSystemConfig.patch new file mode 100644 index 0000000..0805e81 --- /dev/null +++ b/Add-readCheckSystemConfig.patch @@ -0,0 +1,49 @@ +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 + diff --git a/Fix-do-not-show-again.patch b/Fix-do-not-show-again.patch new file mode 100644 index 0000000..03faee2 --- /dev/null +++ b/Fix-do-not-show-again.patch @@ -0,0 +1,53 @@ +From c1fae2adc90fac9a2af11ec9ef95ecc12033fa41 Mon Sep 17 00:00:00 2001 +From: Leslie Zhai +Date: Mon, 19 Jun 2017 16:42:41 +0800 +Subject: Fix "do not show again" from system configuration problems dialog is + not remembered + +BUG: 381368 +REVIEW: 130162 +--- + src/k3bsystemproblemdialog.cpp | 11 +++++------ + src/k3bsystemproblemdialog.h | 2 +- + 2 files changed, 6 insertions(+), 7 deletions(-) + +diff --git a/src/k3bsystemproblemdialog.cpp b/src/k3bsystemproblemdialog.cpp +index 9dfc50c..126ad31 100644 +--- a/src/k3bsystemproblemdialog.cpp ++++ b/src/k3bsystemproblemdialog.cpp +@@ -159,14 +159,13 @@ K3b::SystemProblemDialog::SystemProblemDialog( const QList& + } + + +-void K3b::SystemProblemDialog::closeEvent( QCloseEvent* e ) ++void K3b::SystemProblemDialog::done(int r) + { +- if( m_checkDontShowAgain->isChecked() ) { +- KConfigGroup grp( KSharedConfig::openConfig(), "General Options" ); +- grp.writeEntry( "check system config", false ); ++ if (m_checkDontShowAgain->isChecked()) { ++ KConfigGroup grp(KSharedConfig::openConfig(), "General Options"); ++ grp.writeEntry("check system config", false); + } +- +- e->accept(); ++ QDialog::done(r); + } + + +diff --git a/src/k3bsystemproblemdialog.h b/src/k3bsystemproblemdialog.h +index b45f2f8..b406b25 100644 +--- a/src/k3bsystemproblemdialog.h ++++ b/src/k3bsystemproblemdialog.h +@@ -81,7 +81,7 @@ namespace K3b { + static void checkSystem( QWidget* parent = 0, NotificationLevel level = NotifyOnlyErrors ); + + protected: +- void closeEvent( QCloseEvent* ); ++ void done(int) Q_DECL_OVERRIDE; + + private Q_SLOTS: + void slotShowDeviceSettings(); +-- +cgit v0.11.2 + diff --git a/k3b.changes b/k3b.changes index 3d29e3f..2f01784 100644 --- a/k3b.changes +++ b/k3b.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue Aug 1 11:45:24 UTC 2017 - wbauer@tmo.at + +- Add upstream patches to not show the system configuration + problems dialog if disabled (kde#381368, boo#1051368) + * Fix-do-not-show-again.patch + * Add-readCheckSystemConfig.patch + ------------------------------------------------------------------- Wed Jul 26 15:41:52 UTC 2017 - wbauer@tmo.at diff --git a/k3b.spec b/k3b.spec index 4b3a704..a635753 100644 --- a/k3b.spec +++ b/k3b.spec @@ -30,10 +30,14 @@ License: GPL-2.0+ Group: Productivity/Multimedia/CD/Record Url: http://www.kde.org Source: %{name}-%{version}.tar.xz -# PATCH-FIX-OPENSUSE +# PATCH-FIX-UPSTREAM Patch: Re-enable-transcode-support.patch # PATCH-FIX-OPENSUSE Patch1: Don-t-suggest-to-install-libburn.patch +# PATCH-FIX-UPSTREAM +Patch2: Fix-do-not-show-again.patch +# PATCH-FIX-UPSTREAM +Patch3: Add-readCheckSystemConfig.patch BuildRequires: extra-cmake-modules BuildRequires: fdupes @@ -122,6 +126,8 @@ This package contain files needed for development with k3b. %setup -q %patch -p1 %patch1 -p1 +%patch2 -p1 +%patch3 -p1 %build CXXFLAGS="%{optflags} -fno-strict-aliasing" From 71814e6f1782b4ef3e2b72db19f83cca50ad2b10ec319a775549495a970c417c Mon Sep 17 00:00:00 2001 From: Luca Beltrame Date: Wed, 2 Aug 2017 13:45:39 +0000 Subject: [PATCH 2/2] Accepting request 513797 from home:wolfi323:branches:KDE:Applications - Add Add-forceCheck-for-ManualCheckSystem.patch to make the manual system check work again after the previous fix OBS-URL: https://build.opensuse.org/request/show/513797 OBS-URL: https://build.opensuse.org/package/show/KDE:Applications/k3b?expand=0&rev=31 --- Add-forceCheck-for-ManualCheckSystem.patch | 61 ++++++++++++++++++++++ k3b.changes | 6 +++ k3b.spec | 3 ++ 3 files changed, 70 insertions(+) create mode 100644 Add-forceCheck-for-ManualCheckSystem.patch diff --git a/Add-forceCheck-for-ManualCheckSystem.patch b/Add-forceCheck-for-ManualCheckSystem.patch new file mode 100644 index 0000000..771da3d --- /dev/null +++ b/Add-forceCheck-for-ManualCheckSystem.patch @@ -0,0 +1,61 @@ +From 762fc98addfc5a83e80aa1c7d83384a512c48f33 Mon Sep 17 00:00:00 2001 +From: Leslie Zhai +Date: Wed, 2 Aug 2017 14:44:29 +0800 +Subject: Add forceCheck for ManualCheckSystem. + +CCBUG: 381368 +--- + src/k3b.cpp | 2 +- + src/k3bsystemproblemdialog.cpp | 4 ++-- + src/k3bsystemproblemdialog.h | 2 +- + 3 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/k3b.cpp b/src/k3b.cpp +index c3c21d4..96d3501 100644 +--- a/src/k3b.cpp ++++ b/src/k3b.cpp +@@ -1422,7 +1422,7 @@ void K3b::MainWindow::slotCheckSystem() + + void K3b::MainWindow::slotManualCheckSystem() + { +- K3b::SystemProblemDialog::checkSystem( this, K3b::SystemProblemDialog::AlwaysNotify ); ++ K3b::SystemProblemDialog::checkSystem(this, K3b::SystemProblemDialog::AlwaysNotify, true/* forceCheck */); + } + + +diff --git a/src/k3bsystemproblemdialog.cpp b/src/k3bsystemproblemdialog.cpp +index 0d0f363..34cf710 100644 +--- a/src/k3bsystemproblemdialog.cpp ++++ b/src/k3bsystemproblemdialog.cpp +@@ -169,13 +169,13 @@ void K3b::SystemProblemDialog::done(int r) + } + + +-void K3b::SystemProblemDialog::checkSystem( QWidget* parent, NotificationLevel level ) ++void K3b::SystemProblemDialog::checkSystem(QWidget* parent, NotificationLevel level, bool forceCheck) + { + QList problems; + bool showDeviceSettingsButton = false; + bool showBinSettingsButton = false; + +- if (!readCheckSystemConfig()) ++ if (!forceCheck && !readCheckSystemConfig()) + return; + + if( k3bcore->deviceManager()->allDevices().isEmpty() ) { +diff --git a/src/k3bsystemproblemdialog.h b/src/k3bsystemproblemdialog.h +index b406b25..573b557 100644 +--- a/src/k3bsystemproblemdialog.h ++++ b/src/k3bsystemproblemdialog.h +@@ -78,7 +78,7 @@ namespace K3b { + * or K3b is started for the first time. + */ + static bool readCheckSystemConfig(); +- static void checkSystem( QWidget* parent = 0, NotificationLevel level = NotifyOnlyErrors ); ++ static void checkSystem(QWidget* parent = 0, NotificationLevel level = NotifyOnlyErrors, bool forceCheck = false); + + protected: + void done(int) Q_DECL_OVERRIDE; +-- +cgit v0.11.2 + diff --git a/k3b.changes b/k3b.changes index 2f01784..fc21b9a 100644 --- a/k3b.changes +++ b/k3b.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Aug 2 07:13:07 UTC 2017 - wbauer@tmo.at + +- Add Add-forceCheck-for-ManualCheckSystem.patch to make the manual + system check work again after the previous fix + ------------------------------------------------------------------- Tue Aug 1 11:45:24 UTC 2017 - wbauer@tmo.at diff --git a/k3b.spec b/k3b.spec index a635753..f6e3556 100644 --- a/k3b.spec +++ b/k3b.spec @@ -38,6 +38,8 @@ Patch1: Don-t-suggest-to-install-libburn.patch Patch2: Fix-do-not-show-again.patch # PATCH-FIX-UPSTREAM Patch3: Add-readCheckSystemConfig.patch +# PATCH-FIX-UPSTREAM +Patch4: Add-forceCheck-for-ManualCheckSystem.patch BuildRequires: extra-cmake-modules BuildRequires: fdupes @@ -128,6 +130,7 @@ This package contain files needed for development with k3b. %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 %build CXXFLAGS="%{optflags} -fno-strict-aliasing"