Gentoo Archives: gentoo-commits

From: Johannes Huber <johu@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-gfx/digikam/files/, media-gfx/digikam/
Date: Wed, 02 May 2018 19:12:33
Message-Id: 1525288338.19b939a52a4462ec8e7e7650e341ef83d0ea1a16.johu@gentoo
1 commit: 19b939a52a4462ec8e7e7650e341ef83d0ea1a16
2 Author: Johannes Huber <johu <AT> gentoo <DOT> org>
3 AuthorDate: Wed May 2 19:10:22 2018 +0000
4 Commit: Johannes Huber <johu <AT> gentoo <DOT> org>
5 CommitDate: Wed May 2 19:12:18 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=19b939a5
7
8 media-gfx/digikam: Remove 5.7.0-r3
9
10 Package-Manager: Portage-2.3.33, Repoman-2.3.9
11
12 media-gfx/digikam/Manifest | 1 -
13 media-gfx/digikam/digikam-5.7.0-r3.ebuild | 174 ---------------------
14 .../digikam/files/digikam-5.7.0-kcalcore-1.patch | 44 ------
15 .../digikam/files/digikam-5.7.0-kcalcore-2.patch | 79 ----------
16 .../digikam/files/digikam-5.7.0-kreadconfig5.patch | 28 ----
17 .../files/digikam-5.7.0-mariadb-10.2-1.patch | 58 -------
18 .../files/digikam-5.7.0-mariadb-10.2-2.patch | 117 --------------
19 .../digikam/files/digikam-5.7.0-qt-5.9.3.patch | 32 ----
20 8 files changed, 533 deletions(-)
21
22 diff --git a/media-gfx/digikam/Manifest b/media-gfx/digikam/Manifest
23 index d23807cfbbd..0cb547b5865 100644
24 --- a/media-gfx/digikam/Manifest
25 +++ b/media-gfx/digikam/Manifest
26 @@ -1,2 +1 @@
27 -DIST digikam-5.7.0.tar.xz 123315064 BLAKE2B 0879b25e674e39d204038ab629dec36757ae034e3dd7e9a0a3700f9703272c4a972a21c1db5a42c6c294247a1226b1cb9a8b980bb90cdcc12e0cd752459273ef SHA512 626c9854311c637b994325237f171adce3dba39159fb336dfe95f1de287e2d08a3aaddd611eea87e8018047d331aff252b555c382cfbe1d8e14413c51a3849f4
28 DIST digikam-5.9.0.tar.xz 132931184 BLAKE2B cfbcbae8471c9c00bdf846d13bbc1ce3fbbd2ee4cc86500d011f9e15c1a21d7799638f94708794e8bc36a200df455667f9df8fcefdc38aaa00060630807d11cb SHA512 f6134a957dcd11343e34f0bc90f5560a28ed205c47d2ffd76a5418a4c63f76706045e9179c47f1448304b59081051b524f7a6847c3c1dcee4673047ce5d90e63
29
30 diff --git a/media-gfx/digikam/digikam-5.7.0-r3.ebuild b/media-gfx/digikam/digikam-5.7.0-r3.ebuild
31 deleted file mode 100644
32 index fb65507f36b..00000000000
33 --- a/media-gfx/digikam/digikam-5.7.0-r3.ebuild
34 +++ /dev/null
35 @@ -1,174 +0,0 @@
36 -# Copyright 1999-2018 Gentoo Foundation
37 -# Distributed under the terms of the GNU General Public License v2
38 -
39 -EAPI=6
40 -
41 -if [[ ${KDE_BUILD_TYPE} != live ]]; then
42 - KDE_HANDBOOK="true"
43 - KDE_TEST="true"
44 -fi
45 -CMAKE_MAKEFILE_GENERATOR="emake"
46 -KDE_APPS_MINIMAL="17.12.0"
47 -inherit kde5 toolchain-funcs
48 -
49 -DESCRIPTION="Digital photo management application"
50 -HOMEPAGE="https://www.digikam.org/"
51 -
52 -LICENSE="GPL-2"
53 -IUSE="addressbook calendar gphoto2 jpeg2k +kipi +lensfun marble mediaplayer semantic-desktop mysql opengl openmp +panorama scanner X"
54 -
55 -if [[ ${KDE_BUILD_TYPE} != live ]]; then
56 - KEYWORDS="amd64 x86"
57 - MY_PV=${PV/_/-}
58 - MY_P=${PN}-${MY_PV}
59 - SRC_BRANCH=stable
60 - [[ ${PV} =~ beta[0-9]$ ]] && SRC_BRANCH=unstable
61 - SRC_URI="mirror://kde/${SRC_BRANCH}/digikam/${MY_P}.tar.xz"
62 - S="${WORKDIR}/${MY_P}/core"
63 -fi
64 -
65 -COMMON_DEPEND="
66 - $(add_frameworks_dep kconfig)
67 - $(add_frameworks_dep kconfigwidgets)
68 - $(add_frameworks_dep kcoreaddons)
69 - $(add_frameworks_dep ki18n)
70 - $(add_frameworks_dep kiconthemes)
71 - $(add_frameworks_dep kio)
72 - $(add_frameworks_dep knotifications)
73 - $(add_frameworks_dep knotifyconfig)
74 - $(add_frameworks_dep kservice)
75 - $(add_frameworks_dep kwidgetsaddons)
76 - $(add_frameworks_dep kwindowsystem)
77 - $(add_frameworks_dep kxmlgui)
78 - $(add_frameworks_dep solid)
79 - $(add_qt_dep qtconcurrent)
80 - $(add_qt_dep qtdbus)
81 - $(add_qt_dep qtgui '-gles2')
82 - $(add_qt_dep qtprintsupport)
83 - $(add_qt_dep qtsql 'mysql?')
84 - $(add_qt_dep qtwebkit)
85 - $(add_qt_dep qtwidgets)
86 - $(add_qt_dep qtxml)
87 - dev-libs/expat
88 - >=media-gfx/exiv2-0.26:=
89 - media-libs/lcms:2
90 - media-libs/liblqr
91 - media-libs/libpng:0=
92 - media-libs/opencv:=[-qt4(-)]
93 - || ( <media-libs/opencv-3.0.0 >=media-libs/opencv-3.1.0 )
94 - media-libs/tiff:0
95 - virtual/jpeg:0
96 - addressbook? (
97 - $(add_kdeapps_dep akonadi-contacts)
98 - $(add_kdeapps_dep kcontacts)
99 - )
100 - calendar? ( $(add_kdeapps_dep kcalcore) )
101 - gphoto2? ( media-libs/libgphoto2:= )
102 - jpeg2k? ( media-libs/jasper:= )
103 - kipi? ( $(add_kdeapps_dep libkipi '' '16.03.80') )
104 - lensfun? ( media-libs/lensfun )
105 - marble? (
106 - $(add_frameworks_dep kbookmarks)
107 - $(add_kdeapps_dep marble)
108 - $(add_qt_dep qtconcurrent)
109 - $(add_qt_dep qtnetwork)
110 - )
111 - mediaplayer? ( media-libs/qtav[opengl] )
112 - mysql? ( virtual/mysql[server] )
113 - opengl? (
114 - $(add_qt_dep qtopengl)
115 - virtual/opengl
116 - )
117 - panorama? ( $(add_frameworks_dep threadweaver) )
118 - scanner? ( $(add_kdeapps_dep libksane) )
119 - semantic-desktop? ( $(add_frameworks_dep kfilemetadata) )
120 - X? (
121 - $(add_qt_dep qtx11extras)
122 - x11-libs/libX11
123 - )
124 -"
125 -DEPEND="${COMMON_DEPEND}
126 - dev-cpp/eigen:3
127 - dev-libs/boost[threads]
128 - sys-devel/gettext
129 - panorama? (
130 - sys-devel/bison
131 - sys-devel/flex
132 - )
133 -"
134 -RDEPEND="${COMMON_DEPEND}
135 - media-plugins/kipi-plugins:5
136 - panorama? ( media-gfx/hugin )
137 - !media-gfx/digikam:4
138 -"
139 -
140 -RESTRICT=test
141 -# bug 366505
142 -
143 -PATCHES=(
144 - "${FILESDIR}"/${P}-qt-5.9.3.patch
145 - "${FILESDIR}"/${P}-mariadb-10.2-{1,2}.patch
146 - "${FILESDIR}"/${P}-kreadconfig5.patch
147 - "${FILESDIR}"/${P}-kcalcore-{1,2}.patch
148 -)
149 -
150 -pkg_pretend() {
151 - [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
152 - kde5_pkg_pretend
153 -}
154 -
155 -pkg_setup() {
156 - [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
157 - kde5_pkg_setup
158 -}
159 -
160 -# FIXME: Unbundle libraw (libs/rawengine/libraw)
161 -src_prepare() {
162 - if [[ ${KDE_BUILD_TYPE} != live ]]; then
163 - # prepare the translations
164 - mv "${WORKDIR}/${MY_P}/po" po || die
165 - find po -name "*.po" -and -not -name "digikam.po" -delete || die
166 - echo "set_property(GLOBAL PROPERTY ALLOW_DUPLICATE_CUSTOM_TARGETS 1)" >> CMakeLists.txt || die
167 - echo "find_package(Gettext REQUIRED)" >> CMakeLists.txt || die
168 - echo "add_subdirectory( po )" >> CMakeLists.txt || die
169 -
170 - if use handbook; then
171 - # subdirs need to be preserved b/c relative paths...
172 - # doc-translated is, in fact, broken, and ignored
173 - mv "${WORKDIR}/${MY_P}/doc/${PN}" doc-default || die
174 - echo "find_package(KF5DocTools REQUIRED)" >> CMakeLists.txt || die
175 - echo "add_subdirectory( doc-default )" >> CMakeLists.txt || die
176 - fi
177 - fi
178 -
179 - if ! use marble; then
180 - punt_bogus_dep Qt5 Network
181 - fi
182 -
183 - kde5_src_prepare
184 -}
185 -
186 -src_configure() {
187 - local mycmakeargs=(
188 - -DENABLE_APPSTYLES=ON
189 - -DENABLE_AKONADICONTACTSUPPORT=$(usex addressbook)
190 - -DENABLE_MEDIAPLAYER=$(usex mediaplayer)
191 - -DENABLE_MYSQLSUPPORT=$(usex mysql)
192 - -DENABLE_OPENCV3=$(has_version ">=media-libs/opencv-3" && echo yes || echo no)
193 - $(cmake-utils_use_find_package calendar KF5CalendarCore)
194 - $(cmake-utils_use_find_package gphoto2 Gphoto2)
195 - $(cmake-utils_use_find_package jpeg2k Jasper)
196 - $(cmake-utils_use_find_package kipi KF5Kipi)
197 - $(cmake-utils_use_find_package lensfun LensFun)
198 - $(cmake-utils_use_find_package marble Marble)
199 - $(cmake-utils_use_find_package mediaplayer QtAV)
200 - $(cmake-utils_use_find_package opengl OpenGL)
201 - $(cmake-utils_use_find_package openmp OpenMP)
202 - $(cmake-utils_use_find_package panorama KF5ThreadWeaver)
203 - $(cmake-utils_use_find_package scanner KF5Sane)
204 - $(cmake-utils_use_find_package semantic-desktop KF5FileMetaData)
205 - $(cmake-utils_use_find_package X X11)
206 - )
207 -
208 - kde5_src_configure
209 -}
210
211 diff --git a/media-gfx/digikam/files/digikam-5.7.0-kcalcore-1.patch b/media-gfx/digikam/files/digikam-5.7.0-kcalcore-1.patch
212 deleted file mode 100644
213 index 9a9574fc982..00000000000
214 --- a/media-gfx/digikam/files/digikam-5.7.0-kcalcore-1.patch
215 +++ /dev/null
216 @@ -1,44 +0,0 @@
217 -From 12ab7af4618f10d39d4a977e00a0e68a3aac9bd2 Mon Sep 17 00:00:00 2001
218 -From: Simon Frei <freisim93@×××××.com>
219 -Date: Wed, 13 Sep 2017 15:43:49 +0200
220 -Subject: calendar: Adjust to new KCalCore API (fixes CI)
221 -
222 ----
223 - utilities/assistants/calendar/print/calsettings.cpp | 9 +++++++--
224 - 1 file changed, 7 insertions(+), 2 deletions(-)
225 -
226 -diff --git a/utilities/assistants/calendar/print/calsettings.cpp b/utilities/assistants/calendar/print/calsettings.cpp
227 -index b0bed5a..46e995d 100644
228 ---- a/utilities/assistants/calendar/print/calsettings.cpp
229 -+++ b/utilities/assistants/calendar/print/calsettings.cpp
230 -@@ -31,12 +31,17 @@
231 - #include "digikam_debug.h"
232 - #include "calsystem.h"
233 -
234 --// KCalCore includes
235 -
236 - #ifdef HAVE_KCALENDAR
237 -+ // KCalCore includes
238 -+
239 - # include <kcalcore/icalformat.h>
240 - # include <kcalcore/filestorage.h>
241 - # include <kcalcore/memorycalendar.h>
242 -+
243 -+ // Qt includes
244 -+
245 -+# include <QTimeZone>
246 - #endif // HAVE_KCALENDAR
247 -
248 - namespace Digikam
249 -@@ -290,7 +295,7 @@ void CalSettings::loadSpecial(const QUrl& url, const QColor& color)
250 - return;
251 - }
252 -
253 -- KCalCore::MemoryCalendar::Ptr memCal(new KCalCore::MemoryCalendar(QString::fromLatin1("UTC")));
254 -+ KCalCore::MemoryCalendar::Ptr memCal(new KCalCore::MemoryCalendar(QTimeZone(0)));
255 - KCalCore::FileStorage::Ptr fileStorage(new KCalCore::FileStorage(memCal, url.toLocalFile(), new KCalCore::ICalFormat));
256 -
257 - qCDebug(DIGIKAM_GENERAL_LOG) << "Loading calendar from file " << url.toLocalFile();
258 ---
259 -cgit v0.11.2
260 -
261
262 diff --git a/media-gfx/digikam/files/digikam-5.7.0-kcalcore-2.patch b/media-gfx/digikam/files/digikam-5.7.0-kcalcore-2.patch
263 deleted file mode 100644
264 index 7237b74a285..00000000000
265 --- a/media-gfx/digikam/files/digikam-5.7.0-kcalcore-2.patch
266 +++ /dev/null
267 @@ -1,79 +0,0 @@
268 -From dad750fadc926b62603cc9d64009ee5072a46d97 Mon Sep 17 00:00:00 2001
269 -From: =?UTF-8?q?Daniel=20Vr=C3=A1til?= <dvratil@×××.org>
270 -Date: Wed, 13 Sep 2017 16:51:14 +0200
271 -Subject: Adapt to KCalCore API changes
272 -
273 -This change supports both old (pre-QDateTime) and new version.
274 -
275 -Differential Revision: https://phabricator.kde.org/D7802
276 -
277 -* asturm: Incorporated fix from d204022e191d9377874689bfe4c89f7b83998188
278 ----
279 - CMakeLists.txt | 3 +++
280 - app/utils/digikam_config.h.cmake.in | 3 +++
281 - utilities/assistants/calendar/print/calsettings.cpp | 14 ++++++++++----
282 - 3 files changed, 16 insertions(+), 4 deletions(-)
283 -
284 -diff --git a/CMakeLists.txt b/CMakeLists.txt
285 -index 3ad686d..e2f28a7 100644
286 ---- a/CMakeLists.txt
287 -+++ b/CMakeLists.txt
288 -@@ -174,6 +174,9 @@ find_package(KF5 ${CALENDAR_MIN_VERSION} QUIET
289 - OPTIONAL_COMPONENTS
290 - CalendarCore # For Calendar tool.
291 - )
292 -+if ("${KF5CalendarCore_VERSION}" VERSION_GREATER 5.6.40)
293 -+ set(HAVE_KCALENDAR_QDATETIME TRUE)
294 -+endif()
295 -
296 - if(ENABLE_AKONADICONTACTSUPPORT AND NOT KF5AkonadiContact_FOUND)
297 - set(ENABLE_KFILEMETADATASUPPORT OFF)
298 -diff --git a/app/utils/digikam_config.h.cmake.in b/app/utils/digikam_config.h.cmake.in
299 -index 8a2e8e5..ffd3a22 100644
300 ---- a/app/utils/digikam_config.h.cmake.in
301 -+++ b/app/utils/digikam_config.h.cmake.in
302 -@@ -75,6 +75,9 @@
303 - /* Define to 1 if you have KCalendar core shared libraries installed */
304 - #cmakedefine HAVE_KCALENDAR 1
305 -
306 -+/* Define to 1 if you have KCalendar core shared libraries with QDateTime support installed */
307 -+#cmakedefine HAVE_KCALENDAR_QDATETIME 1
308 -+
309 - /* Define to 1 if Panorama tool is supported */
310 - #cmakedefine HAVE_PANORAMA 1
311 -
312 -diff --git a/utilities/assistants/calendar/print/calsettings.cpp b/utilities/assistants/calendar/print/calsettings.cpp
313 -index 46e995d..c6554ef 100644
314 ---- a/utilities/assistants/calendar/print/calsettings.cpp
315 -+++ b/utilities/assistants/calendar/print/calsettings.cpp
316 -@@ -295,7 +295,13 @@ void CalSettings::loadSpecial(const QUrl& url, const QColor& color)
317 - return;
318 - }
319 -
320 -- KCalCore::MemoryCalendar::Ptr memCal(new KCalCore::MemoryCalendar(QTimeZone(0)));
321 -+#ifdef HAVE_KCALENDAR_QDATETIME
322 -+ KCalCore::MemoryCalendar::Ptr memCal(new KCalCore::MemoryCalendar(QTimeZone::utc()));
323 -+ using DateTime = QDateTime;
324 -+#else
325 -+ KCalCore::MemoryCalendar::Ptr memCal(new KCalCore::MemoryCalendar(QString::fromLatin1("UTC")));
326 -+ using DateTime = KDateTime;
327 -+#endif
328 - KCalCore::FileStorage::Ptr fileStorage(new KCalCore::FileStorage(memCal, url.toLocalFile(), new KCalCore::ICalFormat));
329 -
330 - qCDebug(DIGIKAM_GENERAL_LOG) << "Loading calendar from file " << url.toLocalFile();
331 -@@ -313,9 +319,9 @@ void CalSettings::loadSpecial(const QUrl& url, const QColor& color)
332 - qLast = calSys.date(params.year + 1, 1, 1);
333 - qLast = qLast.addDays(-1);
334 -
335 -- KDateTime dtFirst(qFirst);
336 -- KDateTime dtLast(qLast);
337 -- KDateTime dtCurrent;
338 -+ DateTime dtFirst(qFirst, QTime(0, 0));
339 -+ DateTime dtLast(qLast, QTime(0, 0));
340 -+ DateTime dtCurrent;
341 -
342 - int counter = 0;
343 - KCalCore::Event::List list = memCal->rawEvents(qFirst, qLast);
344 ---
345 -cgit v0.11.2
346 -
347
348 diff --git a/media-gfx/digikam/files/digikam-5.7.0-kreadconfig5.patch b/media-gfx/digikam/files/digikam-5.7.0-kreadconfig5.patch
349 deleted file mode 100644
350 index 7305f64aa3f..00000000000
351 --- a/media-gfx/digikam/files/digikam-5.7.0-kreadconfig5.patch
352 +++ /dev/null
353 @@ -1,28 +0,0 @@
354 -From bbf087645d426e20ce96fa2accd70ff4198d30ec Mon Sep 17 00:00:00 2001
355 -From: Andreas Sturmlechner <andreas.sturmlechner@×××××.com>
356 -Date: Wed, 6 Dec 2017 22:31:29 +0100
357 -Subject: [PATCH] cleanup_digikamdb: Don't depend on kde-runtime
358 -
359 -Summary: This needs to use kreadconfig5 in a Frameworks world.
360 -
361 -Differential Revision: https://phabricator.kde.org/D9235
362 ----
363 - data/scripts/cleanup_digikamdb/cleanup_digikamdb | 2 +-
364 - 1 file changed, 1 insertion(+), 1 deletion(-)
365 -
366 -diff --git a/data/scripts/cleanup_digikamdb/cleanup_digikamdb b/data/scripts/cleanup_digikamdb/cleanup_digikamdb
367 -index 3a68d3d040..9cfcd6ac8d 100644
368 ---- a/data/scripts/cleanup_digikamdb/cleanup_digikamdb
369 -+++ b/data/scripts/cleanup_digikamdb/cleanup_digikamdb
370 -@@ -58,7 +58,7 @@ readConfigValue()
371 - {
372 - local config_file="digikamrc"
373 - local config_group="Database Settings"
374 -- local db_dir=$(kreadconfig --file "${config_file}" --group "${config_group}" --key "$1")
375 -+ local db_dir=$(kreadconfig5 --file "${config_file}" --group "${config_group}" --key "$1")
376 - echo "${db_dir}"
377 - }
378 -
379 ---
380 -2.15.1
381 -
382
383 diff --git a/media-gfx/digikam/files/digikam-5.7.0-mariadb-10.2-1.patch b/media-gfx/digikam/files/digikam-5.7.0-mariadb-10.2-1.patch
384 deleted file mode 100644
385 index e3e968fbaac..00000000000
386 --- a/media-gfx/digikam/files/digikam-5.7.0-mariadb-10.2-1.patch
387 +++ /dev/null
388 @@ -1,58 +0,0 @@
389 -From 395ab5b02ed7d02736a08e370217c0c96b391bb9 Mon Sep 17 00:00:00 2001
390 -From: Maik Qualmann <metzpinguin@×××××.com>
391 -Date: Wed, 6 Dec 2017 08:09:44 +0100
392 -Subject: Workaround for the problem mariaDB >= 10.2 and QTBUG-63108
393 -
394 ----
395 - libs/album/albummanager.cpp | 14 ++++++++++++++
396 - 1 file changed, 14 insertions(+)
397 -
398 -diff --git a/libs/album/albummanager.cpp b/libs/album/albummanager.cpp
399 -index a72acc3..2ea40e9 100644
400 ---- a/libs/album/albummanager.cpp
401 -+++ b/libs/album/albummanager.cpp
402 -@@ -162,6 +162,7 @@ public:
403 - hasPriorizedDbPath(false),
404 - dbPort(0),
405 - dbInternalServer(false),
406 -+ dbFakeConnection(false),
407 - showOnlyAvailableAlbums(false),
408 - albumListJob(0),
409 - dateListJob(0),
410 -@@ -192,6 +193,7 @@ public:
411 - QString dbHostName;
412 - int dbPort;
413 - bool dbInternalServer;
414 -+ bool dbFakeConnection;
415 -
416 - bool showOnlyAvailableAlbums;
417 -
418 -@@ -391,6 +393,11 @@ void AlbumManager::cleanUp()
419 - d->personListJob->cancel();
420 - d->personListJob = 0;
421 - }
422 -+
423 -+ if (d->dbFakeConnection)
424 -+ {
425 -+ QSqlDatabase::removeDatabase(QLatin1String("FakeConnection"));
426 -+ }
427 - }
428 -
429 - bool AlbumManager::databaseEqual(const DbEngineParameters& parameters) const
430 -@@ -727,6 +734,13 @@ bool AlbumManager::setDatabase(const DbEngineParameters& params, bool priority,
431 - // ensure, embedded database is loaded
432 - qCDebug(DIGIKAM_GENERAL_LOG) << params;
433 -
434 -+ // workaround for the problem mariaDB >= 10.2 and QTBUG-63108.
435 -+ if (params.isMySQL() && !d->dbFakeConnection)
436 -+ {
437 -+ QSqlDatabase::addDatabase(QLatin1String("QMYSQL"), QLatin1String("FakeConnection"));
438 -+ d->dbFakeConnection = true;
439 -+ }
440 -+
441 - if (params.internalServer)
442 - {
443 - DatabaseServerError result = DatabaseServerStarter::instance()->startServerManagerProcess(params);
444 ---
445 -cgit v0.11.2
446 -
447
448 diff --git a/media-gfx/digikam/files/digikam-5.7.0-mariadb-10.2-2.patch b/media-gfx/digikam/files/digikam-5.7.0-mariadb-10.2-2.patch
449 deleted file mode 100644
450 index eed213c3bc9..00000000000
451 --- a/media-gfx/digikam/files/digikam-5.7.0-mariadb-10.2-2.patch
452 +++ /dev/null
453 @@ -1,117 +0,0 @@
454 -From ba1ceda1448895009ba6524398ca42441695cc3e Mon Sep 17 00:00:00 2001
455 -From: Maik Qualmann <metzpinguin@×××××.com>
456 -Date: Wed, 6 Dec 2017 18:28:32 +0100
457 -Subject: workaround for QTBUG-63108 now works in all cases
458 -
459 ----
460 - app/main/digikamapp.cpp | 2 ++
461 - libs/album/albummanager.cpp | 30 +++++++++++++++++++++---------
462 - libs/album/albummanager.h | 3 +++
463 - libs/database/utils/dbsettingswidget.cpp | 3 +++
464 - 4 files changed, 29 insertions(+), 9 deletions(-)
465 -
466 -diff --git a/app/main/digikamapp.cpp b/app/main/digikamapp.cpp
467 -index 4349271..935b786 100644
468 ---- a/app/main/digikamapp.cpp
469 -+++ b/app/main/digikamapp.cpp
470 -@@ -383,6 +383,8 @@ DigikamApp::~DigikamApp()
471 - DatabaseServerStarter::instance()->stopServerManagerProcess();
472 - }
473 -
474 -+ AlbumManager::instance()->removeFakeConnection();
475 -+
476 - m_instance = 0;
477 -
478 - delete d->modelCollection;
479 -diff --git a/libs/album/albummanager.cpp b/libs/album/albummanager.cpp
480 -index 2ea40e9..92a8b37 100644
481 ---- a/libs/album/albummanager.cpp
482 -+++ b/libs/album/albummanager.cpp
483 -@@ -393,11 +393,6 @@ void AlbumManager::cleanUp()
484 - d->personListJob->cancel();
485 - d->personListJob = 0;
486 - }
487 --
488 -- if (d->dbFakeConnection)
489 -- {
490 -- QSqlDatabase::removeDatabase(QLatin1String("FakeConnection"));
491 -- }
492 - }
493 -
494 - bool AlbumManager::databaseEqual(const DbEngineParameters& parameters) const
495 -@@ -734,11 +729,10 @@ bool AlbumManager::setDatabase(const DbEngineParameters& params, bool priority,
496 - // ensure, embedded database is loaded
497 - qCDebug(DIGIKAM_GENERAL_LOG) << params;
498 -
499 -- // workaround for the problem mariaDB >= 10.2 and QTBUG-63108.
500 -- if (params.isMySQL() && !d->dbFakeConnection)
501 -+ // workaround for the problem mariaDB >= 10.2 and QTBUG-63108
502 -+ if (params.isMySQL())
503 - {
504 -- QSqlDatabase::addDatabase(QLatin1String("QMYSQL"), QLatin1String("FakeConnection"));
505 -- d->dbFakeConnection = true;
506 -+ addFakeConnection();
507 - }
508 -
509 - if (params.internalServer)
510 -@@ -3558,4 +3552,22 @@ void AlbumManager::removeWatchedPAlbums(const PAlbum* const album)
511 - d->albumWatch->removeWatchedPAlbums(album);
512 - }
513 -
514 -+void AlbumManager::addFakeConnection()
515 -+{
516 -+ if (!d->dbFakeConnection)
517 -+ {
518 -+ // workaround for the problem mariaDB >= 10.2 and QTBUG-63108
519 -+ QSqlDatabase::addDatabase(QLatin1String("QMYSQL"), QLatin1String("FakeConnection"));
520 -+ d->dbFakeConnection = true;
521 -+ }
522 -+}
523 -+
524 -+void AlbumManager::removeFakeConnection()
525 -+{
526 -+ if (d->dbFakeConnection)
527 -+ {
528 -+ QSqlDatabase::removeDatabase(QLatin1String("FakeConnection"));
529 -+ }
530 -+}
531 -+
532 - } // namespace Digikam
533 -diff --git a/libs/album/albummanager.h b/libs/album/albummanager.h
534 -index bee58c4..5b24c8d 100644
535 ---- a/libs/album/albummanager.h
536 -+++ b/libs/album/albummanager.h
537 -@@ -625,6 +625,9 @@ public:
538 -
539 - void removeWatchedPAlbums(const PAlbum* const album);
540 -
541 -+ void addFakeConnection();
542 -+ void removeFakeConnection();
543 -+
544 - //@}
545 -
546 - Q_SIGNALS:
547 -diff --git a/libs/database/utils/dbsettingswidget.cpp b/libs/database/utils/dbsettingswidget.cpp
548 -index ca95646..4f1e1a4 100644
549 ---- a/libs/database/utils/dbsettingswidget.cpp
550 -+++ b/libs/database/utils/dbsettingswidget.cpp
551 -@@ -65,6 +65,7 @@
552 - #include "dlayoutbox.h"
553 - #include "mysqlinitbinary.h"
554 - #include "mysqlservbinary.h"
555 -+#include "albummanager.h"
556 -
557 - namespace Digikam
558 - {
559 -@@ -669,6 +670,8 @@ bool DatabaseSettingsWidget::checkMysqlServerConnection(QString& error)
560 -
561 - qApp->setOverrideCursor(Qt::WaitCursor);
562 -
563 -+ AlbumManager::instance()->addFakeConnection();
564 -+
565 - QString databaseID(QLatin1String("ConnectionTest"));
566 - QSqlDatabase testDatabase = QSqlDatabase::addDatabase(databaseBackend(), databaseID);
567 -
568 ---
569 -cgit v0.11.2
570 -
571
572 diff --git a/media-gfx/digikam/files/digikam-5.7.0-qt-5.9.3.patch b/media-gfx/digikam/files/digikam-5.7.0-qt-5.9.3.patch
573 deleted file mode 100644
574 index 7001850cd9c..00000000000
575 --- a/media-gfx/digikam/files/digikam-5.7.0-qt-5.9.3.patch
576 +++ /dev/null
577 @@ -1,32 +0,0 @@
578 -From 855ba5b7d4bc6337234720a72ea824ddd3b32e5b Mon Sep 17 00:00:00 2001
579 -From: Maik Qualmann <metzpinguin@×××××.com>
580 -Date: Tue, 28 Nov 2017 21:29:00 +0100
581 -Subject: try to fix the Qt-5.9.3 empty album problem CCBUGS: 387373
582 -
583 -* asturm: Fix build w/ Qt-5.7
584 ----
585 - libs/database/coredb/coredburl.cpp | 7 ++++++-
586 - 1 file changed, 6 insertions(+), 1 deletion(-)
587 -
588 -diff --git a/libs/database/coredb/coredburl.cpp b/libs/database/coredb/coredburl.cpp
589 -index 2c0d0eb..b1bdf71 100644
590 ---- a/libs/database/coredb/coredburl.cpp
591 -+++ b/libs/database/coredb/coredburl.cpp
592 -@@ -88,8 +88,13 @@ CoreDbUrl CoreDbUrl::fromAlbumAndName(const QString& name,
593 - const DbEngineParameters& parameters)
594 - {
595 - CoreDbUrl url;
596 -+ QString path(album);
597 - url.setScheme(QLatin1String("digikamalbums"));
598 -- url.setPath(QLatin1Char('/') + album + QLatin1Char('/') + name);
599 -+
600 -+ if (path != QLatin1String("/"))
601 -+ path += QLatin1Char('/');
602 -+
603 -+ url.setPath(path + name);
604 -
605 - QUrlQuery q(url);
606 - q.addQueryItem(QLatin1String("albumRoot"), albumRoot.adjusted(QUrl::StripTrailingSlash).toLocalFile());
607 ---
608 -cgit v0.11.2
609 -