From 4f5ce9afdf5d64138fcef950146c7d24b6af6f678d342e7fe1d7d4abc76a6a0d Mon Sep 17 00:00:00 2001 From: Hrvoje Senjan Date: Thu, 17 Mar 2016 17:07:55 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/kio?expand=0&rev=128 --- 0001-Fix-crash-in-rename-dialog.patch | 54 +++++++++++++++++++++++++++ kio.changes | 5 +++ kio.spec | 3 ++ 3 files changed, 62 insertions(+) create mode 100644 0001-Fix-crash-in-rename-dialog.patch diff --git a/0001-Fix-crash-in-rename-dialog.patch b/0001-Fix-crash-in-rename-dialog.patch new file mode 100644 index 0000000..7c76cb5 --- /dev/null +++ b/0001-Fix-crash-in-rename-dialog.patch @@ -0,0 +1,54 @@ +From a5f62007c294220c13bb080287035aeab77ae640 Mon Sep 17 00:00:00 2001 +From: Emmanuel Pescosta +Date: Thu, 17 Mar 2016 10:28:09 +0100 +Subject: [PATCH] Fix crash in rename dialog +Content-Type: text/plain; charset="utf-8" +Content-Transfer-Encoding: 8bit + +ResizePanels must only be called in case of overwrite, all other cases violate +the preconditions. + +BUG: 360488 +--- + src/widgets/renamedialog.cpp | 11 ++++++++++- + 1 file changed, 10 insertions(+), 1 deletion(-) + +diff --git a/src/widgets/renamedialog.cpp b/src/widgets/renamedialog.cpp +index 2d456c7..cb3c0fb 100644 +--- a/src/widgets/renamedialog.cpp ++++ b/src/widgets/renamedialog.cpp +@@ -105,6 +105,8 @@ public: + m_destPendingPreview = false; + m_srcPreview = 0; + m_destPreview = 0; ++ m_srcArea = Q_NULLPTR; ++ m_destArea = Q_NULLPTR; + } + + void setRenameBoxText(const QString &fileName) +@@ -385,7 +387,9 @@ RenameDialog::RenameDialog(QWidget *parent, const QString &_caption, + + #if 1 // without kfilemetadata + // don't wait for kfilemetadata, but wait until the layouting is done +- QMetaObject::invokeMethod(this, "resizePanels", Qt::QueuedConnection); ++ if (_options & RenameDialog_Overwrite) { ++ QMetaObject::invokeMethod(this, "resizePanels", Qt::QueuedConnection); ++ } + #endif + } + +@@ -584,6 +588,11 @@ void RenameDialog::showDestPreview(const KFileItem &fileitem, const QPixmap &pix + + void RenameDialog::resizePanels() + { ++ Q_ASSERT(d->m_srcArea != Q_NULLPTR); ++ Q_ASSERT(d->m_destArea != Q_NULLPTR); ++ Q_ASSERT(d->m_srcPreview != Q_NULLPTR); ++ Q_ASSERT(d->m_destPreview != Q_NULLPTR); ++ + // using QDesktopWidget geometry as Kephal isn't accessible here in kdelibs + const QSize screenSize = QApplication::desktop()->availableGeometry(this).size(); + QSize halfSize = d->m_srcArea->widget()->sizeHint().expandedTo(d->m_destArea->widget()->sizeHint()); +-- +2.7.3 + diff --git a/kio.changes b/kio.changes index 4e78a2a..e04e2e2 100644 --- a/kio.changes +++ b/kio.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Mar 17 17:06:57 UTC 2016 - hrvoje.senjan@gmail.com + +- Added 0001-Fix-crash-in-rename-dialog.patch (kde#360488) + ------------------------------------------------------------------- Sun Mar 6 09:58:57 UTC 2016 - hrvoje.senjan@gmail.com diff --git a/kio.spec b/kio.spec index ca4a687..1240d95 100644 --- a/kio.spec +++ b/kio.spec @@ -75,6 +75,8 @@ Source: http://download.kde.org/stable/frameworks/%{_tar_path}/%{name}-% Source1: baselibs.conf # PATCH-FIX-OPENSUSE kio_help-fallback-to-kde4-docs.patch -- allow kio_help to see into kde4 documentation, needed especially for khelpcenter5 Patch0: kio_help-fallback-to-kde4-docs.patch +# PATCH-FIX-UPSTREAM 0001-Fix-crash-in-rename-dialog.patch +Patch1: 0001-Fix-crash-in-rename-dialog.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -121,6 +123,7 @@ Development files. %prep %setup -q %patch0 -p1 +%patch1 -p1 %build %cmake_kf5 -d build