From b6cbfa8d942462db9ae88df7f77f972094a5014ecfa8a4e4413f59be52533543 Mon Sep 17 00:00:00 2001 From: Raymond Wooninck Date: Fri, 1 Jul 2016 13:59:09 +0000 Subject: [PATCH] Accepting request 405880 from home:wolfi323:branches:KDE:Applications - Add fix-endless-loop.patch: fixes endless loop on startup if the configured layout cannot be loaded (boo#983173, kde#361132) OBS-URL: https://build.opensuse.org/request/show/405880 OBS-URL: https://build.opensuse.org/package/show/KDE:Applications/kmahjongg?expand=0&rev=33 --- fix-endless-loop.patch | 29 +++++++++++++++++++++++++++++ kmahjongg.changes | 6 ++++++ kmahjongg.spec | 3 +++ 3 files changed, 38 insertions(+) create mode 100644 fix-endless-loop.patch diff --git a/fix-endless-loop.patch b/fix-endless-loop.patch new file mode 100644 index 0000000..ab741ac --- /dev/null +++ b/fix-endless-loop.patch @@ -0,0 +1,29 @@ +From: Wolfgang Bauer +Date: Fri, 01 Jul 2016 11:30:27 +0000 +Subject: Fix endless loop when configured layout cannot be loaded +X-Git-Url: http://quickgit.kde.org/?p=kmahjongg.git&a=commitdiff&h=22600c69edbf59bc83377e3b96e3899ba935b1a3 +--- +Fix endless loop when configured layout cannot be loaded + +Adjust the configured layout when the default is loaded as fallback. +Otherwise loadSettings() will think that the layout has been changed in +the settings, load the layout again and call startNewGame(), which in +turn calls loadSettings() again, resulting in an endless loop. + +BUG: 361132 +FIXED-IN: 16.04.3 +REVIEW: 128279 +--- + + +--- a/kmahjongg.cpp ++++ b/kmahjongg.cpp +@@ -266,6 +266,7 @@ + qCDebug(KMAHJONGG_LOG) << "Error loading the layout. Try to load the default layout."; + + m_boardLayout->loadDefault(); ++ Prefs::setLayout(m_boardLayout->path()); + } + } + + diff --git a/kmahjongg.changes b/kmahjongg.changes index 7585592..8141178 100644 --- a/kmahjongg.changes +++ b/kmahjongg.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Jul 1 12:56:18 UTC 2016 - wbauer@tmo.at + +- Add fix-endless-loop.patch: fixes endless loop on startup if the + configured layout cannot be loaded (boo#983173, kde#361132) + ------------------------------------------------------------------- Fri Jun 10 18:00:55 UTC 2016 - tittiatcoke@gmail.com diff --git a/kmahjongg.spec b/kmahjongg.spec index 8f4696e..65f446b 100644 --- a/kmahjongg.spec +++ b/kmahjongg.spec @@ -43,6 +43,8 @@ Url: http://www.kde.org Version: 16.04.2 Release: 0 Source0: kmahjongg-%{version}.tar.xz +# PATCH-FIX-UPSTREAM fix-endless-loop.patch boo#983173, kde#361132 -- fixes endless loop on startup if the configured layout cannot be loaded +Patch: fix-endless-loop.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -53,6 +55,7 @@ by removing pieces of the same type. %prep %setup -q -n kmahjongg-%{version} +%patch -p1 %build %cmake_kf5 -d build