From 08de5e9fc75a6c6d4ff6625d721cee0eae865d346a03ed38edd7b86d5ac9aee3 Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Sun, 12 Jan 2020 15:02:06 +0000 Subject: [PATCH] Accepting request 762948 from home:z1trus:branches:X11:LXQt - Add patch "fix_query_cancellation_error.patch" from upstream, fixed harmless pop-up error message (See https://github.com/lxqt/pcmanfm-qt/issues/1041) - Fixed comments for previous declined request OBS-URL: https://build.opensuse.org/request/show/762948 OBS-URL: https://build.opensuse.org/package/show/X11:LXQt/libfm-qt?expand=0&rev=19 --- fix_query_cancellation_error.patch | 33 ++++++++++++++++++++++++++++++ libfm-qt.changes | 6 ++++++ libfm-qt.spec | 4 ++++ 3 files changed, 43 insertions(+) create mode 100644 fix_query_cancellation_error.patch diff --git a/fix_query_cancellation_error.patch b/fix_query_cancellation_error.patch new file mode 100644 index 0000000..f50340d --- /dev/null +++ b/fix_query_cancellation_error.patch @@ -0,0 +1,33 @@ +From 4b7896836e868f069009e65ab75051ab64a1d583 Mon Sep 17 00:00:00 2001 +From: Tsu Jan +Date: Fri, 6 Dec 2019 02:53:33 +0330 +Subject: [PATCH] Set info query cancellation error to mild in dir list job +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fixes https://github.com/lxqt/pcmanfm-qt/issues/1041 + +For some reason, that error may happen with MTP, in which case, pcmanfm-qt shouldn't show an annoying and useless error message (pcmanfm-qt only shows errors with severalties greater than `ErrorSeverity::MILD`). Moreover, if it happens in another case, the message will be useless — although I haven't encountered it without MTP. + +SIDE NOTE: The current patch can be seen as the followup of an old patch, which fixed a similar issue: https://github.com/lxqt/libfm-qt/commit/670d80631b20f74eec9ffc984baf12c353398783 +--- + src/core/dirlistjob.cpp | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/core/dirlistjob.cpp b/src/core/dirlistjob.cpp +index d3058b1..5a7bba4 100644 +--- a/src/core/dirlistjob.cpp ++++ b/src/core/dirlistjob.cpp +@@ -30,7 +30,9 @@ void DirListJob::exec() { + false + }; + if(!dir_inf) { +- ErrorAction act = emitError(err, ErrorSeverity::MODERATE); ++ ErrorAction act = emitError(err, err.domain() == G_IO_ERROR && err.code() == G_IO_ERROR_CANCELLED ++ ? ErrorSeverity::MILD // may happen with MTP ++ : ErrorSeverity::MODERATE); + if(act == ErrorAction::RETRY) { + err.reset(); + goto _retry; + diff --git a/libfm-qt.changes b/libfm-qt.changes index 38d1aa9..6c26139 100644 --- a/libfm-qt.changes +++ b/libfm-qt.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sun Jan 5 13:22:07 UTC 2020 - Namor Barcode + +- Add patch "fix_query_cancellation_error.patch" from upstream, + fixed harmless pop-up error message (See https://github.com/lxqt/pcmanfm-qt/issues/1041) + ------------------------------------------------------------------- Mon Feb 25 10:02:03 UTC 2019 - mvetter@suse.com diff --git a/libfm-qt.spec b/libfm-qt.spec index 7078e77..fa3a5cc 100644 --- a/libfm-qt.spec +++ b/libfm-qt.spec @@ -26,6 +26,9 @@ URL: http://lxqt.org Source: https://github.com/lxde/%{name}/releases/download/%{version}/%{name}-%{version}.tar.xz Source1: https://github.com/lxde/%{name}/releases/download/%{version}/%{name}-%{version}.tar.xz.asc Source2: libfm-qt.keyring +# Fixed in upstream https://github.com/lxqt/libfm-qt/commit/4b7896836e868f069009e65ab75051ab64a1d583 +# Drop the patch after new version release. +Patch0: fix_query_cancellation_error.patch BuildRequires: cmake >= 3.1.0 # Needs private headers, see xdndworkaround.cpp BuildRequires: libQt5Gui-private-headers-devel @@ -75,6 +78,7 @@ Libfm-Qt libraries for development %prep %setup -q +%patch0 -p1 %build %cmake -DPULL_TRANSLATIONS=No