From 3c96a8cd4dfd20248eaf5607878705abd4f75179d9fa16e77c39d73c0fe22e51 Mon Sep 17 00:00:00 2001 From: Raymond Wooninck Date: Sun, 4 Oct 2015 13:24:06 +0000 Subject: [PATCH 1/5] Accepting request 336235 from home:wolfi323:branches:KDE:Applications Add create_state_dir.patch: fixes saving of the game state on exit when the application directory doesn't exist yet (boo#948289, kde#350160) OBS-URL: https://build.opensuse.org/request/show/336235 OBS-URL: https://build.opensuse.org/package/show/KDE:Applications/kpat?expand=0&rev=18 --- create_state_dir.patch | 39 +++++++++++++++++++++++++++++++++++++++ kpat.changes | 7 +++++++ kpat.spec | 3 +++ 3 files changed, 49 insertions(+) create mode 100644 create_state_dir.patch diff --git a/create_state_dir.patch b/create_state_dir.patch new file mode 100644 index 0000000..a2d509e --- /dev/null +++ b/create_state_dir.patch @@ -0,0 +1,39 @@ +From: Wolfgang Bauer +Date: Sat, 03 Oct 2015 19:25:07 +0000 +Subject: Create application directory if it doesn't exist +X-Git-Url: http://quickgit.kde.org/?p=kpat.git&a=commitdiff&h=a214428743993ac1ede3fa48d757ca339f498fd9 +--- +Create application directory if it doesn't exist + +Unlike KStandardDirs, QStandardDirs doesn't guarantee that the returned +directory actually exists, see also +https://community.kde.org/Frameworks/Porting_Notes/KStandardDirs . + +This patch checks for the existence of the directory and creates it if +it isn't there, before the game state is saved. + +BUG: 350160 +FIXED-IN: 15.08.2 +REVIEW: 125508 +--- + + +--- a/mainwindow.cpp ++++ b/mainwindow.cpp +@@ -756,7 +756,14 @@ + + void MainWindow::closeEvent(QCloseEvent *e) + { +- QString stateFileName = QStandardPaths::writableLocation(QStandardPaths::DataLocation) + QLatin1Char('/') + saved_state_file ; ++ QString stateDirName = QStandardPaths::writableLocation(QStandardPaths::DataLocation); ++ QString stateFileName = stateDirName + QLatin1Char('/') + saved_state_file ; ++ QDir stateFileDir(stateDirName); ++ if(!stateFileDir.exists()) ++ { ++ //create the directory if it doesn't exist (bug#350160) ++ stateFileDir.mkpath(QStringLiteral(".")); ++ } + QFile stateFile( stateFileName ); + + // Remove the existing state file, if any. + diff --git a/kpat.changes b/kpat.changes index 5b53500..31ae316 100644 --- a/kpat.changes +++ b/kpat.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Sat Oct 3 19:39:24 UTC 2015 - wbauer@tmo.at + +- Add create_state_dir.patch: fixes saving of the game state on + exit when the application directory doesn't exist yet + (boo#948289, kde#350160) + ------------------------------------------------------------------- Sun Sep 13 19:22:26 UTC 2015 - tittiatcoke@gmail.com diff --git a/kpat.spec b/kpat.spec index 2be7e13..76dd3e4 100644 --- a/kpat.spec +++ b/kpat.spec @@ -24,6 +24,8 @@ Url: http://www.kde.org Version: 15.08.1 Release: 0 Source0: kpat-%{version}.tar.xz +# PATCH-FIX-UPSTREAM create_state_dir.patch boo#948289, kde#350160 -- fixes saving of the game state on exit when the application directory doesn't exist yet +Patch: create_state_dir.patch BuildRequires: libkdegames-devel BuildRequires: update-desktop-files BuildRequires: extra-cmake-modules @@ -64,6 +66,7 @@ more. The game has nice graphics and many different carddecks. %prep %setup -q +%patch -p1 %build %cmake_kf5 -d build From 35251fadd985ed9fec4b7ba5630c8cd99477b49dc3120a0e85708fab920279db Mon Sep 17 00:00:00 2001 From: Raymond Wooninck Date: Sun, 11 Oct 2015 13:37:13 +0000 Subject: [PATCH 2/5] update to (15.08.2) OBS-URL: https://build.opensuse.org/package/show/KDE:Applications/kpat?expand=0&rev=19 --- kpat-15.08.1.tar.xz | 3 --- kpat-15.08.2.tar.xz | 3 +++ kpat.changes | 8 ++++++++ kpat.spec | 2 +- 4 files changed, 12 insertions(+), 4 deletions(-) delete mode 100644 kpat-15.08.1.tar.xz create mode 100644 kpat-15.08.2.tar.xz diff --git a/kpat-15.08.1.tar.xz b/kpat-15.08.1.tar.xz deleted file mode 100644 index 13b2c5f..0000000 --- a/kpat-15.08.1.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4d781cc4486ae20c2d55cdbf7b2f342d15bcfbb072f26d6dd56e887e9f3a8133 -size 3079296 diff --git a/kpat-15.08.2.tar.xz b/kpat-15.08.2.tar.xz new file mode 100644 index 0000000..c06694c --- /dev/null +++ b/kpat-15.08.2.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2f2f497e35264fa705e88f00d8a3f3467c526e581eb1bee22bc861d4b7a45b4b +size 3079488 diff --git a/kpat.changes b/kpat.changes index 31ae316..26bce5d 100644 --- a/kpat.changes +++ b/kpat.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Sun Oct 11 13:37:08 UTC 2015 - tittiatcoke@gmail.com + +- Update to KDE Applications 15.08.2 + * KDE Applications 15.08.2 + * https://www.kde.org/announcements/announce-applications-15.08.2.php + + ------------------------------------------------------------------- Sat Oct 3 19:39:24 UTC 2015 - wbauer@tmo.at diff --git a/kpat.spec b/kpat.spec index 76dd3e4..ec544da 100644 --- a/kpat.spec +++ b/kpat.spec @@ -21,7 +21,7 @@ Summary: Patience card game License: GPL-2.0+ Group: Amusements/Games/Board/Card Url: http://www.kde.org -Version: 15.08.1 +Version: 15.08.2 Release: 0 Source0: kpat-%{version}.tar.xz # PATCH-FIX-UPSTREAM create_state_dir.patch boo#948289, kde#350160 -- fixes saving of the game state on exit when the application directory doesn't exist yet From edcb21572a042366efe8cea8ac8018e59f420fdd3e843cc151b82778a46f4f5e Mon Sep 17 00:00:00 2001 From: Raymond Wooninck Date: Sun, 11 Oct 2015 18:09:23 +0000 Subject: [PATCH 3/5] OBS-URL: https://build.opensuse.org/package/show/KDE:Applications/kpat?expand=0&rev=20 --- kpat.changes | 1 + 1 file changed, 1 insertion(+) diff --git a/kpat.changes b/kpat.changes index 26bce5d..c3cb531 100644 --- a/kpat.changes +++ b/kpat.changes @@ -5,6 +5,7 @@ Sun Oct 11 13:37:08 UTC 2015 - tittiatcoke@gmail.com * KDE Applications 15.08.2 * https://www.kde.org/announcements/announce-applications-15.08.2.php +- Drop patch create_state_dir.patch ------------------------------------------------------------------- Sat Oct 3 19:39:24 UTC 2015 - wbauer@tmo.at From 3614e15c49e27d894bc1213f1a424fca7bfea47bc6fa4189799e5f2ff8777948 Mon Sep 17 00:00:00 2001 From: Raymond Wooninck Date: Sun, 11 Oct 2015 18:09:28 +0000 Subject: [PATCH 4/5] OBS-URL: https://build.opensuse.org/package/show/KDE:Applications/kpat?expand=0&rev=21 --- create_state_dir.patch | 39 --------------------------------------- 1 file changed, 39 deletions(-) delete mode 100644 create_state_dir.patch diff --git a/create_state_dir.patch b/create_state_dir.patch deleted file mode 100644 index a2d509e..0000000 --- a/create_state_dir.patch +++ /dev/null @@ -1,39 +0,0 @@ -From: Wolfgang Bauer -Date: Sat, 03 Oct 2015 19:25:07 +0000 -Subject: Create application directory if it doesn't exist -X-Git-Url: http://quickgit.kde.org/?p=kpat.git&a=commitdiff&h=a214428743993ac1ede3fa48d757ca339f498fd9 ---- -Create application directory if it doesn't exist - -Unlike KStandardDirs, QStandardDirs doesn't guarantee that the returned -directory actually exists, see also -https://community.kde.org/Frameworks/Porting_Notes/KStandardDirs . - -This patch checks for the existence of the directory and creates it if -it isn't there, before the game state is saved. - -BUG: 350160 -FIXED-IN: 15.08.2 -REVIEW: 125508 ---- - - ---- a/mainwindow.cpp -+++ b/mainwindow.cpp -@@ -756,7 +756,14 @@ - - void MainWindow::closeEvent(QCloseEvent *e) - { -- QString stateFileName = QStandardPaths::writableLocation(QStandardPaths::DataLocation) + QLatin1Char('/') + saved_state_file ; -+ QString stateDirName = QStandardPaths::writableLocation(QStandardPaths::DataLocation); -+ QString stateFileName = stateDirName + QLatin1Char('/') + saved_state_file ; -+ QDir stateFileDir(stateDirName); -+ if(!stateFileDir.exists()) -+ { -+ //create the directory if it doesn't exist (bug#350160) -+ stateFileDir.mkpath(QStringLiteral(".")); -+ } - QFile stateFile( stateFileName ); - - // Remove the existing state file, if any. - From 235abb5818dd75eea100d79234b3885aa51c997bd1754b4ca25a53ccad11ade1 Mon Sep 17 00:00:00 2001 From: Raymond Wooninck Date: Sun, 11 Oct 2015 18:09:52 +0000 Subject: [PATCH 5/5] OBS-URL: https://build.opensuse.org/package/show/KDE:Applications/kpat?expand=0&rev=22 --- kpat.spec | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/kpat.spec b/kpat.spec index ec544da..56f2807 100644 --- a/kpat.spec +++ b/kpat.spec @@ -24,12 +24,10 @@ Url: http://www.kde.org Version: 15.08.2 Release: 0 Source0: kpat-%{version}.tar.xz -# PATCH-FIX-UPSTREAM create_state_dir.patch boo#948289, kde#350160 -- fixes saving of the game state on exit when the application directory doesn't exist yet -Patch: create_state_dir.patch BuildRequires: libkdegames-devel BuildRequires: update-desktop-files BuildRequires: extra-cmake-modules -BuildRequireS: pkgconfig(Qt5Widgets) +BuildRequires: pkgconfig(Qt5Widgets) BuildRequires: pkgconfig(Qt5Qml) BuildRequires: pkgconfig(Qt5Quick) BuildRequires: pkgconfig(Qt5QuickWidgets) @@ -66,7 +64,6 @@ more. The game has nice graphics and many different carddecks. %prep %setup -q -%patch -p1 %build %cmake_kf5 -d build