Hello community,

here is the log from the commit of package krename for openSUSE:Factory checked 
in at 2020-10-02 17:38:29
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/krename (Old)
 and      /work/SRC/openSUSE:Factory/.krename.new.4249 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "krename"

Fri Oct  2 17:38:29 2020 rev:38 rq:839095 version:5.0.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/krename/krename.changes  2020-07-14 
07:58:30.325637289 +0200
+++ /work/SRC/openSUSE:Factory/.krename.new.4249/krename.changes        
2020-10-02 17:39:02.786800988 +0200
@@ -1,0 +2,11 @@
+Fri Oct  2 05:27:00 UTC 2020 - Wolfgang Bauer <[email protected]>
+
+- Add Close-the-app-if-the-progress-dialog-is-closed.patch to fix
+  krename not terminating after renaming (boo#1177221, kde#395084)
+
+-------------------------------------------------------------------
+Thu Aug 27 12:46:39 UTC 2020 - Christophe Giboudeaux <[email protected]>
+
+- Spec cleanup
+
+-------------------------------------------------------------------

New:
----
  Close-the-app-if-the-progress-dialog-is-closed.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ krename.spec ++++++
--- /var/tmp/diff_new_pack.yAwYxL/_old  2020-10-02 17:39:08.726804530 +0200
+++ /var/tmp/diff_new_pack.yAwYxL/_new  2020-10-02 17:39:08.730804532 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package krename
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -36,28 +36,30 @@
 Patch5:         lower-minimum-cmake-version.patch
 # PATCH-FIX-UPSTREAM
 Patch6:         use-local-cmake-modules-first.patch
+# PATCH-FIX-UPSTREAM
+Patch7:         Close-the-app-if-the-progress-dialog-is-closed.patch
 BuildRequires:  extra-cmake-modules
 BuildRequires:  freetype2-devel
-BuildRequires:  kcompletion-devel
-BuildRequires:  kconfig-devel
-BuildRequires:  kcoreaddons-devel
-BuildRequires:  kcrash-devel
-BuildRequires:  ki18n-devel
-BuildRequires:  kiconthemes-devel
-BuildRequires:  kio-devel
-BuildRequires:  kitemviews-devel
-BuildRequires:  kjobwidgets-devel
-BuildRequires:  kjs-devel
-BuildRequires:  kservice-devel
-BuildRequires:  kwidgetsaddons-devel
-BuildRequires:  kxmlgui-devel
 BuildRequires:  libexiv2-devel
 BuildRequires:  libpodofo-devel
 BuildRequires:  pkgconfig
 BuildRequires:  update-desktop-files
-BuildRequires:  pkgconfig(Qt5Core)
-BuildRequires:  pkgconfig(Qt5Test)
-BuildRequires:  pkgconfig(Qt5Widgets)
+BuildRequires:  cmake(KF5Completion)
+BuildRequires:  cmake(KF5Config)
+BuildRequires:  cmake(KF5CoreAddons)
+BuildRequires:  cmake(KF5Crash)
+BuildRequires:  cmake(KF5I18n)
+BuildRequires:  cmake(KF5IconThemes)
+BuildRequires:  cmake(KF5ItemViews)
+BuildRequires:  cmake(KF5JS)
+BuildRequires:  cmake(KF5JobWidgets)
+BuildRequires:  cmake(KF5KIO)
+BuildRequires:  cmake(KF5Service)
+BuildRequires:  cmake(KF5WidgetsAddons)
+BuildRequires:  cmake(KF5XmlGui)
+BuildRequires:  cmake(Qt5Core)
+BuildRequires:  cmake(Qt5Test)
+BuildRequires:  cmake(Qt5Widgets)
 BuildRequires:  pkgconfig(taglib)
 
 %description
@@ -67,14 +69,13 @@
 creation date or Exif information of an image.
 
 %prep
-%setup -q
+%autosetup -p1
 # GPLv2 only code, not really needed, lets avoid the license discussion
 rm -rf src/modeltest.*
-%autopatch -p1
 
 %build
 %cmake_kf5 -d build
-%make_jobs
+%cmake_build
 
 %install
 %kf5_makeinstall -C build
@@ -85,9 +86,6 @@
 %files -f %{name}.lang
 %license COPYING
 %doc AUTHORS README.md TODO
-%if 0%{?suse_version} == 1315 && 0%{?sle_version} == 120100
-%dir %{_kf5_appstreamdir}
-%endif
 %{_kf5_applicationsdir}/org.kde.krename.desktop
 %{_kf5_appstreamdir}/org.kde.krename.appdata.xml
 %{_kf5_bindir}/krename

++++++ Close-the-app-if-the-progress-dialog-is-closed.patch ++++++
>From 11abc9b6877fd5dfae2a0c9d403dda1732e6f14f Mon Sep 17 00:00:00 2001
From: Heiko Becker <[email protected]>
Date: Wed, 20 Jun 2018 17:09:16 +0200
Subject: [PATCH] Close the app if the progress dialog is closed

BUG: 395084
---
 src/progressdialog.cpp | 13 +++++++++++++
 src/progressdialog.h   |  3 +++
 2 files changed, 16 insertions(+)

diff --git a/src/progressdialog.cpp b/src/progressdialog.cpp
index 538b355..8057067 100644
--- a/src/progressdialog.cpp
+++ b/src/progressdialog.cpp
@@ -45,6 +45,8 @@ ProgressDialog::ProgressDialog(ESplitMode eSplitMode, 
unsigned int dot, QWidget
             this, &ProgressDialog::slotOpenDestination);
     connect(m_buttonUndo, &QPushButton::clicked,
             this, &ProgressDialog::slotUndo);
+    connect(m_buttonClose, &QPushButton::clicked,
+            qApp, &QApplication::quit, Qt::QueuedConnection);
 
     QMenu *menu = new QMenu(this);
     menu->addAction(i18n("Restart &KRename..."), this, 
SLOT(slotRestartKRename()));
@@ -156,6 +158,17 @@ void ProgressDialog::renamingDone(bool enableMore, bool 
enableUndo, BatchRenamer
     m_renamer = renamer;
 }
 
+void ProgressDialog::closeEvent(QCloseEvent *event)
+{
+    // KRenameWindow is still around but hidden. When we close this dialog we
+    // want to quit the app completely if there isn't some operation still
+    // running.
+    if (m_buttonClose->isEnabled()) {
+        qApp->quit();
+        QWidget::closeEvent(event);
+    }
+}
+
 void ProgressDialog::print(const QString &text, const QString &pixmap)
 {
     QPixmap icon = SmallIcon(pixmap);
diff --git a/src/progressdialog.h b/src/progressdialog.h
index 25ee13e..84994fb 100644
--- a/src/progressdialog.h
+++ b/src/progressdialog.h
@@ -103,6 +103,9 @@ public:
      */
     void renamingDone(bool enableMore, bool enableUndo, BatchRenamer *renamer, 
int errors);
 
+protected:
+    void closeEvent(QCloseEvent *event) override;
+
 private Q_SLOTS:
     /** Called when the user cancels the operation
      */
-- 
GitLab


Reply via email to