From d9703de99155b8c16b54ac95637eef7d07e6cc1f51c9833bf62cf6d16462383d Mon Sep 17 00:00:00 2001 From: OBS User buildservice-autocommit Date: Tue, 26 Mar 2019 14:38:37 +0000 Subject: [PATCH] Updating link to change in openSUSE:Factory/digikam revision 178.0 OBS-URL: https://build.opensuse.org/package/show/KDE:Extra/digikam?expand=0&rev=312c68177a02bc5a96e6a7e11535768b --- ...vert-replace-obsolete-qSort-function.patch | 635 ------ ...vert-replace-obsolete-qSort-function.patch | 105 - Add-QtWebEngine-support.patch | 1727 ----------------- Lower-minimum-exiv2-version.patch | 18 +- add-support-for-Exiv2-0.27.patch | 133 -- ...-find-cmake-script-to-exiv2-0.27-RC1.patch | 48 - be-compatible-with-backward-0.26.patch | 29 - digikam-5.9.0.tar.xz | 3 - digikam-6.0.0.tar.xz | 3 + digikam.changes | 101 + digikam.spec | 246 +-- f27ab9c1051bd0a0.patch | 63 - ...tch-to-be-compatible-with-Exiv2-0.27.patch | 44 - ...k-Welcome-page-by-clicking-on-a-link.patch | 25 - fix-compile.patch | 37 - 15 files changed, 201 insertions(+), 3016 deletions(-) delete mode 100644 0001-Revert-replace-obsolete-qSort-function.patch delete mode 100644 0002-Revert-replace-obsolete-qSort-function.patch delete mode 100644 Add-QtWebEngine-support.patch delete mode 100644 add-support-for-Exiv2-0.27.patch delete mode 100644 adjust-find-cmake-script-to-exiv2-0.27-RC1.patch delete mode 100644 be-compatible-with-backward-0.26.patch delete mode 100644 digikam-5.9.0.tar.xz create mode 100644 digikam-6.0.0.tar.xz delete mode 100644 f27ab9c1051bd0a0.patch delete mode 100644 first-patch-to-be-compatible-with-Exiv2-0.27.patch delete mode 100644 fix-black-Welcome-page-by-clicking-on-a-link.patch delete mode 100644 fix-compile.patch diff --git a/0001-Revert-replace-obsolete-qSort-function.patch b/0001-Revert-replace-obsolete-qSort-function.patch deleted file mode 100644 index 2535c48..0000000 --- a/0001-Revert-replace-obsolete-qSort-function.patch +++ /dev/null @@ -1,635 +0,0 @@ -From 87d90549a5db7c309228697652a4608ee774be74 Mon Sep 17 00:00:00 2001 -From: Wolfgang Bauer -Date: Sun, 14 Jan 2018 00:17:04 +0100 -Subject: [PATCH] Revert "replace obsolete qSort() function" - -This reverts commit 1fdff40d7efaf9ab9d8fe716970e02a18bdb73f7. -It breaks compilation with GCC 4.8. ---- - app/utils/tooltipfiller.cpp | 2 +- - app/views/tableview/tableview_model.cpp | 6 ++-- - libs/album/albummanager.cpp | 6 ++-- - libs/database/collection/collectionscanner.cpp | 2 +- - .../imagehistory/imagehistorygraph_boost.h | 2 +- - .../imagehistory/imagehistorygraphmodel.cpp | 2 +- - libs/database/models/imagemodel.cpp | 2 +- - libs/database/tags/facetags.cpp | 2 +- - libs/dimg/imagehistory/dimagehistory.cpp | 2 +- - libs/dmetadata/dmetadatasettingscontainer.cpp | 2 +- - libs/dtrash/dtrashitemmodel.cpp | 32 +++++++++++----------- - libs/imageproperties/disjointmetadata.cpp | 2 +- - libs/tags/tagfolderview.cpp | 18 ++++++------ - libs/tags/tagsmanager/tagmngrtreeview.cpp | 10 +++---- - libs/widgets/fonts/dfontproperties.cpp | 4 +-- - libs/widgets/iccprofiles/iccprofilescombobox.cpp | 2 +- - showfoto/thumbbar/showfotoimagemodel.cpp | 2 +- - tests/dimg/dimghistorygraphtest.cpp | 18 ++++++------ - utilities/advancedrename/advancedrenamemanager.cpp | 6 ++-- - .../editor/correlator/track_correlator_thread.cpp | 2 +- - .../editor/searches/searchresultmodel.cpp | 4 +-- - .../geolocation/geoiface/tracks/trackreader.cpp | 2 +- - utilities/importui/models/importimagemodel.cpp | 2 +- - utilities/maintenance/imageinfojob.cpp | 2 +- - utilities/searchwindow/searchutilities.cpp | 6 ++-- - 25 files changed, 70 insertions(+), 70 deletions(-) - -diff --git a/core/app/utils/tooltipfiller.cpp b/core/app/utils/tooltipfiller.cpp -index 0371cdfe73..e40cefd18f 100644 ---- a/core/app/utils/tooltipfiller.cpp -+++ b/core/app/utils/tooltipfiller.cpp -@@ -677,7 +677,7 @@ QString ToolTipFiller::filterActionTipContents(const FilterAction& action) - - const QHash& params = action.parameters(); - QList keys = params.keys(); -- std::sort(keys.begin(), keys.end()); -+ qSort(keys); - - foreach(const QString& key, keys) - { -diff --git a/core/app/views/tableview/tableview_model.cpp b/core/app/views/tableview/tableview_model.cpp -index 6047462023..f168f577f1 100644 ---- a/core/app/views/tableview/tableview_model.cpp -+++ b/core/app/views/tableview/tableview_model.cpp -@@ -1144,9 +1144,9 @@ QList TableViewModel::sortItems(const QList sortedList = itemList; - -- std::sort(sortedList.begin(), -- sortedList.end(), -- LessThan(this)); -+ qSort(sortedList.begin(), -+ sortedList.end(), -+ LessThan(this)); - - return sortedList; - } -diff --git a/core/libs/album/albummanager.cpp b/core/libs/album/albummanager.cpp -index ea0726eab3..f41f3faeac 100644 ---- a/core/libs/album/albummanager.cpp -+++ b/core/libs/album/albummanager.cpp -@@ -1290,7 +1290,7 @@ void AlbumManager::scanPAlbums() - QList currentAlbums = CoreDbAccess().db()->scanAlbums(); - - // sort by relative path so that parents are created before children -- std::sort(currentAlbums.begin(), currentAlbums.end()); -+ qSort(currentAlbums); - - QList newAlbums; - -@@ -1342,7 +1342,7 @@ void AlbumManager::scanPAlbums() - } - - // sort by relative path so that parents are created before children -- std::sort(newAlbums.begin(), newAlbums.end()); -+ qSort(newAlbums); - - // create all new albums - foreach(const AlbumInfo& info, newAlbums) -@@ -1924,7 +1924,7 @@ void AlbumManager::setCurrentAlbums(QList albums) - /** - * Sort is needed to identify selection correctly, ex AlbumHistory - */ -- std::sort(albums.begin(), albums.end()); -+ qSort(albums.begin(),albums.end()); - d->currentAlbums.clear(); - d->currentAlbums+=albums; - -diff --git a/core/libs/database/collection/collectionscanner.cpp b/core/libs/database/collection/collectionscanner.cpp -index b3284c8d99..b98d2d799a 100644 ---- a/core/libs/database/collection/collectionscanner.cpp -+++ b/core/libs/database/collection/collectionscanner.cpp -@@ -531,7 +531,7 @@ void CollectionScanner::finishCompleteScan(const QStringList& albumPaths) - - // remove subalbums from list if parent album is already contained - QStringList sortedPaths = albumPaths; -- std::sort(sortedPaths.begin(), sortedPaths.end()); -+ qSort(sortedPaths); - QStringList::iterator it, it2; - - for (it = sortedPaths.begin(); it != sortedPaths.end(); ) -diff --git a/core/libs/database/imagehistory/imagehistorygraph_boost.h b/core/libs/database/imagehistory/imagehistorygraph_boost.h -index 5c4c49ac5f..affdf48466 100644 ---- a/core/libs/database/imagehistory/imagehistorygraph_boost.h -+++ b/core/libs/database/imagehistory/imagehistorygraph_boost.h -@@ -1454,7 +1454,7 @@ protected: - outEdges = toList(boost::out_edges(u, g)); - // Sort edges. The lessThan we have takes vertices, so we use a lessThan which - // maps the given edges to their targets, and calls our vertex lessThan. -- std::sort(outEdges.begin(), outEdges.end(), lessThanMapEdgeToTarget(g, lessThan)); -+ qSort(outEdges.begin(), outEdges.end(), lessThanMapEdgeToTarget(g, lessThan)); - - foreach(const edge_descriptor& e, outEdges) - { -diff --git a/core/libs/database/imagehistory/imagehistorygraphmodel.cpp b/core/libs/database/imagehistory/imagehistorygraphmodel.cpp -index fbe53b0af9..930bc9eab4 100644 ---- a/core/libs/database/imagehistory/imagehistorygraphmodel.cpp -+++ b/core/libs/database/imagehistory/imagehistorygraphmodel.cpp -@@ -521,7 +521,7 @@ void ImageHistoryGraphModel::Private:: - { - parentItem->addItem(new CategoryItem(title)); - -- std::sort(vertices.begin(), vertices.end(), sortBy(oldestInfoFirst)); -+ qSort(vertices.begin(), vertices.end(), sortBy(oldestInfoFirst)); - bool isFirst = true; - VertexItem* item = 0; - -diff --git a/core/libs/database/models/imagemodel.cpp b/core/libs/database/models/imagemodel.cpp -index cd4dde5520..db30e93a5b 100644 ---- a/core/libs/database/models/imagemodel.cpp -+++ b/core/libs/database/models/imagemodel.cpp -@@ -1197,7 +1197,7 @@ QList > ImageModelIncrementalUpdater::toContiguousPairs(const QL - } - - QList indices(unsorted); -- std::sort(indices.begin(), indices.end()); -+ qSort(indices); - - QPair pair(indices.first(), indices.first()); - -diff --git a/core/libs/database/tags/facetags.cpp b/core/libs/database/tags/facetags.cpp -index dc1f965ce2..cdf08c6613 100644 ---- a/core/libs/database/tags/facetags.cpp -+++ b/core/libs/database/tags/facetags.cpp -@@ -398,7 +398,7 @@ int FaceTags::personParentTag() - QList mosttoplevelTags = tiers.values(tiers.begin().key()); - - // as a pretty weak criterion, take the largest id which usually corresponds to the latest tag creation. -- std::sort(mosttoplevelTags.begin(), mosttoplevelTags.end()); -+ qSort(mosttoplevelTags); - return TagsCache::instance()->parentTag(mosttoplevelTags.last()); - } - -diff --git a/core/libs/dimg/imagehistory/dimagehistory.cpp b/core/libs/dimg/imagehistory/dimagehistory.cpp -index ee24dc206c..2eb2b2ea17 100644 ---- a/core/libs/dimg/imagehistory/dimagehistory.cpp -+++ b/core/libs/dimg/imagehistory/dimagehistory.cpp -@@ -534,7 +534,7 @@ QString DImageHistory::toXml() const - if (!params.isEmpty()) - { - QList keys = params.keys(); -- std::sort(keys.begin(), keys.end()); -+ qSort(keys); - - foreach(const QString& key, keys) - { -diff --git a/core/libs/dmetadata/dmetadatasettingscontainer.cpp b/core/libs/dmetadata/dmetadatasettingscontainer.cpp -index 32def9519b..4789f7543a 100644 ---- a/core/libs/dmetadata/dmetadatasettingscontainer.cpp -+++ b/core/libs/dmetadata/dmetadatasettingscontainer.cpp -@@ -440,7 +440,7 @@ void DMetadataSettingsContainer::readOneGroup(KConfigGroup& group, const QString - container.append(ns); - } - -- std::sort(container.begin(), container.end(), Digikam::dmcompare); -+ qSort(container.begin(), container.end(), Digikam::dmcompare); - } - - void DMetadataSettingsContainer::writeOneGroup(KConfigGroup& group, const QString& name, QList& container) const -diff --git a/core/libs/dtrash/dtrashitemmodel.cpp b/core/libs/dtrash/dtrashitemmodel.cpp -index b21ac32446..0abbe7d223 100644 ---- a/core/libs/dtrash/dtrashitemmodel.cpp -+++ b/core/libs/dtrash/dtrashitemmodel.cpp -@@ -146,28 +146,28 @@ void DTrashItemModel::sort(int column, Qt::SortOrder order) - return; - } - -- std::sort(d->data.begin(), d->data.end(), -- [column, order](const DTrashItemInfo& a, const DTrashItemInfo& b) -+ qSort(d->data.begin(), d->data.end(), -+ [column, order](const DTrashItemInfo& a, const DTrashItemInfo& b) -+ { -+ if (column == 2 && a.deletionTimestamp != b.deletionTimestamp) - { -- if (column == 2 && a.deletionTimestamp != b.deletionTimestamp) -+ if (order == Qt::DescendingOrder) - { -- if (order == Qt::DescendingOrder) -- { -- return a.deletionTimestamp > b.deletionTimestamp; -- } -- else -- { -- return a.deletionTimestamp < b.deletionTimestamp; -- } -+ return a.deletionTimestamp > b.deletionTimestamp; - } -- -- if (order == Qt::DescendingOrder) -+ else - { -- return a.collectionRelativePath > b.collectionRelativePath; -+ return a.deletionTimestamp < b.deletionTimestamp; - } -+ } -+ -+ if (order == Qt::DescendingOrder) -+ { -+ return a.collectionRelativePath > b.collectionRelativePath; -+ } - -- return a.collectionRelativePath < b.collectionRelativePath; -- }); -+ return a.collectionRelativePath < b.collectionRelativePath; -+ }); - - const QModelIndex topLeft = index(0, 0, QModelIndex()); - const QModelIndex bottomRight = index(rowCount(QModelIndex())-1, -diff --git a/core/libs/imageproperties/disjointmetadata.cpp b/core/libs/imageproperties/disjointmetadata.cpp -index 3f3cd56bbc..53d5cb2cf0 100644 ---- a/core/libs/imageproperties/disjointmetadata.cpp -+++ b/core/libs/imageproperties/disjointmetadata.cpp -@@ -609,7 +609,7 @@ void DisjointMetadata::loadTags( QList &loadedTagIds) - return; - } - -- std::sort(loadedTagIds.begin(), loadedTagIds.end()); -+ qSort(loadedTagIds.begin(),loadedTagIds.end()); - // We search for metadata available tags, and - // it is not present in current list, set it to - // disjoint -diff --git a/core/libs/tags/tagfolderview.cpp b/core/libs/tags/tagfolderview.cpp -index d4e1c09dfc..a194af0a5a 100644 ---- a/core/libs/tags/tagfolderview.cpp -+++ b/core/libs/tags/tagfolderview.cpp -@@ -136,7 +136,7 @@ void TagFolderView::addCustomContextMenuActions(ContextMenuHelper& cmh, Album* a - cmh.addSeparator(); - if (d->showDeleteFaceTagsAction) - { -- cmh.addActionDeleteFaceTag(tagModificationHelper(), tag); -+ cmh.addActionDeleteFaceTag(tagModificationHelper(),tag); - cmh.addSeparator(); - } - else -@@ -146,7 +146,7 @@ void TagFolderView::addCustomContextMenuActions(ContextMenuHelper& cmh, Album* a - // If the tag is no face tag, add the option to set it as face tag. - if (!FaceTags::isPerson(tag->id())) - { -- cmh.addActionTagToFaceTag(tagModificationHelper(), tag); -+ cmh.addActionTagToFaceTag(tagModificationHelper(),tag); - } - } - cmh.addActionEditTag(tagModificationHelper(), tag); -@@ -199,7 +199,7 @@ void TagFolderView::slotExpandNode() - { - expand(child); - greyNodes.enqueue(child); -- child = current.child(it++, 0); -+ child = current.child(it++,0); - } - } - } -@@ -234,7 +234,7 @@ void TagFolderView::slotCollapseNode() - { - collapse(child); - greyNodes.enqueue(child); -- child = current.child(it++, 0); -+ child = current.child(it++,0); - } - } - } -@@ -294,18 +294,18 @@ void TagFolderView::setContexMenuItems(ContextMenuHelper& cmh, QList< TAlbum* > - cmh.addSeparator(); - if (d->showDeleteFaceTagsAction) - { -- cmh.addActionDeleteFaceTags(tagModificationHelper(), albums); -+ cmh.addActionDeleteFaceTags(tagModificationHelper(),albums); - } - else - { -- cmh.addActionDeleteTags(tagModificationHelper(), albums); -+ cmh.addActionDeleteTags(tagModificationHelper(),albums); - // If one of the selected tags is no face tag, add the action to mark them as face tags. - foreach (TAlbum * const tag, albums) - { - if (!FaceTags::isPerson(tag->id())) - { - cmh.addSeparator(); -- cmh.addActionTagToFaceTag(tagModificationHelper(), tag); -+ cmh.addActionTagToFaceTag(tagModificationHelper(),tag); - break; - } - } -@@ -342,7 +342,7 @@ void TagFolderView::contextMenuEvent(QContextMenuEvent* event) - - QModelIndexList selectedItems = selectionModel()->selectedIndexes(); - -- std::sort(selectedItems.begin(), selectedItems.end()); -+ qSort(selectedItems.begin(),selectedItems.end()); - QList items; - - foreach(const QModelIndex& mIndex, selectedItems) -@@ -356,7 +356,7 @@ void TagFolderView::contextMenuEvent(QContextMenuEvent* event) - */ - if(items.isEmpty()) - { -- QModelIndex root = this->model()->index(0, 0); -+ QModelIndex root = this->model()->index(0,0); - items.append(static_cast(albumForIndex(root))); - } - -diff --git a/core/libs/tags/tagsmanager/tagmngrtreeview.cpp b/core/libs/tags/tagsmanager/tagmngrtreeview.cpp -index 6dec5c6eb7..fb2a6991ba 100644 ---- a/core/libs/tags/tagsmanager/tagmngrtreeview.cpp -+++ b/core/libs/tags/tagsmanager/tagmngrtreeview.cpp -@@ -71,7 +71,7 @@ void TagMngrTreeView::contextMenuEvent(QContextMenuEvent* event) - { - QModelIndexList selectedItems = selectionModel()->selectedIndexes(); - -- std::sort(selectedItems.begin(), selectedItems.end()); -+ qSort(selectedItems.begin(),selectedItems.end()); - QList items; - - foreach(const QModelIndex& mIndex, selectedItems) -@@ -85,7 +85,7 @@ void TagMngrTreeView::contextMenuEvent(QContextMenuEvent* event) - */ - if(items.isEmpty()) - { -- QModelIndex root = this->model()->index(0, 0); -+ QModelIndex root = this->model()->index(0,0); - items.append(static_cast(albumForIndex(root))); - } - -@@ -130,7 +130,7 @@ void TagMngrTreeView::setContexMenuItems(ContextMenuHelper& cmh, QList - - if (!isRoot) - { -- cmh.addActionDeleteTags(tagModificationHelper(), albums); -+ cmh.addActionDeleteTags(tagModificationHelper(),albums); - } - else - { -@@ -194,7 +194,7 @@ void TagMngrTreeView::slotExpandSelected() - - void TagMngrTreeView::slotExpandTree() - { -- QModelIndex root = this->model()->index(0, 0); -+ QModelIndex root = this->model()->index(0,0); - QItemSelectionModel* const model = this->selectionModel(); - QModelIndexList selected = model->selectedIndexes(); - -@@ -227,7 +227,7 @@ void TagMngrTreeView::slotExpandTree() - expand(child); - } - -- child = current.child(it++, 0); -+ child = current.child(it++,0); - } - } - else -diff --git a/core/libs/widgets/fonts/dfontproperties.cpp b/core/libs/widgets/fonts/dfontproperties.cpp -index c78f8e5cb2..7466b62477 100644 ---- a/core/libs/widgets/fonts/dfontproperties.cpp -+++ b/core/libs/widgets/fonts/dfontproperties.cpp -@@ -1037,7 +1037,7 @@ qreal DFontProperties::Private::fillSizeList(const QList& sizes_) - - // Insert sizes into the listbox. - sizeListBox->clear(); -- std::sort(sizes.begin(), sizes.end()); -+ qSort(sizes); - - Q_FOREACH (qreal size, sizes) - { -@@ -1400,7 +1400,7 @@ QStringList DFontProperties::Private::translateFontNameList(const QStringList& n - - // Sort real fonts alphabetically. - -- std::sort(trNames.begin(), trNames.end(), localeLessThan); -+ qSort(trNames.begin(), trNames.end(), localeLessThan); - - // Prepend generic fonts, in the predefined order. - -diff --git a/core/libs/widgets/iccprofiles/iccprofilescombobox.cpp b/core/libs/widgets/iccprofiles/iccprofilescombobox.cpp -index 779be49aec..3be93a04a8 100644 ---- a/core/libs/widgets/iccprofiles/iccprofilescombobox.cpp -+++ b/core/libs/widgets/iccprofiles/iccprofilescombobox.cpp -@@ -97,7 +97,7 @@ static void formatProfiles(const QList& givenProfiles, QList > ShowfotoImageModel::toContiguousPairs(const QList& - } - - QList indices(unsorted); -- std::sort(indices.begin(), indices.end()); -+ qSort(indices); - - QPair pair(indices.first(), indices.first()); - -diff --git a/core/tests/dimg/dimghistorygraphtest.cpp b/core/tests/dimg/dimghistorygraphtest.cpp -index e9204954cd..335d8192a5 100644 ---- a/core/tests/dimg/dimghistorygraphtest.cpp -+++ b/core/tests/dimg/dimghistorygraphtest.cpp -@@ -183,7 +183,7 @@ void DImgHistoryGraphTest::testEditing() - controlCloud << IdPair(two.id(), orig.id()); - controlCloud << IdPair(three.id(), orig.id()); - controlCloud << IdPair(four.id(), orig.id()); -- std::sort(controlCloud.begin(), controlCloud.end()); -+ qSort(controlCloud); - - ImageHistoryGraph graph1 = ImageHistoryGraph::fromInfo(three); - qDebug() << graph1; -@@ -198,7 +198,7 @@ void DImgHistoryGraphTest::testEditing() - QVERIFY(graph3.data().vertexCount() == 5); - - QList cloud = graph3.relationCloud(); -- std::sort(cloud.begin(), cloud.end()); -+ qSort(cloud); - QVERIFY(cloud == controlCloud); - - int needResolvingTag = TagsCache::instance()->getOrCreateInternalTag(InternalTagName::needResolvingHistory()); -@@ -301,7 +301,7 @@ void DImgHistoryGraphTest::testGraph() - - QList controlLeaves; - controlLeaves << 8 << 19 << 20 << 21 << 10 << 3 << 11 << 22 << 24 << 14 << 15 << 16 << 17 << 18; -- std::sort(controlLeaves.begin(), controlLeaves.end()); -+ qSort(controlLeaves); - - QList controlRoots; - controlRoots << 1; -@@ -429,11 +429,11 @@ void DImgHistoryGraphTest::testGraph() - } - - QList leaves = mapList(graph.data().leaves(), vertexToId); -- std::sort(leaves.begin(), leaves.end()); -+ qSort(leaves); - QVERIFY(leaves == controlLeaves); - - QList roots = mapList(graph.data().roots(), vertexToId); -- std::sort(roots.begin(), roots.end()); -+ qSort(roots); - QVERIFY(roots == controlRoots); - - QList longestPath1 = mapList(graph.data().longestPathTouching(idToVertex.value(18)), vertexToId); -@@ -444,13 +444,13 @@ void DImgHistoryGraphTest::testGraph() - // depth-first - QList subgraphTwo = mapList(graph.data().verticesDominatedBy(idToVertex.value(2), idToVertex.value(1), - HistoryGraph::DepthFirstOrder), vertexToId); -- std::sort(subgraphTwo.begin(), subgraphTwo.end()); -+ qSort(subgraphTwo); - QVERIFY(subgraphTwo == controlSubgraphTwo); - - // breadth-first - QList subgraphFour = mapList(graph.data().verticesDominatedBy(idToVertex.value(4), idToVertex.value(1)), vertexToId); - QVERIFY(subgraphFour.indexOf(22) > subgraphFour.indexOf(13)); -- std::sort(subgraphFour.begin(), subgraphFour.end()); -+ qSort(subgraphFour); - QVERIFY(subgraphFour == controlSubgraphFour); - - // depth-first -@@ -461,10 +461,10 @@ void DImgHistoryGraphTest::testGraph() - QVERIFY(subgraphTwoSorted == controlSubgraphTwoSorted); - - QList rootsOfEighteen = mapList(graph.data().rootsOf(idToVertex.value(18)), vertexToId); -- std::sort(rootsOfEighteen.begin(), rootsOfEighteen.end()); -+ qSort(rootsOfEighteen); - QVERIFY(rootsOfEighteen == controlRootsOfEighteen); - QList leavesFromTwo = mapList(graph.data().leavesFrom(idToVertex.value(2)), vertexToId); -- std::sort(leavesFromTwo.begin(), leavesFromTwo.end()); -+ qSort(leavesFromTwo); - QVERIFY(leavesFromTwo == controlLeavesFromTwo); - } - -diff --git a/core/utilities/advancedrename/advancedrenamemanager.cpp b/core/utilities/advancedrename/advancedrenamemanager.cpp -index 1c0c207af7..9f83887f80 100644 ---- a/core/utilities/advancedrename/advancedrenamemanager.cpp -+++ b/core/utilities/advancedrename/advancedrenamemanager.cpp -@@ -331,19 +331,19 @@ void AdvancedRenameManager::initializeFileList() - { - case SortName: - { -- std::sort(tmpFiles.begin(), tmpFiles.end(), SortByNameCaseInsensitive()); -+ qSort(tmpFiles.begin(), tmpFiles.end(), SortByNameCaseInsensitive()); - break; - } - - case SortDate: - { -- std::sort(tmpFiles.begin(), tmpFiles.end(), SortByDate()); -+ qSort(tmpFiles.begin(), tmpFiles.end(), SortByDate()); - break; - } - - case SortSize: - { -- std::sort(tmpFiles.begin(), tmpFiles.end(), SortBySize()); -+ qSort(tmpFiles.begin(), tmpFiles.end(), SortBySize()); - break; - } - -diff --git a/core/utilities/geolocation/editor/correlator/track_correlator_thread.cpp b/core/utilities/geolocation/editor/correlator/track_correlator_thread.cpp -index 8dc7b7df66..a5b818b6ea 100644 ---- a/core/utilities/geolocation/editor/correlator/track_correlator_thread.cpp -+++ b/core/utilities/geolocation/editor/correlator/track_correlator_thread.cpp -@@ -50,7 +50,7 @@ TrackCorrelatorThread::~TrackCorrelatorThread() - void TrackCorrelatorThread::run() - { - // sort the items to correlate by time: -- std::sort(itemsToCorrelate.begin(), itemsToCorrelate.end(), TrackCorrelationLessThan); -+ qSort(itemsToCorrelate.begin(), itemsToCorrelate.end(), TrackCorrelationLessThan); - - // now perform the correlation - // we search all loaded gpx data files in parallel for the points with the best match -diff --git a/core/utilities/geolocation/editor/searches/searchresultmodel.cpp b/core/utilities/geolocation/editor/searches/searchresultmodel.cpp -index aea4dc0346..412488ea38 100644 ---- a/core/utilities/geolocation/editor/searches/searchresultmodel.cpp -+++ b/core/utilities/geolocation/editor/searches/searchresultmodel.cpp -@@ -315,7 +315,7 @@ void SearchResultModel::removeRowsByIndexes(const QModelIndexList& rowsList) - return; - } - -- std::sort(rowNumbers.begin(), rowNumbers.end()); -+ qSort(rowNumbers.begin(), rowNumbers.end()); - - // now delete the rows, starting with the last row: - for (int i = rowNumbers.count()-1; i >= 0; i--) -@@ -340,7 +340,7 @@ void SearchResultModel::removeRowsBySelection(const QItemSelection& selectionLis - } - - // we expect the ranges to be sorted here -- std::sort(rowRanges.begin(), rowRanges.end(), RowRangeLessThan); -+ qSort(rowRanges.begin(), rowRanges.end(), RowRangeLessThan); - - // now delete the rows, starting with the last row: - for (int i = rowRanges.count()-1; i >= 0; i--) -diff --git a/core/utilities/geolocation/geoiface/tracks/trackreader.cpp b/core/utilities/geolocation/geoiface/tracks/trackreader.cpp -index 71fef9804e..cb58917c08 100644 ---- a/core/utilities/geolocation/geoiface/tracks/trackreader.cpp -+++ b/core/utilities/geolocation/geoiface/tracks/trackreader.cpp -@@ -330,7 +330,7 @@ TrackReader::TrackReadResult TrackReader::loadTrackFile(const QUrl& url) - } - - // the correlation algorithm relies on sorted data, therefore sort now -- std::sort(parsedData.track.points.begin(), parsedData.track.points.end(), TrackManager::TrackPoint::EarlierThan); -+ qSort(parsedData.track.points.begin(), parsedData.track.points.end(), TrackManager::TrackPoint::EarlierThan); - - return parsedData; - } -diff --git a/core/utilities/importui/models/importimagemodel.cpp b/core/utilities/importui/models/importimagemodel.cpp -index 644f436a2a..ce351efa10 100644 ---- a/core/utilities/importui/models/importimagemodel.cpp -+++ b/core/utilities/importui/models/importimagemodel.cpp -@@ -926,7 +926,7 @@ QList > ImportImageModelIncrementalUpdater::toContiguousPairs(co - } - - QList indices(unsorted); -- std::sort(indices.begin(), indices.end()); -+ qSort(indices); - - QPair pair(indices.first(), indices.first()); - -diff --git a/core/utilities/maintenance/imageinfojob.cpp b/core/utilities/maintenance/imageinfojob.cpp -index d3915ceebe..8277e14368 100644 ---- a/core/utilities/maintenance/imageinfojob.cpp -+++ b/core/utilities/maintenance/imageinfojob.cpp -@@ -175,7 +175,7 @@ void ImageInfoJob::slotData(const QList& records) - } - - // Sort the itemList based on name -- std::sort(itemsList.begin(), itemsList.end(), ImageInfoList::namefileLessThan); -+ qSort(itemsList.begin(), itemsList.end(), ImageInfoList::namefileLessThan); - - emit signalItemsInfo(itemsList); - } -diff --git a/core/utilities/searchwindow/searchutilities.cpp b/core/utilities/searchwindow/searchutilities.cpp -index 3a7fe43410..622a0a73ad 100644 ---- a/core/utilities/searchwindow/searchutilities.cpp -+++ b/core/utilities/searchwindow/searchutilities.cpp -@@ -296,7 +296,7 @@ void CustomStepsDoubleSpinBox::setSuggestedValues(const QList& values) - this, SLOT(slotValueChanged(double))); - - d->values = values; -- std::sort(d->values.begin(), d->values.end()); -+ qSort(d->values); - } - - void CustomStepsDoubleSpinBox::setSuggestedInitialValue(double initialValue) -@@ -469,7 +469,7 @@ void CustomStepsIntSpinBox::setSuggestedValues(const QList& values) - this, SLOT(slotValueChanged(int))); - - d->values = values; -- std::sort(d->values.begin(), d->values.end()); -+ qSort(d->values); - } - - void CustomStepsIntSpinBox::setSuggestedInitialValue(int initialValue) -@@ -491,7 +491,7 @@ void CustomStepsIntSpinBox::setInvertStepping(bool invert) - void CustomStepsIntSpinBox::enableFractionMagic(const QString& prefix) - { - d->fractionPrefix = prefix; -- std::sort(d->values.begin(), d->values.end(), qGreater()); -+ qSort(d->values.begin(), d->values.end(), qGreater()); - } - - void CustomStepsIntSpinBox::reset() --- -2.13.6 - diff --git a/0002-Revert-replace-obsolete-qSort-function.patch b/0002-Revert-replace-obsolete-qSort-function.patch deleted file mode 100644 index 0f4f9fd..0000000 --- a/0002-Revert-replace-obsolete-qSort-function.patch +++ /dev/null @@ -1,105 +0,0 @@ -From d19d149b55c3f25c3c7f1c69c0b777acf0c83024 Mon Sep 17 00:00:00 2001 -From: Wolfgang Bauer -Date: Sun, 14 Jan 2018 01:47:45 +0100 -Subject: [PATCH] Revert "replace obsolete qSort() function" - -This reverts commit 734b9d685f458e5f4dadc61216fbf12f9dc59ca6. -It breaks compilation with GCC 4.8. ---- - facebook/fbtalker.cpp | 3 ++- - flashexport/simpleviewer.cpp | 2 +- - googleservices/gdtalker.cpp | 2 +- - googleservices/gptalker.cpp | 2 +- - piwigo/piwigotalker.cpp | 2 +- - smug/smugtalker.cpp | 2 +- - 6 files changed, 7 insertions(+), 6 deletions(-) - -diff --git a/extra/kipi-plugins/facebook/fbtalker.cpp b/extra/kipi-plugins/facebook/fbtalker.cpp -index 24d8b9723..71d704ee0 100644 ---- a/extra/kipi-plugins/facebook/fbtalker.cpp -+++ b/extra/kipi-plugins/facebook/fbtalker.cpp -@@ -43,6 +43,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -863,7 +864,7 @@ void FbTalker::parseResponseListAlbums(const QByteArray& data) - errMsg = obj[QString::fromLatin1("message")].toString(); - } - -- std::sort(albumsList.begin(), albumsList.end()); -+ qSort(albumsList.begin(), albumsList.end()); - - emit signalBusy(false); - emit signalListAlbumsDone(errCode, errorToText(errCode, errMsg), -diff --git a/extra/kipi-plugins/flashexport/simpleviewer.cpp b/extra/kipi-plugins/flashexport/simpleviewer.cpp -index 618f1b30a..b60f7fdda 100644 ---- a/extra/kipi-plugins/flashexport/simpleviewer.cpp -+++ b/extra/kipi-plugins/flashexport/simpleviewer.cpp -@@ -530,7 +530,7 @@ void SimpleViewer::processQUrlList(QList& images, QDomDocument& xmlDoc, - QUrl imagesDir = QUrl::fromLocalFile(d->tempDir->path()); - imagesDir.setPath(imagesDir.path() + QLatin1String("/images/")); - -- std::sort(images.begin(), images.end(), cmpUrl); -+ qSort(images.begin(), images.end(), cmpUrl); - - for (QList::ConstIterator it = images.constBegin(); - !d->canceled && (it != images.constEnd()) ; ++it) -diff --git a/extra/kipi-plugins/googleservices/gdtalker.cpp b/extra/kipi-plugins/googleservices/gdtalker.cpp -index b7ba5295f..d719089f1 100644 ---- a/extra/kipi-plugins/googleservices/gdtalker.cpp -+++ b/extra/kipi-plugins/googleservices/gdtalker.cpp -@@ -355,7 +355,7 @@ void GDTalker::parseResponseListFolders(const QByteArray& data) - albumList.append(fps); - } - -- std::sort(albumList.begin(), albumList.end(), gdriveLessThan); -+ qSort(albumList.begin(), albumList.end(), gdriveLessThan); - emit signalBusy(false); - emit signalListAlbumsDone(1,QString(),albumList); - } -diff --git a/extra/kipi-plugins/googleservices/gptalker.cpp b/extra/kipi-plugins/googleservices/gptalker.cpp -index fe839a7d2..264acfa79 100644 ---- a/extra/kipi-plugins/googleservices/gptalker.cpp -+++ b/extra/kipi-plugins/googleservices/gptalker.cpp -@@ -745,7 +745,7 @@ void GPTalker::parseResponseListAlbums(const QByteArray& data) - node = node.nextSibling(); - } - -- std::sort(albumList.begin(), albumList.end(), gphotoLessThan); -+ qSort(albumList.begin(), albumList.end(), gphotoLessThan); - emit signalListAlbumsDone(1, QString::fromLatin1(""), albumList); - } - -diff --git a/extra/kipi-plugins/piwigo/piwigotalker.cpp b/extra/kipi-plugins/piwigo/piwigotalker.cpp -index 3fbfbec66..81c8368e0 100644 ---- a/extra/kipi-plugins/piwigo/piwigotalker.cpp -+++ b/extra/kipi-plugins/piwigo/piwigotalker.cpp -@@ -569,7 +569,7 @@ void PiwigoTalker::parseResponseListAlbums(const QByteArray& data) - } - - // We need parent albums to come first for rest of the code to work -- std::sort(albumList.begin(), albumList.end()); -+ qSort(albumList); - - emit signalAlbums(albumList); - } -diff --git a/extra/kipi-plugins/smug/smugtalker.cpp b/extra/kipi-plugins/smug/smugtalker.cpp -index 873a1f061..9349be00f 100644 ---- a/extra/kipi-plugins/smug/smugtalker.cpp -+++ b/extra/kipi-plugins/smug/smugtalker.cpp -@@ -846,7 +846,7 @@ void SmugTalker::parseResponseListAlbums(const QByteArray& data) - if (errCode == 15) // 15: empty list - errCode = 0; - -- std::sort(albumsList.begin(), albumsList.end(), SmugAlbum::lessThan); -+ qSort(albumsList.begin(), albumsList.end(), SmugAlbum::lessThan); - - emit signalBusy(false); - emit signalListAlbumsDone(errCode, errorToText(errCode, errMsg), albumsList); --- -2.13.6 - diff --git a/Add-QtWebEngine-support.patch b/Add-QtWebEngine-support.patch deleted file mode 100644 index b57a7b8..0000000 --- a/Add-QtWebEngine-support.patch +++ /dev/null @@ -1,1727 +0,0 @@ -From 101b1170ef8484df732ccbff235dc28fc91f1a26 Mon Sep 17 00:00:00 2001 -From: Maik Qualmann -Date: Wed, 28 Mar 2018 22:13:01 +0200 -Subject: add possibility to use QWebEngine instead of QWebKit with compile - flag CCBUGS: 363859 - ---- - bootstrap.linux | 1 + - bootstrap.macports | 1 + - core/CMakeLists.txt | 10 +- - core/app/CMakeLists.txt | 34 +- - core/app/utils/digikam_config.h.cmake.in | 3 + - core/app/views/stackedview.cpp | 11 +- - core/app/views/welcomepageview.cpp | 8 +- - core/app/views/welcomepageview_qwebengine.cpp | 222 +++++++++++ - core/app/views/welcomepageview_qwebengine.h | 87 +++++ - .../geolocation/geoiface/backend-googlemaps-js.js | 12 +- - core/libs/dialogs/CMakeLists.txt | 20 +- - core/libs/dialogs/webbrowserdlg_qwebengine.cpp | 228 ++++++++++++ - core/libs/dialogs/webbrowserdlg_qwebengine.h | 76 ++++ - core/libs/widgets/mainview/dxmlguiwindow.cpp | 7 +- - .../htmlgallery/wizard/htmlfinalpage.cpp | 8 +- - core/utilities/geolocation/geoiface/CMakeLists.txt | 20 +- - .../geoiface/backends/backendgooglemaps.cpp | 29 +- - .../geolocation/geoiface/widgets/htmlwidget.cpp | 2 +- - .../geolocation/geoiface/widgets/htmlwidget.h | 2 +- - .../geoiface/widgets/htmlwidget_qwebengine.cpp | 409 +++++++++++++++++++++ - .../geoiface/widgets/htmlwidget_qwebengine.h | 119 ++++++ - 21 files changed, 1278 insertions(+), 31 deletions(-) - create mode 100644 core/app/views/welcomepageview_qwebengine.cpp - create mode 100644 core/app/views/welcomepageview_qwebengine.h - create mode 100644 core/libs/dialogs/webbrowserdlg_qwebengine.cpp - create mode 100644 core/libs/dialogs/webbrowserdlg_qwebengine.h - create mode 100644 core/utilities/geolocation/geoiface/widgets/htmlwidget_qwebengine.cpp - create mode 100644 core/utilities/geolocation/geoiface/widgets/htmlwidget_qwebengine.h - -diff --git a/bootstrap.linux b/bootstrap.linux -index a877a31..5ecf3b8 100755 ---- a/bootstrap.linux -+++ b/bootstrap.linux -@@ -91,6 +91,7 @@ $CMAKE_BINARY -G "$MAKEFILES_TYPE" . \ - -DENABLE_MEDIAPLAYER=ON \ - -DENABLE_DBUS=ON \ - -DENABLE_APPSTYLES=ON \ -+ -DENABLE_QWEBENGINE=OFF \ - -Wno-dev \ - $SOURCEDIR && echo "$MESSAGE" - -diff --git a/bootstrap.macports b/bootstrap.macports -index 41a331a..562552f 100755 ---- a/bootstrap.macports -+++ b/bootstrap.macports -@@ -85,6 +85,7 @@ cmake -G "$MAKEFILES_TYPE" . \ - -DENABLE_KIO=OFF \ - -DENABLE_LEGACY=OFF \ - -DENABLE_APPSTYLES=OFF \ -+ -DENABLE_QWEBENGINE=OFF \ - -DAPPLE_SUPPRESS_X11_WARNING=ON \ - -DCMAKE_COLOR_MAKEFILE=ON \ - -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \ -diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt -index 856954c..8f7163b 100644 ---- a/core/CMakeLists.txt -+++ b/core/CMakeLists.txt -@@ -104,6 +104,7 @@ option(ENABLE_AKONADICONTACTSUPPORT "Build digiKam with KDE Mail Contacts suppor - option(ENABLE_MEDIAPLAYER "Build digiKam with Media Player support (default=OFF)" OFF) - option(ENABLE_DBUS "Build digiKam with DBUS support (default=ON)" ON) - option(ENABLE_APPSTYLES "Build digiKam with support for changing the widget application style (default=OFF)" OFF) -+option(ENABLE_QWEBENGINE "Build digiKam with QWebEngine instead of QWebKit (default=OFF)" OFF) - - # Mysql support options (experimental): - option(ENABLE_MYSQLSUPPORT "Build digiKam with MySQL dabatase support (default=ON)" ON) -@@ -124,10 +125,15 @@ find_package(Qt5 ${QT_MIN_VERSION} - Sql - Xml - PrintSupport -- WebKitWidgets - Network - ) - -+if(ENABLE_QWEBENGINE) -+ find_package(Qt5 ${QT_MIN_VERSION} NO_MODULE COMPONENTS WebEngineWidgets) -+else() -+ find_package(Qt5 ${QT_MIN_VERSION} NO_MODULE COMPONENTS WebKitWidgets) -+endif() -+ - find_package(Qt5 ${QT_MIN_VERSION} - OPTIONAL_COMPONENTS - DBus -@@ -415,6 +421,7 @@ MACRO_BOOL_TO_01(ENABLE_INTERNALMYSQL HAVE_INTERNALMYSQL) - MACRO_BOOL_TO_01(ENABLE_MEDIAPLAYER HAVE_MEDIAPLAYER) - MACRO_BOOL_TO_01(ENABLE_DBUS HAVE_DBUS) - MACRO_BOOL_TO_01(ENABLE_APPSTYLES HAVE_APPSTYLE_SUPPORT) -+MACRO_BOOL_TO_01(ENABLE_QWEBENGINE HAVE_QWEBENGINE) - - # Whether to use Qt's scaling to downscale previews. Under MacOSX, Qt - # can make use of the higher physical resolution of Retina -@@ -440,6 +447,7 @@ PRINT_COMPONENT_COMPILE_STATUS("MySQL Database Support" ENABLE_MYSQLSUPPORT) - PRINT_COMPONENT_COMPILE_STATUS("MySQL Internal Support" ENABLE_INTERNALMYSQL) - PRINT_COMPONENT_COMPILE_STATUS("DBUS Support" ENABLE_DBUS) - PRINT_COMPONENT_COMPILE_STATUS("App. Style Support" ENABLE_APPSTYLES) -+PRINT_COMPONENT_COMPILE_STATUS("QWebEngine Support" ENABLE_QWEBENGINE) - - # ============================================================================== - -diff --git a/core/app/CMakeLists.txt b/core/app/CMakeLists.txt -index 23571bd..9b9be3c 100644 ---- a/core/app/CMakeLists.txt -+++ b/core/app/CMakeLists.txt -@@ -93,7 +93,6 @@ endif() - endif() - - include_directories($ -- $ - $ - $ - $ -@@ -107,6 +106,12 @@ include_directories($ - $) - -+if(ENABLE_QWEBENGINE) -+ include_directories($) -+else() -+ include_directories($) -+endif() -+ - if(KF5KIO_FOUND) - include_directories($) - endif() -@@ -140,7 +145,6 @@ target_link_libraries(digikamcore - Qt5::Xml - Qt5::Widgets - Qt5::Sql -- Qt5::WebKitWidgets - Qt5::PrintSupport - Qt5::Concurrent - -@@ -166,6 +170,12 @@ target_link_libraries(digikamcore - libraw - ) - -+if(ENABLE_QWEBENGINE) -+ target_link_libraries(digikamcore PUBLIC Qt5::WebEngineWidgets) -+else() -+ target_link_libraries(digikamcore PUBLIC Qt5::WebKitWidgets) -+endif() -+ - if(ENABLE_DBUS) - target_link_libraries(digikamcore PUBLIC Qt5::DBus) - endif() -@@ -344,7 +354,6 @@ set(libdigikamgui_SRCS - - views/imagepreviewviewitem.cpp - views/imagepreviewview.cpp -- views/welcomepageview.cpp - views/leftsidebarwidgets.cpp - views/digikamview.cpp - views/trashview.cpp -@@ -353,6 +362,18 @@ set(libdigikamgui_SRCS - ${digikamadaptor_SRCS} - ) - -+if(ENABLE_QWEBENGINE) -+ set(libdigikamgui_SRCS -+ ${libdigikamgui_SRCS} -+ views/welcomepageview_qwebengine.cpp -+ ) -+else() -+ set(libdigikamgui_SRCS -+ ${libdigikamgui_SRCS} -+ views/welcomepageview.cpp -+ ) -+endif() -+ - if(${Marble_FOUND}) - set(libdigikamgui_SRCS - ${libdigikamgui_SRCS} -@@ -432,7 +453,6 @@ target_link_libraries(digikamgui - Qt5::Gui - Qt5::Widgets - Qt5::Sql -- Qt5::WebKitWidgets - Qt5::PrintSupport - - KF5::Solid -@@ -443,6 +463,12 @@ target_link_libraries(digikamgui - ${OpenCV_LIBRARIES} - ) - -+if(ENABLE_QWEBENGINE) -+ target_link_libraries(digikamgui PUBLIC Qt5::WebEngineWidgets) -+else() -+ target_link_libraries(digikamgui PUBLIC Qt5::WebKitWidgets) -+endif() -+ - if(ENABLE_DBUS) - target_link_libraries(digikamgui PUBLIC Qt5::DBus) - endif() -diff --git a/core/app/utils/digikam_config.h.cmake.in b/core/app/utils/digikam_config.h.cmake.in -index a4df21a..27046df 100644 ---- a/core/app/utils/digikam_config.h.cmake.in -+++ b/core/app/utils/digikam_config.h.cmake.in -@@ -108,6 +108,9 @@ - /* Define to 1 if changing application styles is supported */ - #cmakedefine HAVE_APPSTYLE_SUPPORT 1 - -+/* Define to 1 if system use QWebEngine instead of QWebKit */ -+#cmakedefine HAVE_QWEBENGINE 1 -+ - #define LIBEXEC_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/${LIBEXEC_INSTALL_DIR}" - - /* -diff --git a/core/app/views/stackedview.cpp b/core/app/views/stackedview.cpp -index 554156a..4295b48 100644 ---- a/core/app/views/stackedview.cpp -+++ b/core/app/views/stackedview.cpp -@@ -48,18 +48,23 @@ - #include "imagethumbnailbar.h" - #include "loadingcacheinterface.h" - #include "previewlayout.h" --#include "welcomepageview.h" - #include "thumbbardock.h" - #include "tableview.h" - #include "trashview.h" - #include "dimg.h" - -+#ifdef HAVE_QWEBENGINE -+# include "welcomepageview_qwebengine.h" -+#else -+# include "welcomepageview.h" -+#endif -+ - #ifdef HAVE_MEDIAPLAYER --#include "mediaplayerview.h" -+# include "mediaplayerview.h" - #endif //HAVE_MEDIAPLAYER - - #ifdef HAVE_MARBLE --#include "mapwidgetview.h" -+# include "mapwidgetview.h" - #endif // HAVE_MARBLE - - namespace Digikam -diff --git a/core/app/views/welcomepageview.cpp b/core/app/views/welcomepageview.cpp -index fee2172..a54bba6 100644 ---- a/core/app/views/welcomepageview.cpp -+++ b/core/app/views/welcomepageview.cpp -@@ -41,11 +41,17 @@ - - // Local includes - -+#include "digikam_config.h" - #include "digikam_debug.h" - #include "digikam_version.h" - #include "daboutdata.h" - #include "thememanager.h" --#include "webbrowserdlg.h" -+ -+#ifdef HAVE_QWEBENGINE -+# include "webbrowserdlg_qwebengine.h" -+#else -+# include "webbrowserdlg.h" -+#endif - - namespace Digikam - { -diff --git a/core/app/views/welcomepageview_qwebengine.cpp b/core/app/views/welcomepageview_qwebengine.cpp -new file mode 100644 -index 0000000..ea964f8 ---- /dev/null -+++ b/core/app/views/welcomepageview_qwebengine.cpp -@@ -0,0 +1,222 @@ -+/* ============================================================ -+ * -+ * This file is a part of digiKam project -+ * http://www.digikam.org -+ * -+ * Date : 2006-12-20 -+ * Description : a widget to display a welcome page -+ * on root album. -+ * -+ * Copyright (C) 2006-2018 by Gilles Caulier -+ * Copyright (C) 2009-2011 by Andi Clemens -+ * Copyright (C) 2015 by Mohamed Anwer -+ * -+ * This program is free software; you can redistribute it -+ * and/or modify it under the terms of the GNU General -+ * Public License as published by the Free Software Foundation; -+ * either version 2, or (at your option) -+ * any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * ============================================================ */ -+ -+#include "welcomepageview_qwebengine.h" -+ -+// Qt includes -+ -+#include -+#include -+#include -+#include -+#include -+#include -+ -+// KDE includes -+ -+#include -+ -+// Local includes -+ -+#include "digikam_debug.h" -+#include "digikam_version.h" -+#include "daboutdata.h" -+#include "thememanager.h" -+#include "webbrowserdlg.h" -+ -+namespace Digikam -+{ -+ -+WelcomePageViewPage::WelcomePageViewPage(QObject* const parent) -+ : QWebEnginePage(parent) -+{ -+} -+ -+WelcomePageViewPage::~WelcomePageViewPage() -+{ -+} -+ -+bool WelcomePageViewPage::acceptNavigationRequest(const QUrl& url, QWebEnginePage::NavigationType type, bool) -+{ -+ if (type == QWebEnginePage::NavigationTypeLinkClicked) -+ { -+ emit linkClicked(url); -+ return false; -+ } -+ -+ return true; -+} -+ -+// ---------------------------------------------------------------------------- -+ -+WelcomePageView::WelcomePageView(QWidget* const parent) -+ : QWebEngineView(parent) -+{ -+ setFocusPolicy(Qt::WheelFocus); -+ setContextMenuPolicy(Qt::NoContextMenu); -+ -+ WelcomePageViewPage* const wpage = new WelcomePageViewPage(this); -+ setPage(wpage); -+ -+ // ------------------------------------------------------------ -+ -+ connect(wpage, SIGNAL(linkClicked(const QUrl&)), -+ this, SLOT(slotUrlOpen(const QUrl&))); -+ -+ connect(ThemeManager::instance(), SIGNAL(signalThemeChanged()), -+ this, SLOT(slotThemeChanged())); -+ -+ QTimer::singleShot(0, this, SLOT(slotThemeChanged())); -+} -+ -+WelcomePageView::~WelcomePageView() -+{ -+} -+ -+void WelcomePageView::slotUrlOpen(const QUrl& url) -+{ -+ WebBrowserDlg* const browser = new WebBrowserDlg(url, this); -+ browser->show(); -+} -+ -+QStringList WelcomePageView::featuresTabContent() const -+{ -+ QStringList newFeatures; -+ newFeatures << i18n("Port to Qt5 and KF5;"); -+ newFeatures << i18n("Replacing digiKam KIOSlaves by a multi-threaded interface to query the database;"); -+ newFeatures << i18n("Replacing Qt5::Multimedia dependency by QtAV framework to handle video files;"); -+ newFeatures << i18n("Add embedded trash support for each collection instead desktop trash;"); -+ newFeatures << i18n("Thumbs and preview video support is now delegate to QT5Multimedia framework;"); -+ newFeatures << i18n("Mysql internal server is now configurable as Sqlite to store database files at a customized place;"); -+ newFeatures << i18n("Mysql internal/remote server is now configurable with first run assistant;"); -+ newFeatures << i18n("Add a new garbage collector tool to cleanup database;"); -+ newFeatures << i18n("Add a new batch queue manager tool to convert RAW files to DNG;"); -+ newFeatures << i18n("Add a new tool to export contents in html gallery;"); -+ newFeatures << i18n("Add a new tool to export contents as a video slideshow;"); -+ newFeatures << i18n("Add a new tool to export contents by email;"); -+ newFeatures << i18n("Add a new batch queue manager tool to adjust time and date metadata;"); -+ newFeatures << i18n("Add a new batch queue manager tool to detect and fix red-eyes automatically;"); -+ newFeatures << i18n("Add a new option in editor and light table to import images from a digital scanner;"); -+ newFeatures << i18n("Add a new option in editor and light table to edit metadata;"); -+ newFeatures << i18n("Add a new option in editor and light table to edit geolocation;"); -+ newFeatures << i18n("Add a new option in editor and light table to run presentation tool;"); -+ newFeatures << i18n("Add a new editor tool to detect and fix red-eyes automatically;"); -+ newFeatures << i18n("Add a new editor tool to perform color change based on Lut3D;"); -+ newFeatures << i18n("Add a new tool in camera import interface to convert RAW files to DNG;"); -+ newFeatures << i18n("Add a new tool to export items on local network through UPNP/DLNA;"); -+ newFeatures << i18n("Consolidation of Mysql database backend;"); -+ newFeatures << i18n("Improved startup time with differed scan for new items stage."); -+ newFeatures << i18n("Presentation and Slideshow tools now support video."); -+ // Add new features here... -+ newFeatures << i18n("...and much more."); -+ -+ QString featureItems; -+ -+ for (int i = 0 ; i < newFeatures.count() ; ++i) -+ { -+ featureItems += i18n("
  • %1
  • \n", newFeatures.at(i)); -+ } -+ -+ QString tabHeader = i18n("New Features"); -+ QString tabContent = -+ i18n("

    %1

      %2
    ", -+ i18n("Some of the new features in this release of digiKam include (compared to digiKam 4.x):"), -+ featureItems -+ ); -+ -+ return QStringList() << tabHeader << tabContent; -+} -+ -+QStringList WelcomePageView::aboutTabContent() const -+{ -+ QString tabHeader = i18n("About"); -+ QString tabContent = -+ i18n("

    %1

    %2

      %3
    ", -+ i18n("digiKam is an open source photo management program designed to import, organize, enhance, search and export your digital images to and from your computer."), -+ i18n("Currently, you are in the Album view mode of digiKam. Albums are the places where your files are stored, and are identical to the folders on your hard disk."), -+ i18n("
  • %1
  • %2
  • ", -+ i18n("digiKam has many powerful features which are described in the documentation"), -+ i18n("The digiKam homepage provides information about new versions of digiKam.")) -+ ); -+ return QStringList() << tabHeader << tabContent; -+} -+ -+QByteArray WelcomePageView::fileToString(const QString& aFileName) const -+{ -+ QByteArray result; -+ QFileInfo info(aFileName); -+ unsigned int readLen; -+ unsigned int len = info.size(); -+ QFile file(aFileName); -+ -+ if (aFileName.isEmpty() || len == 0 || -+ !info.exists() || info.isDir() || !info.isReadable() || -+ !file.open(QIODevice::Unbuffered|QIODevice::ReadOnly)) -+ { -+ return QByteArray(); -+ } -+ -+ result.resize(len + 2); -+ readLen = file.read(result.data(), len); -+ -+ if (result[len-1] != '\n') -+ { -+ result[len++] = '\n'; -+ ++readLen; -+ } -+ -+ result[len] = '\0'; -+ -+ if (readLen < len) -+ { -+ return QByteArray(); -+ } -+ -+ return result; -+} -+ -+void WelcomePageView::slotThemeChanged() -+{ -+ QString appTitle = i18n("digiKam"); -+ QString slogan = DAboutData::digiKamSlogan(); -+ QString locationHtml = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QLatin1String("digikam/about/main.html")); -+ -+ QString content = QString::fromUtf8(fileToString(locationHtml)); -+ content = content.arg(appTitle) -+ .arg(slogan) -+ .arg(i18n("Welcome to digiKam %1", QLatin1String(digikam_version))) -+ .arg(featuresTabContent()[0]) -+ .arg(aboutTabContent()[0]) -+ .arg(i18n("Background Image Credits")) -+ .arg(featuresTabContent()[1]) -+ .arg(aboutTabContent()[1]); -+ -+ //qCDebug(DIGIKAM_GENERAL_LOG) << content; -+ -+ setHtml(content, QUrl::fromLocalFile(locationHtml)); -+} -+ -+} // namespace Digikam -diff --git a/core/app/views/welcomepageview_qwebengine.h b/core/app/views/welcomepageview_qwebengine.h -new file mode 100644 -index 0000000..97582e2 ---- /dev/null -+++ b/core/app/views/welcomepageview_qwebengine.h -@@ -0,0 +1,87 @@ -+/* ============================================================ -+ * -+ * This file is a part of digiKam project -+ * http://www.digikam.org -+ * -+ * Date : 2006-12-20 -+ * Description : a widget to display a welcome page -+ * on root album. -+ * -+ * Copyright (C) 2006-2018 by Gilles Caulier -+ * Copyright (C) 2009-2011 by Andi Clemens -+ * Copyright (C) 2015 by Mohamed Anwer -+ * -+ * This program is free software; you can redistribute it -+ * and/or modify it under the terms of the GNU General -+ * Public License as published by the Free Software Foundation; -+ * either version 2, or (at your option) -+ * any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * ============================================================ */ -+ -+#ifndef WELCOME_PAGE_VIEW_QWEBENGINE_H -+#define WELCOME_PAGE_VIEW_QWEBENGINE_H -+ -+// Qt includes -+ -+#include -+#include -+#include -+#include -+#include -+ -+// Local includes -+ -+#include "digikam_export.h" -+ -+namespace Digikam -+{ -+ -+class WelcomePageViewPage : public QWebEnginePage -+{ -+ Q_OBJECT -+ -+public: -+ -+ explicit WelcomePageViewPage(QObject* const parent = 0); -+ virtual ~WelcomePageViewPage(); -+ -+ bool acceptNavigationRequest(const QUrl&, QWebEnginePage::NavigationType, bool); -+ -+Q_SIGNALS: -+ -+ void linkClicked(const QUrl&); -+ -+}; -+ -+// ------------------------------------------------------------------- -+ -+class WelcomePageView : public QWebEngineView -+{ -+ Q_OBJECT -+ -+public: -+ -+ explicit WelcomePageView(QWidget* const parent); -+ ~WelcomePageView(); -+ -+private: -+ -+ QByteArray fileToString(const QString& aFileName) const; -+ QStringList featuresTabContent() const; -+ QStringList aboutTabContent() const; -+ -+private Q_SLOTS: -+ -+ void slotUrlOpen(const QUrl&); -+ void slotThemeChanged(); -+}; -+ -+} // namespace Digikam -+ -+#endif // WELCOME_PAGE_VIEW_QWEBENGINE_H -diff --git a/core/data/geolocation/geoiface/backend-googlemaps-js.js b/core/data/geolocation/geoiface/backend-googlemaps-js.js -index 456586a..12d9151 100644 ---- a/core/data/geolocation/geoiface/backend-googlemaps-js.js -+++ b/core/data/geolocation/geoiface/backend-googlemaps-js.js -@@ -47,10 +47,15 @@ var projectionHelper = null; - - function kgeomapPostEventString(eventString) - { -+ // We keep these 2 lines for backwards compatibility with QWebView - eventBuffer.push(eventString); - window.status = '(event)'; -+ -+ // We use this when porting to QWebEngineView -+ console.log('(event)'+eventString); - } - -+// We keep this function for backwards compatibility with QWebView - function kgeomapReadEventStrings() - { - var eventBufferString = eventBuffer.join('|'); -@@ -759,9 +764,10 @@ function kgeomapInitialize() - // google.maps.event.addListener(map, 'bounds_changed', function() { - // kgeomapPostEventString('MB'); - // }); -- // google.maps.event.addListener(map, 'zoom_changed', function() { -- // kgeomapPostEventString('ZC'); -- // }); -+ google.maps.event.addListener(map, 'zoom_changed', function() -+ { -+ kgeomapPostEventString('ZC'); -+ }); - google.maps.event.addListener(map, 'idle', function() - { - kgeomapPostEventString('id'); -diff --git a/core/libs/dialogs/CMakeLists.txt b/core/libs/dialogs/CMakeLists.txt -index 5bba683..4b8c443 100644 ---- a/core/libs/dialogs/CMakeLists.txt -+++ b/core/libs/dialogs/CMakeLists.txt -@@ -25,9 +25,20 @@ set(libdialogs_SRCS - dconfigdlgwidgets.cpp - dmessagebox.cpp - dsplashscreen.cpp -- webbrowserdlg.cpp - ) - -+if(ENABLE_QWEBENGINE) -+ set(libdialogs_SRCS -+ ${libdialogs_SRCS} -+ webbrowserdlg_qwebengine.cpp -+ ) -+else() -+ set(libdialogs_SRCS -+ ${libdialogs_SRCS} -+ webbrowserdlg.cpp -+ ) -+endif() -+ - set(libdeletedialog_SRCS - deletedialog.cpp - ) -@@ -41,13 +52,18 @@ include_directories( - $ - $ - $ -- $ - - $ - $ - $ - ) - -+if(ENABLE_QWEBENGINE) -+ include_directories($) -+else() -+ include_directories($) -+endif() -+ - #used by digikamcore - add_library(digikamdialogscore_src OBJECT ${libdialogs_SRCS}) - -diff --git a/core/libs/dialogs/webbrowserdlg_qwebengine.cpp b/core/libs/dialogs/webbrowserdlg_qwebengine.cpp -new file mode 100644 -index 0000000..f1fc612 ---- /dev/null -+++ b/core/libs/dialogs/webbrowserdlg_qwebengine.cpp -@@ -0,0 +1,228 @@ -+/* ============================================================ -+ * -+ * This file is a part of digiKam project -+ * http://www.digikam.org -+ * -+ * Date : 2017-06-21 -+ * Description : a simple web browser dialog based on Qt WebEngine. -+ * -+ * Copyright (C) 2017-2018 by Gilles Caulier -+ * -+ * This program is free software; you can redistribute it -+ * and/or modify it under the terms of the GNU General -+ * Public License as published by the Free Software Foundation; -+ * either version 2, or (at your option) -+ * any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * ============================================================ */ -+ -+#include "webbrowserdlg_qwebengine.h" -+ -+// Qt includes -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+// KDE includes -+ -+#include -+#include -+ -+// Local includes -+ -+#include "statusprogressbar.h" -+#include "searchtextbar.h" -+#include "dxmlguiwindow.h" -+ -+namespace Digikam -+{ -+ -+class WebBrowserDlg::Private -+{ -+public: -+ -+ Private() -+ { -+ browser = 0; -+ toolbar = 0; -+ progressbar = 0; -+ searchbar = 0; -+ } -+ -+public: -+ -+ QUrl home; -+ QWebEngineView* browser; -+ QToolBar* toolbar; -+ StatusProgressBar* progressbar; -+ SearchTextBar* searchbar; -+}; -+ -+WebBrowserDlg::WebBrowserDlg(const QUrl& url, QWidget* const parent) -+ : QDialog(parent), -+ d(new Private) -+{ -+ setModal(false); -+ d->home = url; -+ d->browser = new QWebEngineView(this); -+ -+ // -------------------------- -+ -+ d->toolbar = new QToolBar(this); -+ d->toolbar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); -+ d->toolbar->addAction(d->browser->pageAction(QWebEnginePage::Back)); -+ d->toolbar->addAction(d->browser->pageAction(QWebEnginePage::Forward)); -+ d->toolbar->addAction(d->browser->pageAction(QWebEnginePage::Reload)); -+ d->toolbar->addAction(d->browser->pageAction(QWebEnginePage::Stop)); -+ -+ QAction* const gohome = new QAction(QIcon::fromTheme(QLatin1String("go-home")), -+ i18n("Home"), this); -+ gohome->setToolTip(i18n("Go back to Home page")); -+ d->toolbar->addAction(gohome); -+ -+ QAction* const deskweb = new QAction(QIcon::fromTheme(QLatin1String("internet-web-browser")), -+ i18n("Desktop Browser"), this); -+ deskweb->setToolTip(i18n("Open Home page with default desktop Web browser")); -+ d->toolbar->addAction(deskweb); -+ -+ // -------------------------- -+ -+ d->searchbar = new SearchTextBar(this, QLatin1String("WebBrowserDlgSearchBar")); -+ d->searchbar->setHighlightOnResult(true); -+ -+ d->progressbar = new StatusProgressBar(this); -+ d->progressbar->setProgressTotalSteps(100); -+ d->progressbar->setAlignment(Qt::AlignLeft); -+ d->progressbar->setNotify(false); -+ -+ // ---------------------- -+ -+ QGridLayout* const grid = new QGridLayout(this); -+ grid->setSpacing(QApplication::style()->pixelMetric(QStyle::PM_DefaultLayoutSpacing)); -+ grid->addWidget(d->toolbar, 0, 0, 1, 1); -+ grid->addWidget(d->searchbar, 0, 2, 1, 1); -+ grid->addWidget(d->browser, 1, 0, 1, 3); -+ grid->addWidget(d->progressbar, 2, 0, 1, 3); -+ grid->setColumnStretch(1, 10); -+ grid->setRowStretch(1, 10); -+ setLayout(grid); -+ -+ // ---------------------- -+/* -+#if QT_VERSION >= 0x050700 -+ connect(d->browser, SIGNAL(iconChanged(const QIcon&)), -+ this, SLOT(slotIconChanged(const QIcon&))); -+#endif -+*/ -+ connect(d->browser, SIGNAL(titleChanged(const QString&)), -+ this, SLOT(slotTitleChanged(const QString&))); -+ -+ connect(d->browser, SIGNAL(urlChanged(const QUrl&)), -+ this, SLOT(slotUrlChanged(const QUrl&))); -+ -+ connect(d->browser, SIGNAL(loadStarted()), -+ this, SLOT(slotLoadingStarted())); -+ -+ connect(d->browser, SIGNAL(loadFinished(bool)), -+ this, SLOT(slotLoadingFinished(bool))); -+ -+ connect(d->searchbar, SIGNAL(signalSearchTextSettings(const SearchTextSettings&)), -+ this, SLOT(slotSearchTextChanged(const SearchTextSettings&))); -+ -+ connect(d->browser, SIGNAL(loadProgress(int)), -+ d->progressbar, SLOT(setProgressValue(int))); -+ -+ connect(gohome, SIGNAL(triggered()), -+ this, SLOT(slotGoHome())); -+ -+ connect(deskweb, SIGNAL(triggered()), -+ this, SLOT(slotDesktopWebBrowser())); -+ -+ // ---------------------- -+ -+ KConfigGroup group = KSharedConfig::openConfig()->group("WebBrowserDlg"); -+ -+ winId(); -+ windowHandle()->resize(800, 600); -+ DXmlGuiWindow::restoreWindowSize(windowHandle(), group); -+ resize(windowHandle()->size()); -+ -+ slotGoHome(); -+} -+ -+WebBrowserDlg::~WebBrowserDlg() -+{ -+ delete d; -+} -+ -+void WebBrowserDlg::closeEvent(QCloseEvent* e) -+{ -+ KConfigGroup group = KSharedConfig::openConfig()->group(QLatin1String("WebBrowserDlg")); -+ DXmlGuiWindow::saveWindowSize(windowHandle(), group); -+ -+ e->accept(); -+} -+ -+void WebBrowserDlg::slotUrlChanged(const QUrl& url) -+{ -+ d->progressbar->setText(url.toString()); -+} -+ -+void WebBrowserDlg::slotTitleChanged(const QString& title) -+{ -+ setWindowTitle(title); -+} -+ -+void WebBrowserDlg::slotIconChanged(const QIcon& icon) -+{ -+ setWindowIcon(icon); -+} -+ -+void WebBrowserDlg::slotLoadingStarted() -+{ -+ d->progressbar->setProgressBarMode(StatusProgressBar::ProgressBarMode); -+} -+ -+void WebBrowserDlg::slotLoadingFinished(bool b) -+{ -+ QString curUrl = d->browser->url().toString(); -+ -+ d->progressbar->setProgressBarMode(StatusProgressBar::TextMode, curUrl); -+ -+ if (!b) -+ { -+ d->progressbar->setText(i18n("Cannot load page %1", curUrl)); -+ } -+} -+ -+void WebBrowserDlg::slotSearchTextChanged(const SearchTextSettings& settings) -+{ -+ d->browser->findText(settings.text, -+ (settings.caseSensitive == Qt::CaseSensitive) ? QWebEnginePage::FindCaseSensitively -+ : QWebEnginePage::FindFlags(), -+ [this](bool found) { d->searchbar->slotSearchResult(found); }); -+} -+ -+void WebBrowserDlg::slotGoHome() -+{ -+ d->browser->setUrl(d->home); -+} -+ -+void WebBrowserDlg::slotDesktopWebBrowser() -+{ -+ QDesktopServices::openUrl(d->home); -+} -+ -+} // namespace Digikam -diff --git a/core/libs/dialogs/webbrowserdlg_qwebengine.h b/core/libs/dialogs/webbrowserdlg_qwebengine.h -new file mode 100644 -index 0000000..30c15bf ---- /dev/null -+++ b/core/libs/dialogs/webbrowserdlg_qwebengine.h -@@ -0,0 +1,76 @@ -+/* ============================================================ -+ * -+ * This file is a part of digiKam project -+ * http://www.digikam.org -+ * -+ * Date : 2017-06-21 -+ * Description : a simple web browser dialog based on Qt WebEngine. -+ * -+ * Copyright (C) 2017-2018 by Gilles Caulier -+ * -+ * This program is free software; you can redistribute it -+ * and/or modify it under the terms of the GNU General -+ * Public License as published by the Free Software Foundation; -+ * either version 2, or (at your option) -+ * any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * ============================================================ */ -+ -+#ifndef WEB_BROWSER_DLG_QWEBENGINE_H -+#define WEB_BROWSER_DLG_QWEBENGINE_H -+ -+// Qt include -+ -+#include -+#include -+#include -+#include -+#include -+ -+// Local includes -+ -+#include "digikam_export.h" -+ -+namespace Digikam -+{ -+ -+class SearchTextSettings; -+ -+class DIGIKAM_EXPORT WebBrowserDlg : public QDialog -+{ -+ Q_OBJECT -+ -+public: -+ -+ explicit WebBrowserDlg(const QUrl& url, QWidget* const parent = 0); -+ ~WebBrowserDlg(); -+ -+private Q_SLOTS: -+ -+ void slotUrlChanged(const QUrl&); -+ void slotLoadingStarted(); -+ void slotLoadingFinished(bool); -+ void slotIconChanged(const QIcon&); -+ void slotTitleChanged(const QString&); -+ void slotSearchTextChanged(const SearchTextSettings&); -+ void slotGoHome(); -+ void slotDesktopWebBrowser(); -+ -+protected: -+ -+ void closeEvent(QCloseEvent*); -+ -+private: -+ -+ class Private; -+ Private* const d; -+}; -+ -+} // namespace Digikam -+ -+#endif // WEB_BROWSER_DLG_QWEBENGINE_H -diff --git a/core/libs/widgets/mainview/dxmlguiwindow.cpp b/core/libs/widgets/mainview/dxmlguiwindow.cpp -index 86e8c53..75274c1 100644 ---- a/core/libs/widgets/mainview/dxmlguiwindow.cpp -+++ b/core/libs/widgets/mainview/dxmlguiwindow.cpp -@@ -69,7 +69,12 @@ - #include "digikam_debug.h" - #include "digikam_globals.h" - #include "daboutdata.h" --#include "webbrowserdlg.h" -+ -+#ifdef HAVE_QWEBENGINE -+# include "webbrowserdlg_qwebengine.h" -+#else -+# include "webbrowserdlg.h" -+#endif - - namespace Digikam - { -diff --git a/core/utilities/assistants/htmlgallery/wizard/htmlfinalpage.cpp b/core/utilities/assistants/htmlgallery/wizard/htmlfinalpage.cpp -index 7c9d01c..3de55e4 100644 ---- a/core/utilities/assistants/htmlgallery/wizard/htmlfinalpage.cpp -+++ b/core/utilities/assistants/htmlgallery/wizard/htmlfinalpage.cpp -@@ -40,6 +40,7 @@ - - // Local includes - -+#include "digikam_config.h" - #include "htmlwizard.h" - #include "abstractthemeparameter.h" - #include "galleryinfo.h" -@@ -48,7 +49,12 @@ - #include "digikam_debug.h" - #include "dprogresswdg.h" - #include "dhistoryview.h" --#include "webbrowserdlg.h" -+ -+#ifdef HAVE_QWEBENGINE -+# include "webbrowserdlg_qwebengine.h" -+#else -+# include "webbrowserdlg.h" -+#endif - - namespace Digikam - { -diff --git a/core/utilities/geolocation/geoiface/CMakeLists.txt b/core/utilities/geolocation/geoiface/CMakeLists.txt -index 18fec7b..23c52a9 100644 ---- a/core/utilities/geolocation/geoiface/CMakeLists.txt -+++ b/core/utilities/geolocation/geoiface/CMakeLists.txt -@@ -26,13 +26,23 @@ set(libgeoiface_SRCS backends/mapbackend.cpp - tiles/itemmarkertiler.cpp - tiles/tilegrouper.cpp - tiles/tileindex.cpp -- widgets/htmlwidget.cpp - widgets/mapwidget.cpp - widgets/placeholderwidget.cpp - ) - -+if(ENABLE_QWEBENGINE) -+ set(libgeoiface_SRCS -+ ${libgeoiface_SRCS} -+ widgets/htmlwidget_qwebengine.cpp -+ ) -+else() -+ set(libgeoiface_SRCS -+ ${libgeoiface_SRCS} -+ widgets/htmlwidget.cpp -+ ) -+endif() -+ - include_directories($ -- $ - $ - $ - $ -@@ -44,6 +54,12 @@ include_directories($ - ${MARBLE_INCLUDE_DIR} - ) - -+if(ENABLE_QWEBENGINE) -+ include_directories($) -+else() -+ include_directories($) -+endif() -+ - # Marble translations need explicit loading - ecm_create_qm_loader(libgeoiface_SRCS marble_qt) - -diff --git a/core/utilities/geolocation/geoiface/backends/backendgooglemaps.cpp b/core/utilities/geolocation/geoiface/backends/backendgooglemaps.cpp -index b242192..b2897cd 100644 ---- a/core/utilities/geolocation/geoiface/backends/backendgooglemaps.cpp -+++ b/core/utilities/geolocation/geoiface/backends/backendgooglemaps.cpp -@@ -46,11 +46,17 @@ - - // Local includes - --#include "htmlwidget.h" -+#include "digikam_config.h" -+#include "digikam_debug.h" - #include "mapwidget.h" - #include "abstractmarkertiler.h" - #include "geomodelhelper.h" --#include "digikam_debug.h" -+ -+#ifdef HAVE_QWEBENGINE -+# include "htmlwidget_qwebengine.h" -+#else -+# include "htmlwidget.h" -+#endif - - namespace Digikam - { -@@ -683,7 +689,7 @@ void BackendGoogleMaps::slotHTMLEvents(const QStringList& events) - - if (zoomProbablyChanged && !mapTypeChanged) - { -- d->cacheZoom = d->htmlWidget->runScript(QLatin1String("kgeomapGetZoom();")).toInt(); -+ d->cacheZoom = d->htmlWidget->runScript(QLatin1String("kgeomapGetZoom();"), false).toInt(); - emit signalZoomChanged(QString::fromLatin1("googlemaps:%1").arg(d->cacheZoom)); - } - -@@ -701,7 +707,7 @@ void BackendGoogleMaps::slotHTMLEvents(const QStringList& events) - - if (mapBoundsProbablyChanged) - { -- const QString mapBoundsString = d->htmlWidget->runScript(QLatin1String("kgeomapGetBounds();")).toString(); -+ const QString mapBoundsString = d->htmlWidget->runScript(QLatin1String("kgeomapGetBounds();"), false).toString(); - GeoIfaceHelperParseBoundsString(mapBoundsString, &d->cacheBounds); - } - -@@ -764,11 +770,12 @@ bool BackendGoogleMaps::screenCoordinates(const GeoCoordinates& coordinates, QPo - if (!d->isReady) - return false; - -- const QString pointStringResult=d->htmlWidget->runScript( -+ const QString pointStringResult = d->htmlWidget->runScript( - QString::fromLatin1("kgeomapLatLngToPixel(%1, %2);") - .arg(coordinates.latString()) -- .arg(coordinates.lonString()) -- ).toString(); -+ .arg(coordinates.lonString()), -+ false -+ ).toString(); - const bool isValid = GeoIfaceHelperParseXYStringToPoint( - pointStringResult, - point); -@@ -994,8 +1001,8 @@ void BackendGoogleMaps::updateActionAvailability() - void BackendGoogleMaps::updateZoomMinMaxCache() - { - // TODO: these functions seem to cause problems, the map is not fully updated after a few calls --// d->cacheMaxZoom = d->htmlWidget->runScript("kgeomapGetMaxZoom();").toInt(); --// d->cacheMinZoom = d->htmlWidget->runScript("kgeomapGetMinZoom();").toInt(); -+// d->cacheMaxZoom = d->htmlWidget->runScript("kgeomapGetMaxZoom();", false).toInt(); -+// d->cacheMinZoom = d->htmlWidget->runScript("kgeomapGetMinZoom();", false).toInt(); - } - - void BackendGoogleMaps::slotThumbnailAvailableForIndex(const QVariant& index, const QPixmap& pixmap) -@@ -1328,7 +1335,7 @@ void BackendGoogleMaps::slotTracksChanged(const QListtrackManager) - { - // no track manager, clear all tracks -- const QVariant successClear = d->htmlWidget->runScript(QString::fromLatin1("kgeomapClearTracks();")); -+ const QVariant successClear = d->htmlWidget->runScript(QString::fromLatin1("kgeomapClearTracks();"), false); - - return; - } -@@ -1424,7 +1431,7 @@ void BackendGoogleMaps::slotTrackVisibilityChanged(const bool newState) - } - else if (d->htmlWidget) - { -- const QVariant successClear = d->htmlWidget->runScript(QString::fromLatin1("kgeomapClearTracks();")); -+ const QVariant successClear = d->htmlWidget->runScript(QString::fromLatin1("kgeomapClearTracks();"), false); - } - } - -diff --git a/core/utilities/geolocation/geoiface/widgets/htmlwidget.cpp b/core/utilities/geolocation/geoiface/widgets/htmlwidget.cpp -index 29d0906..3dac61e 100644 ---- a/core/utilities/geolocation/geoiface/widgets/htmlwidget.cpp -+++ b/core/utilities/geolocation/geoiface/widgets/htmlwidget.cpp -@@ -255,7 +255,7 @@ void HTMLWidget::slotScanForJSMessages(const QString& message) - /** - * @brief Wrapper around executeScript to catch more errors - */ --QVariant HTMLWidget::runScript(const QString& scriptCode) -+QVariant HTMLWidget::runScript(const QString& scriptCode, bool) - { - GEOIFACE_ASSERT(d->isReady); - -diff --git a/core/utilities/geolocation/geoiface/widgets/htmlwidget.h b/core/utilities/geolocation/geoiface/widgets/htmlwidget.h -index 9a76ef9..f97b6a1 100644 ---- a/core/utilities/geolocation/geoiface/widgets/htmlwidget.h -+++ b/core/utilities/geolocation/geoiface/widgets/htmlwidget.h -@@ -49,7 +49,7 @@ public: - ~HTMLWidget(); - - void loadInitialHTML(const QString& initialHTML); -- QVariant runScript(const QString& scriptCode); -+ QVariant runScript(const QString& scriptCode, bool async = true); - bool runScript2Coordinates(const QString& scriptCode, GeoCoordinates* const coordinates); - void mouseModeChanged(const GeoMouseModes mouseMode); - void setSelectionRectangle(const GeoCoordinates::Pair& searchCoordinates); -diff --git a/core/utilities/geolocation/geoiface/widgets/htmlwidget_qwebengine.cpp b/core/utilities/geolocation/geoiface/widgets/htmlwidget_qwebengine.cpp -new file mode 100644 -index 0000000..0387245 ---- /dev/null -+++ b/core/utilities/geolocation/geoiface/widgets/htmlwidget_qwebengine.cpp -@@ -0,0 +1,409 @@ -+/* ============================================================ -+ * -+ * This file is a part of digiKam project -+ * http://www.digikam.org -+ * -+ * Date : 2009-12-01 -+ * Description : Widget for displaying HTML in the backends -+ * -+ * Copyright (C) 2010-2018 by Gilles Caulier -+ * Copyright (C) 2009-2011 by Michael G. Hansen -+ * Copyright (C) 2015 by Mohamed Anwer -+ * -+ * This program is free software; you can redistribute it -+ * and/or modify it under the terms of the GNU General -+ * Public License as published by the Free Software Foundation; -+ * either version 2, or (at your option) -+ * any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * ============================================================ */ -+ -+#include "htmlwidget_qwebengine.h" -+ -+// Qt includes -+ -+#include -+#include -+#include -+#include -+ -+// Local includes -+ -+#include "geoifacecommon.h" -+#include "geoifacetypes.h" -+#include "digikam_debug.h" -+ -+namespace Digikam -+{ -+ -+HTMLWidgetPage::HTMLWidgetPage(HTMLWidget* const parent) -+ : QWebEnginePage(parent) -+{ -+ m_timer = new QTimer(this); -+ m_timer->setInterval(100); -+ m_timer->setSingleShot(true); -+ -+ connect(m_timer, SIGNAL(timeout()), -+ this, SLOT(slotSendHTMLEvents()), -+ Qt::QueuedConnection); -+} -+ -+HTMLWidgetPage::~HTMLWidgetPage() -+{ -+} -+ -+void HTMLWidgetPage::javaScriptConsoleMessage(JavaScriptConsoleMessageLevel /*level*/, const QString& message, int /*lineNumber*/, const QString& /*sourceID*/) -+{ -+ if (!message.startsWith(QLatin1String("(event)"))) -+ return; -+ -+ qCDebug(DIGIKAM_GEOIFACE_LOG) << message; -+ -+ const QString eventString = message.mid(7); -+ -+ if (eventString.isEmpty()) -+ return; -+ -+ m_events << eventString; -+ -+ m_timer->start(); -+} -+ -+void HTMLWidgetPage::slotSendHTMLEvents() -+{ -+ emit signalHTMLEvents(m_events); -+ m_events.clear(); -+} -+ -+// --------------------------------------------------------------------------------------------- -+ -+class HTMLWidget::Private -+{ -+public: -+ -+ Private() -+ : parent(0), -+ child(0), -+ hpage(0), -+ isReady(false), -+ selectionStatus(false), -+ firstSelectionPoint(), -+ intermediateSelectionPoint(), -+ firstSelectionScreenPoint(), -+ intermediateSelectionScreenPoint() -+ { -+ } -+ -+ QWidget* parent; -+ QWidget* child; -+ HTMLWidgetPage* hpage; -+ -+ bool isReady; -+ bool selectionStatus; -+ -+ GeoCoordinates firstSelectionPoint; -+ GeoCoordinates intermediateSelectionPoint; -+ -+ QPoint firstSelectionScreenPoint; -+ QPoint intermediateSelectionScreenPoint; -+}; -+ -+HTMLWidget::HTMLWidget(QWidget* const parent) -+ : QWebEngineView(parent), -+ d(new Private()), -+ s(0) -+{ -+ d->parent = parent; -+ setAcceptDrops(false); -+ setFocusPolicy(Qt::WheelFocus); -+ // settings()->setAttribute(QWebEngineSettings::WebGLEnabled, false); -+ -+ d->hpage = new HTMLWidgetPage(this); -+ setPage(d->hpage); -+ -+ d->parent->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); -+ -+ connect(this, SIGNAL(loadProgress(int)), -+ this, SLOT(progress(int))); -+ -+ connect(this, SIGNAL(loadFinished(bool)), -+ this, SLOT(slotHTMLCompleted(bool))); -+ -+ connect(d->hpage, SIGNAL(signalHTMLEvents(QStringList)), -+ this, SIGNAL(signalHTMLEvents(QStringList))); -+ -+ if (d->parent) -+ { -+ d->parent->installEventFilter(this); -+ } -+ -+ d->child = findChild(); -+ -+ if (d->child) -+ { -+ d->child->installEventFilter(this); -+ } -+} -+ -+HTMLWidget::~HTMLWidget() -+{ -+ delete d; -+} -+ -+void HTMLWidget::progress(int progress) -+{ -+ qCDebug(DIGIKAM_GEOIFACE_LOG) << "Maps Loading Progress: " << progress << "%"; -+} -+ -+void HTMLWidget::slotHTMLCompleted(bool ok) -+{ -+ qCDebug(DIGIKAM_GEOIFACE_LOG) << "Map Loading Completed: " << ok; -+ d->isReady = ok; -+ -+ emit signalJavaScriptReady(); -+} -+ -+/** -+ * @brief Wrapper around executeScript to catch more errors -+ */ -+QVariant HTMLWidget::runScript(const QString& scriptCode, bool async) -+{ -+ GEOIFACE_ASSERT(d->isReady); -+ -+ if (!d->isReady) -+ return QVariant(); -+ -+ //qCDebug(DIGIKAM_GEOIFACE_LOG) << scriptCode; -+ -+ if(async) -+ { -+ page()->runJavaScript(scriptCode); -+ } -+ else -+ { -+ QVariant ret; -+ QEventLoop loop; -+ // lambda c11 function capturing value returned by java script code which is not synchro with QWebEngineView. -+ // See https://wiki.qt.io/Porting_from_QtWebKit_to_QtWebEngine. -+ page()->runJavaScript(scriptCode, [&ret, &loop](const QVariant& result){ ret.setValue(result); loop.quit(); }); -+ -+ loop.exec(); -+ -+ return ret; -+ } -+ -+ return true; -+} -+ -+/** -+ * @brief Execute a script which returns coordinates and parse these -+ */ -+bool HTMLWidget::runScript2Coordinates(const QString& scriptCode, GeoCoordinates* const coordinates) -+{ -+ const QVariant scriptResult = runScript(scriptCode, false); -+ -+ return GeoIfaceHelperParseLatLonString(scriptResult.toString(), coordinates); -+} -+ -+bool HTMLWidget::eventFilter(QObject* object, QEvent* event) -+{ -+ if (d->parent && object == d->parent) -+ { -+ -+ if (event->type() == QEvent::Resize) -+ { -+ QResizeEvent* const resizeEvent = dynamic_cast(event); -+ -+ if (resizeEvent) -+ { -+ resize(resizeEvent->size()); -+ } -+ } -+ } -+ else if (d->child && object == d->child) -+ { -+ if (event->type() == QEvent::MouseButtonRelease) -+ { -+ QMouseEvent* const e = dynamic_cast(event); -+ -+ if (s->currentMouseMode == MouseModeRegionSelection) -+ { -+ if (!d->firstSelectionPoint.hasCoordinates()) -+ { -+ runScript2Coordinates(QString::fromLatin1("kgeomapPixelToLatLng(%1, %2);") -+ .arg(e->x()) -+ .arg(e->y()), -+ &d->firstSelectionPoint); -+ -+ d->firstSelectionScreenPoint = QPoint(e->x(), e->y()); -+ } -+ else -+ { -+ runScript2Coordinates(QString::fromLatin1("kgeomapPixelToLatLng(%1, %2);") -+ .arg(e->x()) -+ .arg(e->y()), -+ &d->intermediateSelectionPoint); -+ -+ d->intermediateSelectionScreenPoint = QPoint(e->x(), e->y()); -+ -+ qreal lonWest, latNorth, lonEast, latSouth; -+ -+ if (d->firstSelectionScreenPoint.x() < d->intermediateSelectionScreenPoint.x()) -+ { -+ lonWest = d->firstSelectionPoint.lon(); -+ lonEast = d->intermediateSelectionPoint.lon(); -+ } -+ else -+ { -+ lonEast = d->firstSelectionPoint.lon(); -+ lonWest = d->intermediateSelectionPoint.lon(); -+ } -+ -+ if (d->firstSelectionScreenPoint.y() < d->intermediateSelectionScreenPoint.y()) -+ { -+ latNorth = d->firstSelectionPoint.lat(); -+ latSouth = d->intermediateSelectionPoint.lat(); -+ } -+ else -+ { -+ latNorth = d->intermediateSelectionPoint.lat(); -+ latSouth = d->firstSelectionPoint.lat(); -+ } -+ -+ runScript(QLatin1String("kgeomapRemoveTemporarySelectionRectangle();")); -+ runScript(QString::fromLatin1("kgeomapSetSelectionRectangle(%1, %2, %3, %4);") -+ .arg(lonWest) -+ .arg(latNorth) -+ .arg(lonEast) -+ .arg(latSouth)); -+ -+ const GeoCoordinates::Pair selectionCoordinates( -+ GeoCoordinates(latNorth, lonWest), -+ GeoCoordinates(latSouth, lonEast)); -+ -+ d->firstSelectionPoint.clear(); -+ d->intermediateSelectionPoint.clear(); -+ -+ emit selectionHasBeenMade(selectionCoordinates); -+ } -+ } -+ } -+ else if (event->type() == QEvent::MouseMove) -+ { -+ QMouseEvent* const e = dynamic_cast(event); -+ -+ if (s->currentMouseMode == MouseModeRegionSelection && -+ d->firstSelectionPoint.hasCoordinates()) -+ { -+ runScript2Coordinates(QString::fromLatin1("kgeomapPixelToLatLng(%1, %2);") -+ .arg(e->x()) -+ .arg(e->y()), -+ &d->intermediateSelectionPoint); -+ -+ d->intermediateSelectionScreenPoint = QPoint(e->x(), e->y()); -+ -+ qCDebug(DIGIKAM_GEOIFACE_LOG) << d->firstSelectionScreenPoint << QLatin1String(" ") << d->intermediateSelectionScreenPoint; -+ -+ qreal lonWest, latNorth, lonEast, latSouth; -+ -+ if (d->firstSelectionScreenPoint.x() < d->intermediateSelectionScreenPoint.x()) -+ { -+ lonWest = d->firstSelectionPoint.lon(); -+ lonEast = d->intermediateSelectionPoint.lon(); -+ } -+ else -+ { -+ lonEast = d->firstSelectionPoint.lon(); -+ lonWest = d->intermediateSelectionPoint.lon(); -+ } -+ -+ if (d->firstSelectionScreenPoint.y() < d->intermediateSelectionScreenPoint.y()) -+ { -+ latNorth = d->firstSelectionPoint.lat(); -+ latSouth = d->intermediateSelectionPoint.lat(); -+ } -+ else -+ { -+ latNorth = d->intermediateSelectionPoint.lat(); -+ latSouth = d->firstSelectionPoint.lat(); -+ } -+ -+ runScript(QString::fromLatin1("kgeomapSetTemporarySelectionRectangle(%1, %2, %3, %4);") -+ .arg(lonWest) -+ .arg(latNorth) -+ .arg(lonEast) -+ .arg(latSouth)); -+ } -+ } -+ } -+ -+ return false; -+} -+ -+void HTMLWidget::setSelectionRectangle(const GeoCoordinates::Pair& searchCoordinates) -+{ -+ if (!searchCoordinates.first.hasCoordinates()) -+ { -+ runScript(QString::fromLatin1("kgeomapRemoveSelectionRectangle();")); -+ return; -+ } -+ -+ qreal West = searchCoordinates.first.lon(); -+ qreal North = searchCoordinates.first.lat(); -+ qreal East = searchCoordinates.second.lon(); -+ qreal South = searchCoordinates.second.lat(); -+ -+ runScript(QString::fromLatin1("kgeomapSetSelectionRectangle(%1, %2, %3, %4);") -+ .arg(West).arg(North).arg(East).arg(South)); -+} -+ -+void HTMLWidget::removeSelectionRectangle() -+{ -+ runScript(QLatin1String("kgeomapRemoveSelectionRectangle();")); -+} -+ -+void HTMLWidget::mouseModeChanged(const GeoMouseModes mouseMode) -+{ -+ const bool inSelectionMode = (mouseMode == MouseModeRegionSelection); -+ -+ if (inSelectionMode) -+ { -+ d->firstSelectionPoint.clear(); -+ d->intermediateSelectionPoint.clear(); -+ runScript(QString::fromLatin1("kgeomapSelectionModeStatus(%1);").arg(inSelectionMode)); -+ } -+ else -+ { -+ runScript(QString::fromLatin1("kgeomapSelectionModeStatus(%1);").arg(inSelectionMode)); -+ } -+} -+ -+void HTMLWidget::centerOn(const qreal west, const qreal north, -+ const qreal east, const qreal south, -+ const bool useSaneZoomLevel) -+{ -+/* -+ qCDebug(DIGIKAM_GEOIFACE_LOG) << "West:" << west -+ << " North:" << north -+ << " East:" << east -+ << " South:" << south; -+*/ -+ runScript(QString::fromLatin1("kgeomapSetMapBoundaries(%1, %2, %3, %4, %5);") -+ .arg(west) -+ .arg(north) -+ .arg(east) -+ .arg(south) -+ .arg(useSaneZoomLevel ? 1 : 0)); -+} -+ -+void HTMLWidget::setSharedGeoIfaceObject(GeoIfaceSharedData* const sharedData) -+{ -+ s = sharedData; -+} -+ -+} // namespace Digikam -diff --git a/core/utilities/geolocation/geoiface/widgets/htmlwidget_qwebengine.h b/core/utilities/geolocation/geoiface/widgets/htmlwidget_qwebengine.h -new file mode 100644 -index 0000000..14cebb3 ---- /dev/null -+++ b/core/utilities/geolocation/geoiface/widgets/htmlwidget_qwebengine.h -@@ -0,0 +1,119 @@ -+/* ============================================================ -+ * -+ * This file is a part of digiKam project -+ * http://www.digikam.org -+ * -+ * Date : 2009-12-01 -+ * Description : Widget for displaying HTML in the backends -+ * -+ * Copyright (C) 2010-2018 by Gilles Caulier -+ * Copyright (C) 2009-2011 by Michael G. Hansen -+ * Copyright (C) 2015 by Mohamed Anwer -+ * -+ * This program is free software; you can redistribute it -+ * and/or modify it under the terms of the GNU General -+ * Public License as published by the Free Software Foundation; -+ * either version 2, or (at your option) -+ * any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * ============================================================ */ -+ -+#ifndef HTML_WIDGET_QWEBENGINE_H -+#define HTML_WIDGET_QWEBENGINE_H -+ -+// Qt includes -+ -+#include -+#include -+#include -+ -+// Local includes -+ -+#include "geoifacecommon.h" -+#include "geoifacetypes.h" -+#include "geocoordinates.h" -+ -+namespace Digikam -+{ -+ -+class HTMLWidget; -+ -+class HTMLWidgetPage : public QWebEnginePage -+{ -+ Q_OBJECT -+ -+public: -+ -+ explicit HTMLWidgetPage(HTMLWidget* const parent = 0); -+ virtual ~HTMLWidgetPage(); -+ -+Q_SIGNALS: -+ -+ void signalHTMLEvents(const QStringList& events); -+ -+private Q_SLOTS: -+ -+ void slotSendHTMLEvents(); -+ -+protected: -+ -+ void javaScriptConsoleMessage(JavaScriptConsoleMessageLevel, const QString&, int, const QString&); -+ -+private: -+ -+ QStringList m_events; -+ QTimer* m_timer; -+}; -+ -+// ------------------------------------------------------------------- -+ -+class HTMLWidget : public QWebEngineView -+{ -+ Q_OBJECT -+ -+public: -+ -+ explicit HTMLWidget(QWidget* const parent = 0); -+ ~HTMLWidget(); -+ -+ void loadInitialHTML(const QString& initialHTML); -+ QVariant runScript(const QString& scriptCode, bool async = true); -+ bool runScript2Coordinates(const QString& scriptCode, GeoCoordinates* const coordinates); -+ void mouseModeChanged(const GeoMouseModes mouseMode); -+ void setSelectionRectangle(const GeoCoordinates::Pair& searchCoordinates); -+ void removeSelectionRectangle(); -+ void centerOn(const qreal west, const qreal north, const qreal east, const qreal south, -+ const bool useSaneZoomLevel = true); -+ void setSharedGeoIfaceObject(GeoIfaceSharedData* const sharedData); -+ -+Q_SIGNALS: -+ -+ void signalHTMLEvents(const QStringList& events); -+ void signalJavaScriptReady(); -+ void selectionHasBeenMade(const Digikam::GeoCoordinates::Pair& coordinatesRect); -+ -+protected: -+ -+ bool eventFilter(QObject*, QEvent*); -+ -+protected Q_SLOTS: -+ -+ void slotHTMLCompleted(bool ok); -+ void progress(int progress); -+ -+private: -+ -+ class Private; -+ Private* const d; -+ -+ GeoIfaceSharedData* s; -+}; -+ -+} // namespace Digikam -+ -+#endif // HTML_WIDGET_QWEBENGINE_H --- -cgit v0.11.2 - diff --git a/Lower-minimum-exiv2-version.patch b/Lower-minimum-exiv2-version.patch index 4f1da15..262aa56 100644 --- a/Lower-minimum-exiv2-version.patch +++ b/Lower-minimum-exiv2-version.patch @@ -13,15 +13,15 @@ diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index 041865ffcc..4518ea1815 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt -@@ -58,7 +58,7 @@ set(QT_MIN_VERSION "5.6.0") - set(KIPI_MIN_VERSION "5.0.0") - set(KSANE_MIN_VERSION "5.0.0") - set(LENSFUN_MIN_VERSION "0.2.6.0") --set(EXIV2_MIN_VERSION "0.26") -+set(EXIV2_MIN_VERSION "0.25") - set(AKONADI_MIN_VERSION "4.89.0") # Akonadi Contact dependency - set(CALENDAR_MIN_VERSION "4.81.0") # Calendar Core dependency - set(QTAV_MIN_VERSION "1.12.0") +@@ -56,7 +56,7 @@ set(QT_MIN_VERSION "5.6.0") + set(KF5_MIN_VERSION "5.1.0") + set(QT_MIN_VERSION "5.6.0") + set(LENSFUN_MIN_VERSION "0.2.6.0") +-set(EXIV2_MIN_VERSION "0.26") ++set(EXIV2_MIN_VERSION "0.25") + set(OPENCV_MIN_VERSION "3.1.0") + set(QTAV_MIN_VERSION "1.12.0") + set(KSANE_MIN_VERSION "5.0.0") # For digital scanner support. -- 2.16.4 diff --git a/add-support-for-Exiv2-0.27.patch b/add-support-for-Exiv2-0.27.patch deleted file mode 100644 index eb298f7..0000000 --- a/add-support-for-Exiv2-0.27.patch +++ /dev/null @@ -1,133 +0,0 @@ -From cb808f574248a0c96894338fdcf03b12fbbc080d Mon Sep 17 00:00:00 2001 -From: Gilles Caulier -Date: Sun, 7 Oct 2018 10:17:30 +0200 -Subject: add support of Exiv2 0.27 - ---- - core/cmake/modules/FindExiv2.cmake | 75 +++++++++++++++++++++++++++----------- - 1 file changed, 53 insertions(+), 22 deletions(-) - -diff --git a/core/cmake/modules/FindExiv2.cmake b/core/cmake/modules/FindExiv2.cmake -index 1e971a3..02d2943 100644 ---- a/core/cmake/modules/FindExiv2.cmake -+++ b/core/cmake/modules/FindExiv2.cmake -@@ -1,7 +1,7 @@ - # - Try to find the Exiv2 library - # - # EXIV2_MIN_VERSION - You can set this variable to the minimum version you need --# before doing FIND_PACKAGE(Exiv2). The default is 0.15. -+# before doing FIND_PACKAGE(Exiv2). The default is 0.26. - # - # Once done this will define - # -@@ -11,34 +11,41 @@ - # EXIV2_DEFINITIONS - Compiler switches required for using libexiv2 - # - # The minimum required version of Exiv2 can be specified using the --# standard syntax, e.g. find_package(Exiv2 0.17) -+# standard syntax, e.g. find_package(Exiv2 0.26) - # - # For compatibility, also the variable EXIV2_MIN_VERSION can be set to the minimum version --# you need before doing FIND_PACKAGE(Exiv2). The default is 0.15. -+# you need before doing FIND_PACKAGE(Exiv2). The default is 0.26. - # - # Copyright (c) 2010, Alexander Neundorf, --# Copyright (c) 2008-2017, Gilles Caulier, -+# Copyright (c) 2008-2018, Gilles Caulier, - # - # Redistribution and use is allowed according to the terms of the BSD license. - # For details see the accompanying COPYING-CMAKE-SCRIPTS file. - - # Support EXIV2_MIN_VERSION for compatibility: -+ - if(NOT Exiv2_FIND_VERSION) -- set(Exiv2_FIND_VERSION "${EXIV2_MIN_VERSION}") --endif(NOT Exiv2_FIND_VERSION) - --# the minimum version of exiv2 we require -+ set(Exiv2_FIND_VERSION "${EXIV2_MIN_VERSION}") -+ -+endif() -+ -+# The minimum version of exiv2 we require - if(NOT Exiv2_FIND_VERSION) -- set(Exiv2_FIND_VERSION "0.15") --endif(NOT Exiv2_FIND_VERSION) - --if (NOT WIN32) -+ set(Exiv2_FIND_VERSION "0.26") -+ -+endif() -+ -+if(NOT WIN32) -+ - # use pkg-config to get the directories and then use these values - # in the FIND_PATH() and FIND_LIBRARY() calls - find_package(PkgConfig) - pkg_check_modules(PC_EXIV2 QUIET exiv2) - set(EXIV2_DEFINITIONS ${PC_EXIV2_CFLAGS_OTHER}) --endif (NOT WIN32) -+ -+endif() - - find_path(EXIV2_INCLUDE_DIR NAMES exiv2/exif.hpp - HINTS -@@ -52,20 +59,44 @@ find_library(EXIV2_LIBRARY NAMES exiv2 libexiv2 - ${PC_EXIV2_LIBRARY_DIRS} - ) - --# Get the version number from exiv2/version.hpp and store it in the cache: --if(EXIV2_INCLUDE_DIR AND NOT EXIV2_VERSION) -- file(READ ${EXIV2_INCLUDE_DIR}/exiv2/version.hpp EXIV2_VERSION_CONTENT) -- string(REGEX MATCH "#define EXIV2_MAJOR_VERSION +\\( *([0-9]+) *\\)" _dummy "${EXIV2_VERSION_CONTENT}") -- set(EXIV2_VERSION_MAJOR "${CMAKE_MATCH_1}") -+if (EXIV2_INCLUDE_DIR AND NOT EXIV2_VERSION) -+ -+ # For Exiv2 <= 0.26, get the version number from exiv2/version.hpp and store it in the cache: -+ -+ file(READ ${EXIV2_INCLUDE_DIR}/exiv2/version.hpp EXIV2_VERSION_CONTENT) -+ string(REGEX MATCH "#define EXIV2_MAJOR_VERSION +\\( *([0-9]+) *\\)" _dummy "${EXIV2_VERSION_CONTENT}") -+ set(EXIV2_VERSION_MAJOR "${CMAKE_MATCH_1}") -+ -+ string(REGEX MATCH "#define EXIV2_MINOR_VERSION +\\( *([0-9]+) *\\)" _dummy "${EXIV2_VERSION_CONTENT}") -+ set(EXIV2_VERSION_MINOR "${CMAKE_MATCH_1}") -+ -+ string(REGEX MATCH "#define EXIV2_PATCH_VERSION +\\( *([0-9]+) *\\)" _dummy "${EXIV2_VERSION_CONTENT}") -+ set(EXIV2_VERSION_PATCH "${CMAKE_MATCH_1}") -+ -+ if(EXIV2_VERSION_MAJOR AND EXIV2_VERSION_MINOR AND EXIV2_VERSION_PATCH) -+ -+ set(EXIV2_VERSION "${EXIV2_VERSION_MAJOR}.${EXIV2_VERSION_MINOR}.${EXIV2_VERSION_PATCH}" -+ CACHE STRING "Version number of Exiv2" FORCE) -+ else() -+ -+ # For Exiv2 >= 0.27, get the version number from exiv2/exv_conf.h and store it in the cache: -+ -+ file(READ ${EXIV2_INCLUDE_DIR}/exiv2/exv_conf.h EXIV2_VERSION_CONTENT) -+ string(REGEX MATCH "#define EXIV2_MAJOR_VERSION +\\( *([0-9]+) *\\)" _dummy "${EXIV2_VERSION_CONTENT}") -+ set(EXIV2_VERSION_MAJOR "${CMAKE_MATCH_1}") -+ -+ string(REGEX MATCH "#define EXIV2_MINOR_VERSION +\\( *([0-9]+) *\\)" _dummy "${EXIV2_VERSION_CONTENT}") -+ set(EXIV2_VERSION_MINOR "${CMAKE_MATCH_1}") -+ -+ string(REGEX MATCH "#define EXIV2_PATCH_VERSION +\\( *([0-9]+) *\\)" _dummy "${EXIV2_VERSION_CONTENT}") -+ set(EXIV2_VERSION_PATCH "${CMAKE_MATCH_1}") - -- string(REGEX MATCH "#define EXIV2_MINOR_VERSION +\\( *([0-9]+) *\\)" _dummy "${EXIV2_VERSION_CONTENT}") -- set(EXIV2_VERSION_MINOR "${CMAKE_MATCH_1}") -+ set(EXIV2_VERSION "${EXIV2_VERSION_MAJOR}.${EXIV2_VERSION_MINOR}.${EXIV2_VERSION_PATCH}" -+ CACHE STRING "Version number of Exiv2" FORCE) - -- string(REGEX MATCH "#define EXIV2_PATCH_VERSION +\\( *([0-9]+) *\\)" _dummy "${EXIV2_VERSION_CONTENT}") -- set(EXIV2_VERSION_PATCH "${CMAKE_MATCH_1}") -+ endif() - -- set(EXIV2_VERSION "${EXIV2_VERSION_MAJOR}.${EXIV2_VERSION_MINOR}.${EXIV2_VERSION_PATCH}" CACHE STRING "Version number of Exiv2" FORCE) --endif(EXIV2_INCLUDE_DIR AND NOT EXIV2_VERSION) -+endif() - - set(EXIV2_LIBRARIES "${EXIV2_LIBRARY}") - --- -cgit v1.1 - diff --git a/adjust-find-cmake-script-to-exiv2-0.27-RC1.patch b/adjust-find-cmake-script-to-exiv2-0.27-RC1.patch deleted file mode 100644 index 3de49f2..0000000 --- a/adjust-find-cmake-script-to-exiv2-0.27-RC1.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 87e5ee6503f084b4bd9c8e1b1311a76655c2685e Mon Sep 17 00:00:00 2001 -From: Gilles Caulier -Date: Sat, 27 Oct 2018 09:58:38 +0200 -Subject: exiv2 0.27 RC1 generate now libexiv2lib.so at install stage. Adjust - the find cmake script accordingly. Print all values found while parsing host - system to detect the library - ---- - core/cmake/modules/FindExiv2.cmake | 11 +++++++++-- - 1 file changed, 9 insertions(+), 2 deletions(-) - -diff --git a/core/cmake/modules/FindExiv2.cmake b/core/cmake/modules/FindExiv2.cmake -index 2fcee5b..c677832 100644 ---- a/core/cmake/modules/FindExiv2.cmake -+++ b/core/cmake/modules/FindExiv2.cmake -@@ -5,7 +5,8 @@ - # - # Once done this will define - # --# Exiv2_FOUND - system has libexiv2 -+# EXIV2_FOUND - system has libexiv2 -+# EXIV2_VERSION - the version of libexiv2 - # EXIV2_INCLUDE_DIR - the libexiv2 include directory - # EXIV2_LIBRARIES - Link these to use libexiv2 - # EXIV2_DEFINITIONS - Compiler switches required for using libexiv2 -@@ -53,7 +54,7 @@ find_path(EXIV2_INCLUDE_DIR NAMES exiv2/exif.hpp - ${PC_EXIV2_INCLUDE_DIRS} - ) - --find_library(EXIV2_LIBRARY NAMES exiv2 libexiv2 -+find_library(EXIV2_LIBRARY NAMES exiv2 libexiv2 exiv2lib - HINTS - ${PC_EXIV2_LIBDIR} - ${PC_EXIV2_LIBRARY_DIRS} -@@ -106,4 +107,10 @@ include(FindPackageHandleStandardArgs) - find_package_handle_standard_args(Exiv2 REQUIRED_VARS EXIV2_LIBRARY EXIV2_INCLUDE_DIR - VERSION_VAR EXIV2_VERSION) - -+MESSAGE(STATUS "EXIV2_FOUND = ${EXIV2_FOUND}") -+MESSAGE(STATUS "EXIV2_VERSION = ${EXIV2_VERSION}") -+MESSAGE(STATUS "EXIV2_INCLUDE_DIR = ${EXIV2_INCLUDE_DIR}") -+MESSAGE(STATUS "EXIV2_LIBRARY = ${EXIV2_LIBRARY}") -+MESSAGE(STATUS "EXIV2_DEFINITIONS = ${EXIV2_DEFINITIONS}") -+ - mark_as_advanced(EXIV2_INCLUDE_DIR EXIV2_LIBRARY) --- -cgit v1.1 - diff --git a/be-compatible-with-backward-0.26.patch b/be-compatible-with-backward-0.26.patch deleted file mode 100644 index ffcb686..0000000 --- a/be-compatible-with-backward-0.26.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 16e452c62a81f1b70844c97f18137a004ab08b65 Mon Sep 17 00:00:00 2001 -From: Gilles Caulier -Date: Sun, 7 Oct 2018 11:32:44 +0200 -Subject: be compatible with backward 0.26 - ---- - core/cmake/modules/FindExiv2.cmake | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -(limited to 'core/cmake/modules/FindExiv2.cmake') - -diff --git a/core/cmake/modules/FindExiv2.cmake b/core/cmake/modules/FindExiv2.cmake -index 02d2943..2fcee5b 100644 ---- a/core/cmake/modules/FindExiv2.cmake -+++ b/core/cmake/modules/FindExiv2.cmake -@@ -73,7 +73,9 @@ if (EXIV2_INCLUDE_DIR AND NOT EXIV2_VERSION) - string(REGEX MATCH "#define EXIV2_PATCH_VERSION +\\( *([0-9]+) *\\)" _dummy "${EXIV2_VERSION_CONTENT}") - set(EXIV2_VERSION_PATCH "${CMAKE_MATCH_1}") - -- if(EXIV2_VERSION_MAJOR AND EXIV2_VERSION_MINOR AND EXIV2_VERSION_PATCH) -+ if(NOT "${EXIV2_VERSION_MAJOR}" STREQUAL "" AND -+ NOT "${EXIV2_VERSION_MINOR}" STREQUAL "" AND -+ NOT "${EXIV2_VERSION_PATCH}" STREQUAL "") - - set(EXIV2_VERSION "${EXIV2_VERSION_MAJOR}.${EXIV2_VERSION_MINOR}.${EXIV2_VERSION_PATCH}" - CACHE STRING "Version number of Exiv2" FORCE) --- -cgit v1.1 - diff --git a/digikam-5.9.0.tar.xz b/digikam-5.9.0.tar.xz deleted file mode 100644 index 57aea69..0000000 --- a/digikam-5.9.0.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:660d32eedcfd6fe1a75170a651fab068ae62f7f092ae710771a2f32a1c550d1b -size 132931184 diff --git a/digikam-6.0.0.tar.xz b/digikam-6.0.0.tar.xz new file mode 100644 index 0000000..4b02093 --- /dev/null +++ b/digikam-6.0.0.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6e4f0ee52772ea2baef38fc9b96f18ca10f165f0c5bda71d8161a4eded26fb47 +size 331386500 diff --git a/digikam.changes b/digikam.changes index 6fbd418..230b525 100644 --- a/digikam.changes +++ b/digikam.changes @@ -1,3 +1,104 @@ +------------------------------------------------------------------- +Fri Feb 22 15:56:21 UTC 2019 - wbauer@tmo.at + +- Update to 6.0.0 + * https://www.digikam.org/news/2019-02-10-6.0.0_release_announcement/ +- New features (from NEWS): +ImageEditor : Add Web services Import and Export tools. +Showfoto : Add Web services Import and Export tools. +LightTable : Add Web services Import and Export tools. +Database : Similarity database has been moved to a dedicated file + to not bloat core database with computed finger-prints. + This will speed-up query in core database in case of + Similarity feature is used. +Database : New video metadata parser based on ffmpeg to populate + database. +Search : Add video support to find files based on properties + registered on database. +General : Add new Exiv2 0.27 support. +General : Add new Lensfun 0.4 support. +General : Use DrMinGW has crash handler under Windows. +General : Port all export/import tool to OAuth2 authentification. +General : New tool to adjust quickly time and date information + from items. Tool will be available in AlbumView, + ImageEditor, LightTable, and Showfoto. +General : New function to group images by timelapse / burst +General : New tool to export to Pinterest social network. +General : New tool to export to OneDrive webservice. +General : New tool to export to Box webservice. +General : New tool to export to Ipfs webservice. +General : All bundles use last Lenfun 0.3.95 to process + automatic lens correction. +General : Add QWebEngine support. +General : Fix all Krazy static analyzer reports. +General : Update internal Libraw to last 0.19.2. + New camera supported: + * Apple: Phone 8, iPhone 8 plus, iPhone X + * BlackMagic: URSA Mini 4k, URSA Mini 4.6k, URSA Mini Pro 4.6k + * Canon: PowerShot A410, A540, D10, ELPH 130 IS, ELPH 160 IS, + SD750, SX100 IS,SX130 IS, SX160 IS, SX510 HS, + SX10 IS, IXUS 900Ti, PowerShot G1 X Mark III, + G9 X Mark II, EOS 6D Mark II, EOS 77D, EOS 200D, + EOS 800D, EOS M6, EOS M100 + * Casio: EX-ZR4100/5100 + * DJI: Phantom4 Pro/Pro+, Zenmuse X5, Zenmuse X5R + * FujiFilm: S6500fd, GFX 50S, X100f, X-A3, X-A5, X-A10, X-A20, + X-E3, X-H1, X-T20 + * Hasselblad: H6D-100c, A6D-100c + * Huawei: P9 (EVA-L09/AL00), Honor6a, Honor9, Mate10 (BLA-L29) + * Leica: CL, M10, TL2 + * LG: V20 (F800K), VS995 + * Nikon: D850, D5600, D7500, Coolpix B700 + * Olympus: E-PL9, E-M10 Mark III, TG-5 + * OnePlus: A3303, A5000 + * Panasonic: DMC-FZ45, DMC-FZ72, DC-FZ80/82, DC-G9 (std. res mode only), + DC-GF10/GF90, DC-GH5, DC-GX9, DC-GX800/850/GF9, + DMC-LX1, DC-ZS70 (DC-TZ90/91/92, DC-T93), + DC-TZ100/101/ZS100, DC-TZ200/ZS200 + * PARROT: Bebop 2, Bebop Drone + * Pentax: KP + * PhaseOne: IQ3 100MP Trichromatic + * Samsung: Galaxy Nexus, Galaxy S3, S6 (SM-G920F), S7, S7 Edge, + S8 (SM-G950U) + * Sony: A7R III, A9, DSC-RX0, DSC-RX10IV + * Yi: M1 + * YUNEEC: CGO3, CGO3P + * Xiaoyi: YIAC3 (YI 4k) +Collection : Add tool button to update an existing collection to the new + drive or path. +Tags : Add possibility to merge tags by drag & drop. +IconView : Add capability to re-organize the contents manually. +IconView : Add capability to separate the contents by month. +HTML Gallery : New Vanilla theme to emulate export to HTML from Adobe LightRoom. +HTML Gallery : New Blue Frame theme. +HTML Gallery : New Kiosk-Mode theme. +- 630 bugs fixed +- Drop patches merged upstream: + * Add-QtWebEngine-support.patch + * fix-black-Welcome-page-by-clicking-on-a-link.patch + * add-support-for-Exiv2-0.27.patch + * be-compatible-with-backward-0.26.patch + * adjust-find-cmake-script-to-exiv2-0.27-RC1.patch + * first-patch-to-be-compatible-with-Exiv2-0.27.patch + * f27ab9c1051bd0a0.patch + * fix-compile.patch +- Drop docs subpackage, docs are no longer included +- Drop kipi-plugins subpackage, no longer included +- Drop patch for kipi-plugins that's no longer relevant: + * 0002-Revert-replace-obsolete-qSort-function.patch +- Drop 0001-Revert-replace-obsolete-qSort-function.patch and build + with gcc7 on Leap 42.3 instead +- Refresh Lower-minimum-exiv2-version.patch +- Remove kipi-plugins requirement, digikam doesn't use libkipi + anymore +- Recommend enblend-enfuse and hugin (previously recommended by + kipi-plugins), needed for certain functionality in digikam +- Update/cleanup build requirements +- Use fdupes without -s option +- Make lang package conditional +- Handle soversion via a macro, bump to 6 following upstream +- Run spec-cleaner + ------------------------------------------------------------------- Wed Jan 2 12:21:09 UTC 2019 - wbauer@tmo.at diff --git a/digikam.spec b/digikam.spec index 094604b..0b997a6 100644 --- a/digikam.spec +++ b/digikam.spec @@ -1,7 +1,7 @@ # # spec file for package digikam # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,40 +16,20 @@ # +%define soversion 6 +%bcond_without lang Name: digikam -Version: 5.9.0 +Version: 6.0.0 Release: 0 Summary: A KDE Photo Manager License: GPL-2.0-or-later Group: Productivity/Graphics/Viewers -Url: http://www.digikam.org/ -Source0: http://download.kde.org/stable/%{name}/%{name}-%{version}.tar.xz +URL: http://www.digikam.org/ +Source0: http://download.kde.org/stable/%{name}/%{version}/%{name}-%{version}.tar.xz # PATCH-FIX-OPENSUSE 0001-Disable-detection-of-OpenGL-for-GLES-platforms.patch -- The OpenGL slideshow depends on Desktop GL, see kde#383715 Patch0: 0001-Disable-detection-of-OpenGL-for-GLES-platforms.patch # PATCH-FIX-OPENSUSE -Patch1: 0001-Revert-replace-obsolete-qSort-function.patch -# PATCH-FIX-OPENSUSE -Patch2: 0002-Revert-replace-obsolete-qSort-function.patch -# PATCH-FIX-OPENSUSE -Patch3: Lower-minimum-exiv2-version.patch -# PATCH-FEATURE-UPSTREAM -Patch4: Add-QtWebEngine-support.patch -# PATCH-FIX-UPSTREAM -Patch5: fix-black-Welcome-page-by-clicking-on-a-link.patch -# PATCH-FIX-UPSTREAM -- fix build with exiv2-0.27 -Patch6: add-support-for-Exiv2-0.27.patch -Patch7: be-compatible-with-backward-0.26.patch -Patch8: adjust-find-cmake-script-to-exiv2-0.27-RC1.patch -Patch9: first-patch-to-be-compatible-with-Exiv2-0.27.patch -Patch10: f27ab9c1051bd0a0.patch -Patch11: fix-compile.patch -#This pulls in QWebEngine, which is not available on ppc64 -%ifarch %ix86 x86_64 %arm aarch64 mips mips64 -BuildRequires: akonadi-contact-devel -BuildRequires: pkgconfig(Qt5WebEngineWidgets) -%else -BuildRequires: pkgconfig(Qt5WebKitWidgets) -%endif +Patch1: Lower-minimum-exiv2-version.patch BuildRequires: QtAV-devel >= 1.12 BuildRequires: bison BuildRequires: boost-devel @@ -57,8 +37,7 @@ BuildRequires: doxygen BuildRequires: fdupes BuildRequires: flex BuildRequires: graphviz-devel -BuildRequires: gtk2-devel -BuildRequires: karchive-devel +BuildRequires: hicolor-icon-theme BuildRequires: kconfig-devel BuildRequires: kcoreaddons-devel BuildRequires: kdoctools-devel @@ -76,44 +55,44 @@ BuildRequires: lensfun-devel BuildRequires: libeigen3-devel BuildRequires: libexiv2-devel >= 0.25 BuildRequires: libexpat-devel -BuildRequires: libgcrypt-devel -BuildRequires: libgpod-devel BuildRequires: libjasper-devel -BuildRequires: libkipi-devel >= 16.04.0 BuildRequires: libksane-devel >= 15.12.0 BuildRequires: liblcms2-devel BuildRequires: liblqr-devel -BuildRequires: libmediawiki-devel -BuildRequires: libmysqlclient-devel -BuildRequires: libmysqld-devel -BuildRequires: libpgf-devel +BuildRequires: libpng-devel BuildRequires: libtiff-devel -BuildRequires: libusb-devel +BuildRequires: libxml2-devel +BuildRequires: libxslt-devel BuildRequires: marble-devel -BuildRequires: mysql BuildRequires: opencv-devel +BuildRequires: pkgconfig BuildRequires: solid-devel BuildRequires: threadweaver-devel >= 5.1.0 BuildRequires: update-desktop-files BuildRequires: cmake(KF5CalendarCore) -BuildRequires: pkgconfig(Qt5Concurrent) -BuildRequires: pkgconfig(Qt5Core) >= 5.6.0 -BuildRequires: pkgconfig(Qt5DBus) -BuildRequires: pkgconfig(Qt5Network) -BuildRequires: pkgconfig(Qt5OpenGL) -BuildRequires: pkgconfig(Qt5PrintSupport) -BuildRequires: pkgconfig(Qt5Sql) -BuildRequires: pkgconfig(Qt5Svg) -BuildRequires: pkgconfig(Qt5Test) -BuildRequires: pkgconfig(Qt5X11Extras) -BuildRequires: pkgconfig(Qt5Xml) -BuildRequires: pkgconfig(Qt5XmlPatterns) +BuildRequires: cmake(Qt5Concurrent) +BuildRequires: cmake(Qt5Core) >= 5.6.0 +BuildRequires: cmake(Qt5DBus) +BuildRequires: cmake(Qt5Gui) +BuildRequires: cmake(Qt5Network) +BuildRequires: cmake(Qt5OpenGL) +BuildRequires: cmake(Qt5PrintSupport) +BuildRequires: cmake(Qt5Sql) +BuildRequires: cmake(Qt5Test) +BuildRequires: cmake(Qt5Widgets) +BuildRequires: cmake(Qt5X11Extras) +BuildRequires: cmake(Qt5Xml) +BuildRequires: cmake(Qt5XmlPatterns) +BuildRequires: pkgconfig(libavcodec) +BuildRequires: pkgconfig(libavfilter) +BuildRequires: pkgconfig(libavformat) +BuildRequires: pkgconfig(libavutil) BuildRequires: pkgconfig(libgphoto2) >= 2.4.0 -Requires: kipi-plugins >= %{version} +BuildRequires: pkgconfig(libswscale) Requires: libQt5Sql5-sqlite -Recommends: %{name}-doc Recommends: %{name}-lang -BuildRoot: %{_tmppath}/%{name}-%{version}-build +Recommends: enblend-enfuse +Recommends: hugin Recommends: marble Recommends: showfoto # Got merged into libimageeditor in 5.2.0 @@ -128,6 +107,20 @@ Obsoletes: %{name}-plugin-fxfilters < %{version} Provides: %{name}-plugin-transform = %{version} Obsoletes: %{name}-plugin-transform < %{version} Obsoletes: digikam-libs < %{version} +# Docs no longer included in 6.0.0 +Provides: %{name}-doc = %{version} +Obsoletes: %{name}-doc < %{version} +#This pulls in QWebEngine, which is not available on ppc64 +%ifarch %{ix86} x86_64 %{arm} aarch64 mips mips64 +BuildRequires: akonadi-contact-devel +BuildRequires: pkgconfig(Qt5WebEngineWidgets) +%else +BuildRequires: pkgconfig(Qt5WebKitWidgets) +%endif +%if 0%{?suse_version} < 1320 +# It does not build with the default compiler (GCC 4.8) on Leap 42.x +BuildRequires: gcc7-c++ +%endif %description digiKam is a simple digital photo management application for KDE, which @@ -137,88 +130,47 @@ by directory layout, or by custom collections. An easy-to-use interface that enables you to connect to your camera and preview, download, or delete your images, is provided. -%package doc -Summary: Documentation of Digikam -License: GFDL-1.2-only -Group: Documentation/HTML -BuildArch: noarch - -%description doc -This package contains the documentation for digikam - -%package -n kipi-plugins -Summary: KDE Plug-Ins for Image Manipulation -License: GPL-2.0-or-later -Group: Productivity/Graphics/Other -Recommends: ImageMagick -Recommends: enblend-enfuse -Recommends: hugin -Recommends: kipi-plugins-lang = %{version} -Obsoletes: kipi-plugins-acquireimage < %{version} -Obsoletes: kipi-plugins-geolocation < %{version} -Obsoletes: kipi-plugins5 < %{version} -Provides: kipi-plugins5 = %{version} -Obsoletes: kipi-plugin-icons < %{version} -Provides: kipi-plugin-icons = %{version} - -%description -n kipi-plugins -A set of plug-ins for the KDE KIPI interface, used by some KDE imaging -applications. - %package -n showfoto Summary: DigiKam: Showfoto -License: GPL-2.0-or-later Group: Productivity/Graphics/Viewers Supplements: %{name} %description -n showfoto Additional program to browse and view photos -%package -n libdigikamcore5 +%package -n libdigikamcore%{soversion} Summary: The main digikam libraries -License: GPL-2.0-or-later Group: Development/Libraries/KDE -%description -n libdigikamcore5 +%description -n libdigikamcore%{soversion} The main digikam libraries that are being shared between showfoto and digikam %lang_package -%lang_package -n kipi-plugins - %prep -%setup -q -n %{name}-%{version} -%ifarch %arm aarch64 +%setup -q +%ifarch %{arm} aarch64 # Disable OpenGL slideshow on embedded platforms %patch0 -p1 %endif %if 0%{?suse_version} < 1320 %patch1 -p1 -%patch2 -p1 -%patch3 -p1 %endif -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 -%patch7 -p1 -%patch8 -p1 -%patch9 -p1 -%patch10 -p1 -%patch11 -p1 # Remove build time references so build-compare can do its work FAKE_BUILDDATE=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%b %%e %%Y') FAKE_BUILDTIME=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%H:%%M') sed -i "s/__DATE__/\"$FAKE_BUILDDATE\"/" core/app/utils/digikam_version.h.cmake.in -sed -i "s/__DATE__/\"$FAKE_BUILDDATE\"/g" extra/kipi-plugins/common/libkipiplugins/tools/kpversion.h.cmake.in sed -i "s/__DATE__/\"$FAKE_BUILDDATE\"/g" core/libs/dimg/filters/greycstoration/cimg/CImg.h sed -i "s/__TIME__/\"$FAKE_BUILDTIME\"/g" core/libs/dimg/filters/greycstoration/cimg/CImg.h -# Workaround for kde#369517 - vkontakte installs translations even if not built -rm -f po/*/kipiplugin_vkontakte.po - %build -%ifarch %ix86 x86_64 %arm aarch64 mips mips64 +%if 0%{?suse_version} < 1320 +# gcc 4.8.5 is too old +export CC=gcc-7 +export CXX=g++-7 +%endif +%ifarch %{ix86} x86_64 %{arm} aarch64 mips mips64 %cmake_kf5 -d build -- -DENABLE_APPSTYLES=ON -DENABLE_MEDIAPLAYER=ON -DENABLE_QWEBENGINE=ON %else %cmake_kf5 -d build -- -DENABLE_APPSTYLES=ON -DENABLE_MEDIAPLAYER=ON @@ -232,80 +184,58 @@ rm -f po/*/kipiplugin_vkontakte.po rm -f %{buildroot}%{_kf5_libdir}/libdigikamcore.so rm -f %{buildroot}%{_kf5_libdir}/libdigikamdatabase.so rm -f %{buildroot}%{_kf5_libdir}/libdigikamgui.so -rm -f %{buildroot}%{_kf5_libdir}/libKF5kipiplugins.so %if 0%{?suse_version} %suse_update_desktop_file -r org.kde.digikam Qt KDE Graphics Photography %suse_update_desktop_file -r org.kde.showfoto Qt KDE Graphics Photography %endif +%if %{with lang} %find_lang %{name} --without-kde -%find_lang kipiplugins kipiplugin.lang --without-kde +%endif -for i in dropbox googleservices sendimages facebook flashexport flickr imageshack imgur kmlexport piwigo printimages rajce remotestorage sendimages smug yandexfotki -do - %find_lang kipiplugin_$i kipiplugin.lang -done +%fdupes %{buildroot} -%fdupes -s %{buildroot} - -%post -n libdigikamcore5 -p /sbin/ldconfig - -%postun -n libdigikamcore5 -p /sbin/ldconfig - -%post -n kipi-plugins -p /sbin/ldconfig - -%postun -n kipi-plugins -p /sbin/ldconfig +%post -n libdigikamcore%{soversion} -p /sbin/ldconfig +%postun -n libdigikamcore%{soversion} -p /sbin/ldconfig %files -%{_bindir}/digikam -%{_bindir}/digitaglinktree -%{_bindir}/cleanup_digikamdb +%{_kf5_bindir}/digikam +%{_kf5_bindir}/digitaglinktree +%{_kf5_bindir}/cleanup_digikamdb %{_kf5_applicationsdir}/org.kde.digikam.desktop -%_kf5_iconsdir/hicolor/*/apps/digikam.* -%_kf5_iconsdir/hicolor/*/apps/expoblending.* -%_kf5_iconsdir/hicolor/*/actions/ -%_datadir/digikam/ -%dir %_datadir/solid -%dir %_datadir/solid/actions -%_datadir/solid/actions/digikam-opencamera.desktop -%_datadir/kxmlgui5/digikam/ -%_datadir/knotifications5/digikam.notifyrc +%{_kf5_iconsdir}/hicolor/*/actions/ +%{_kf5_iconsdir}/hicolor/*/apps/digikam.* +%{_kf5_iconsdir}/hicolor/*/apps/dk-* +%{_kf5_iconsdir}/hicolor/*/apps/expoblending.* +%{_kf5_iconsdir}/hicolor/*/apps/panorama.* +%doc %{_kf5_mandir}/man1/cleanup_digikamdb.1%{ext_man} +%doc %{_kf5_mandir}/man1/digitaglinktree.1%{ext_man} +%{_kf5_sharedir}/digikam/ +%dir %{_kf5_sharedir}/solid +%dir %{_kf5_sharedir}/solid/actions +%{_kf5_sharedir}/solid/actions/digikam-opencamera.desktop +%{_kf5_kxmlguidir}/digikam/ +%{_kf5_notifydir}/digikam.notifyrc %{_kf5_appstreamdir}/org.kde.digikam.appdata.xml -%_kf5_iconsdir/hicolor/*/apps/panorama.* %files -n showfoto -%{_bindir}/showfoto +%{_kf5_bindir}/showfoto %{_kf5_applicationsdir}/org.kde.showfoto.desktop -%_kf5_iconsdir/hicolor/*/apps/showfoto.* -%_datadir/showfoto/ -%_datadir/kxmlgui5/showfoto/ +%{_kf5_iconsdir}/hicolor/*/apps/showfoto.* +%{_kf5_sharedir}/showfoto/ +%{_kf5_kxmlguidir}/showfoto/ %{_kf5_appstreamdir}/org.kde.showfoto.appdata.xml -%files -n libdigikamcore5 +%files -n libdigikamcore%{soversion} %license COPYING* -%doc core/{AUTHORS,ChangeLog,NEWS,README.md} -%{_libdir}/libdigikam*.so* - -%files doc -%license doc/COPYING.DOC -%doc %{_mandir}/man1/cleanup_digikamdb.1%{ext_man} -%doc %{_mandir}/man1/digitaglinktree.1%{ext_man} -%doc %{_kf5_htmldir}/*/ +%doc AUTHORS ChangeLog NEWS README.md +%{_kf5_libdir}/libdigikamcore.so.%{soversion}.* +%{_kf5_libdir}/libdigikamdatabase.so.%{soversion}.* +%{_kf5_libdir}/libdigikamgui.so.%{soversion}.* +%if %{with lang} %files lang -f %{name}.lang - -%files -n kipi-plugins -%license COPYING* -%doc extra/kipi-plugins/{AUTHORS,ChangeLog,NEWS,README,TODO} -%_libdir/libKF5kipiplugins.so* -%{_kf5_plugindir}/kipiplugin_*.so -%{_kf5_applicationsdir}/kipiplugins.desktop -%{_kf5_iconsdir}/hicolor/*/apps/kipi-*.* -%{_datadir}/kipiplugin_*/ -%{_kf5_servicesdir}/kipiplugin_*.desktop -%{_kf5_kxmlguidir}/kipi/ - -%files -n kipi-plugins-lang -f kipiplugin.lang +%endif %changelog diff --git a/f27ab9c1051bd0a0.patch b/f27ab9c1051bd0a0.patch deleted file mode 100644 index 7177d6a..0000000 --- a/f27ab9c1051bd0a0.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 516128e999abbd57913b076dec019f899c07da3d Mon Sep 17 00:00:00 2001 -From: Gilles Caulier -Date: Sun, 7 Oct 2018 18:39:10 +0200 -Subject: there is a mess in exiv2 headers 0.27.0, between version.hpp and - exv_con.h We cannot use the macro defined in version.hpp to include this - file... - ---- - core/libs/dmetadata/metaengine_exif.cpp | 4 ++++ - core/libs/dmetadata/metaengine_p.h | 18 ++++++------------ - 2 files changed, 10 insertions(+), 12 deletions(-) - -diff --git a/core/libs/dmetadata/metaengine_exif.cpp b/core/libs/dmetadata/metaengine_exif.cpp -index 079fa96..73af582 100644 ---- a/core/libs/dmetadata/metaengine_exif.cpp -+++ b/core/libs/dmetadata/metaengine_exif.cpp -@@ -995,7 +995,11 @@ bool MetaEngine::setTiffThumbnail(const QImage& thumbImage) const - - if (pos == d->exifMetadata().end() || pos->count() != 1 || pos->toLong() != 0) - { -+#if EXIV2_TEST_VERSION(0,27,0) -+ throw Exiv2::Error(Exiv2::kerErrorMessage, "Exif.Image.NewSubfileType missing or not set as main image"); -+#else - throw Exiv2::Error(1, "Exif.Image.NewSubfileType missing or not set as main image"); -+#endif - } - - // Remove sub-IFD tags -diff --git a/core/libs/dmetadata/metaengine_p.h b/core/libs/dmetadata/metaengine_p.h -index 9e234f2..157b63f 100644 ---- a/core/libs/dmetadata/metaengine_p.h -+++ b/core/libs/dmetadata/metaengine_p.h -@@ -72,21 +72,19 @@ - #include - #include - -+#if (((EXIV2_MAJOR_VERSION) << 16) | ((EXIV2_MINOR_VERSION) << 8) | (EXIV2_PATCH_VERSION)) >= (((0) << 16) | ((27) << 8) | (0)) -+# include -+#endif -+ - // Check if Exiv2 support XMP - - #ifdef EXV_HAVE_XMP_TOOLKIT - # define _XMP_SUPPORT_ 1 - #endif - --// Make sure an EXIV2_TEST_VERSION macro exists: -- --#ifdef EXIV2_VERSION --# ifndef EXIV2_TEST_VERSION --# define EXIV2_TEST_VERSION(major,minor,patch) \ -+#ifndef EXIV2_TEST_VERSION -+# define EXIV2_TEST_VERSION(major,minor,patch) \ - ( EXIV2_VERSION >= EXIV2_MAKE_VERSION(major,minor,patch) ) --# endif --#else --# define EXIV2_TEST_VERSION(major,minor,patch) (false) - #endif - - // With exiv2 > 0.20.0, all makernote header files have been removed to increase binary compatibility. --- -cgit v1.1 - diff --git a/first-patch-to-be-compatible-with-Exiv2-0.27.patch b/first-patch-to-be-compatible-with-Exiv2-0.27.patch deleted file mode 100644 index a9ff557..0000000 --- a/first-patch-to-be-compatible-with-Exiv2-0.27.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 7c8c0e44adcaadb342e85c66df79d53bd561ebc7 Mon Sep 17 00:00:00 2001 -From: Gilles Caulier -Date: Sun, 7 Oct 2018 11:33:06 +0200 -Subject: first patch to be compatible with Exiv2 0.27 - ---- - core/libs/dmetadata/metaengine.cpp | 7 ++++--- - core/libs/dmetadata/metaengine_p.h | 1 + - 2 files changed, 5 insertions(+), 3 deletions(-) - -diff --git a/core/libs/dmetadata/metaengine.cpp b/core/libs/dmetadata/metaengine.cpp -index eb1a1a0..833c807 100644 ---- a/core/libs/dmetadata/metaengine.cpp -+++ b/core/libs/dmetadata/metaengine.cpp -@@ -152,10 +152,11 @@ bool MetaEngine::supportMetadataWritting(const QString& typeMime) - - QString MetaEngine::Exiv2Version() - { -- // Since 0.14.0 release, we can extract run-time version of Exiv2. -- // else we return make version. -- -+#if EXIV2_TEST_VERSION(0,27,0) -+ return QLatin1String(Exiv2::versionString().c_str()); -+#else - return QString::fromLatin1(Exiv2::version()); -+#endif - } - - QString MetaEngine::sidecarFilePathForFile(const QString& path) -diff --git a/core/libs/dmetadata/metaengine_p.h b/core/libs/dmetadata/metaengine_p.h -index 79f35e9..bf75e4a 100644 ---- a/core/libs/dmetadata/metaengine_p.h -+++ b/core/libs/dmetadata/metaengine_p.h -@@ -60,6 +60,7 @@ - #endif - - #include -+#include - #include - #include - #include --- -cgit v1.1 - diff --git a/fix-black-Welcome-page-by-clicking-on-a-link.patch b/fix-black-Welcome-page-by-clicking-on-a-link.patch deleted file mode 100644 index 3388127..0000000 --- a/fix-black-Welcome-page-by-clicking-on-a-link.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 60721615dd9af2b81dacce06adaa7e31d56eee32 Mon Sep 17 00:00:00 2001 -From: Maik Qualmann -Date: Sat, 1 Dec 2018 16:34:41 +0100 -Subject: fix black Welcome page by clicking on a link REVIEW: D17276 - ---- - core/app/views/welcomepageview_qwebengine.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/core/app/views/welcomepageview_qwebengine.cpp b/core/app/views/welcomepageview_qwebengine.cpp -index 2dfe2c6..d4ee8c5 100644 ---- a/core/app/views/welcomepageview_qwebengine.cpp -+++ b/core/app/views/welcomepageview_qwebengine.cpp -@@ -115,7 +115,7 @@ WelcomePageView::~WelcomePageView() - - void WelcomePageView::slotUrlOpen(const QUrl& url) - { -- WebBrowserDlg* const browser = new WebBrowserDlg(url, this); -+ WebBrowserDlg* const browser = new WebBrowserDlg(url, qApp->activeWindow()); - browser->show(); - } - --- -cgit v0.11.2 - diff --git a/fix-compile.patch b/fix-compile.patch deleted file mode 100644 index 21fd09c..0000000 --- a/fix-compile.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 8a12ffc60e2f2a59a60355824ba51370b0a20acd Mon Sep 17 00:00:00 2001 -From: Maik Qualmann -Date: Sun, 7 Oct 2018 15:39:32 +0200 -Subject: fix compile - ---- - core/libs/dmetadata/metaengine_p.h | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -(limited to 'core/libs/dmetadata/metaengine_p.h') - -diff --git a/core/libs/dmetadata/metaengine_p.h b/core/libs/dmetadata/metaengine_p.h -index bf75e4a..9e234f2 100644 ---- a/core/libs/dmetadata/metaengine_p.h -+++ b/core/libs/dmetadata/metaengine_p.h -@@ -61,7 +61,6 @@ - #endif - - #include --#include - #include - #include - #include -@@ -98,6 +97,10 @@ - # pragma GCC visibility pop - #endif - -+#if EXIV2_TEST_VERSION(0,27,0) -+ #include -+#endif -+ - // End of Exiv2 headers ------------------------------------------------------ - - namespace Digikam --- -cgit v1.1 -