Accepting request 501950 from KDE:Applications
KDE Applications 17.04.2 OBS-URL: https://build.opensuse.org/request/show/501950 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gwenview5?expand=0&rev=24
This commit is contained in:
commit
397ac507ac
@ -1,78 +0,0 @@
|
|||||||
From 4907c4b14b9152d27897998849c8121d04c440f5 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Wolfgang Bauer <wbauer@tmo.at>
|
|
||||||
Date: Thu, 11 May 2017 16:17:48 +0200
|
|
||||||
Subject: [PATCH] Avoid data loss when importing pictures
|
|
||||||
|
|
||||||
Fix porting regressions, which left users of Gwenview Importer with:
|
|
||||||
* failed import (import destination still empty)
|
|
||||||
* additionally (when choosing "Delete" instead of "Keep" after import):
|
|
||||||
pictures also removed from import source, with no way to recover
|
|
||||||
|
|
||||||
Correct additional problems remaining after fixing the import failure:
|
|
||||||
* hang on duplicate filenames
|
|
||||||
* identically named files with different content are never imported
|
|
||||||
* error dialog when deleting pictures from import source
|
|
||||||
|
|
||||||
BUG: 379615
|
|
||||||
|
|
||||||
Differential Revision: https://phabricator.kde.org/D5749
|
|
||||||
---
|
|
||||||
importer/fileutils.cpp | 5 ++++-
|
|
||||||
importer/importdialog.cpp | 2 +-
|
|
||||||
importer/importer.cpp | 4 ++--
|
|
||||||
3 files changed, 7 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/importer/fileutils.cpp b/importer/fileutils.cpp
|
|
||||||
index 5293d561..a51a18cf 100644
|
|
||||||
--- a/importer/fileutils.cpp
|
|
||||||
+++ b/importer/fileutils.cpp
|
|
||||||
@@ -128,7 +128,10 @@ RenameResult rename(const QUrl& src, const QUrl& dst_, QWidget* authWindow)
|
|
||||||
}
|
|
||||||
result = RenamedUnderNewName;
|
|
||||||
|
|
||||||
- dst.setPath(dst.path() + '/' + prefix + QString::number(count) + suffix);
|
|
||||||
+ dst.setPath(dst.adjusted(QUrl::RemoveFilename).path() + prefix + QString::number(count) + suffix);
|
|
||||||
+ statJob = KIO::stat(dst);
|
|
||||||
+ KJobWidgets::setWindow(statJob, authWindow);
|
|
||||||
+
|
|
||||||
++count;
|
|
||||||
}
|
|
||||||
|
|
||||||
diff --git a/importer/importdialog.cpp b/importer/importdialog.cpp
|
|
||||||
index ee6f7cd6..5e9e847c 100644
|
|
||||||
--- a/importer/importdialog.cpp
|
|
||||||
+++ b/importer/importdialog.cpp
|
|
||||||
@@ -121,7 +121,7 @@ public:
|
|
||||||
QList<QUrl> urls = importedUrls + skippedUrls;
|
|
||||||
while (true) {
|
|
||||||
KIO::Job* job = KIO::del(urls);
|
|
||||||
- if (!job->exec()) {
|
|
||||||
+ if (job->exec()) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
// Deleting failed
|
|
||||||
diff --git a/importer/importer.cpp b/importer/importer.cpp
|
|
||||||
index 51c4b964..a7e1d4ea 100644
|
|
||||||
--- a/importer/importer.cpp
|
|
||||||
+++ b/importer/importer.cpp
|
|
||||||
@@ -98,7 +98,7 @@ struct ImporterPrivate
|
|
||||||
}
|
|
||||||
mCurrentUrl = mUrlList.takeFirst();
|
|
||||||
QUrl dst = mTempImportDirUrl;
|
|
||||||
- dst.setPath(dst.path() + '/' + mCurrentUrl.fileName());
|
|
||||||
+ dst.setPath(dst.path() + mCurrentUrl.fileName());
|
|
||||||
KIO::Job* job = KIO::copy(mCurrentUrl, dst, KIO::HideProgressInfo);
|
|
||||||
KJobWidgets::setWindow(job, mAuthWindow);
|
|
||||||
QObject::connect(job, SIGNAL(result(KJob*)),
|
|
||||||
@@ -122,7 +122,7 @@ struct ImporterPrivate
|
|
||||||
} else {
|
|
||||||
fileName = src.fileName();
|
|
||||||
}
|
|
||||||
- dst.setPath(dst.path() + '/' + fileName);
|
|
||||||
+ dst.setPath(dst.path() + fileName);
|
|
||||||
|
|
||||||
FileUtils::RenameResult result = FileUtils::rename(src, dst, mAuthWindow);
|
|
||||||
switch (result) {
|
|
||||||
--
|
|
||||||
2.12.0
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:90d595035d3f69c21791830ac99a2419227c50f30a1ccbb453c5055e4227d011
|
|
||||||
size 5902528
|
|
3
gwenview-17.04.2.tar.xz
Normal file
3
gwenview-17.04.2.tar.xz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:2aeb9b571e30e597e0bacafd1fe8d9bccdc75c3c3c3e3a0904f6433506ef3775
|
||||||
|
size 5903852
|
@ -1,3 +1,21 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Jun 07 17:42:41 CEST 2017 - lbeltrame@kde.org
|
||||||
|
|
||||||
|
- Update to 17.04.2
|
||||||
|
* New bugfix release
|
||||||
|
* For more details please see:
|
||||||
|
* https://www.kde.org/announcements/announce-applications-17.04.2.php
|
||||||
|
- Changes since 17.04.1:
|
||||||
|
* Fix Enter and Escape keys in tool dialogs (crop, red eye) (kde#313806)
|
||||||
|
* Fixed persistence of "Show Status Bar" action status
|
||||||
|
* Add keyboard shortcut for statusbar toggling option
|
||||||
|
* Re-enable all tests
|
||||||
|
* Fix crop region size (kde#340459)
|
||||||
|
* Re-enable importertest
|
||||||
|
* Avoid data loss when importing pictures (kde#379615)
|
||||||
|
- Drop upstreamed patches:
|
||||||
|
* fix-importer.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed May 17 20:35:41 CEST 2017 - lbeltrame@kde.org
|
Wed May 17 20:35:41 CEST 2017 - lbeltrame@kde.org
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
%bcond_without lang
|
%bcond_without lang
|
||||||
|
|
||||||
Name: gwenview5
|
Name: gwenview5
|
||||||
Version: 17.04.1
|
Version: 17.04.2
|
||||||
Release: 0
|
Release: 0
|
||||||
%define kf5_version 5.26.0
|
%define kf5_version 5.26.0
|
||||||
# Latest stable Applications (e.g. 16.08 in KA, but 16.11.80 in KUA)
|
# Latest stable Applications (e.g. 16.08 in KA, but 16.11.80 in KUA)
|
||||||
@ -29,8 +29,6 @@ License: GPL-2.0+
|
|||||||
Group: Productivity/Graphics/Viewers
|
Group: Productivity/Graphics/Viewers
|
||||||
Url: http://www.kde.org
|
Url: http://www.kde.org
|
||||||
Source: gwenview-%{version}.tar.xz
|
Source: gwenview-%{version}.tar.xz
|
||||||
# PATCH-FIX-UPSTREAM fix-importer.patch kde#379615 -- fix problems with the importer that may even cause data loss
|
|
||||||
Patch: fix-importer.patch
|
|
||||||
BuildRequires: baloo5-devel
|
BuildRequires: baloo5-devel
|
||||||
BuildRequires: extra-cmake-modules >= %{kf5_version}
|
BuildRequires: extra-cmake-modules >= %{kf5_version}
|
||||||
BuildRequires: kactivities5-devel
|
BuildRequires: kactivities5-devel
|
||||||
@ -73,7 +71,6 @@ hierarchy.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n gwenview-%{version}
|
%setup -q -n gwenview-%{version}
|
||||||
%patch -p1
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%cmake_kf5 -d build -- -DGWENVIEW_SEMANTICINFO_BACKEND="Baloo"
|
%cmake_kf5 -d build -- -DGWENVIEW_SEMANTICINFO_BACKEND="Baloo"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user