From 8bce3cc07c4f41b63139991df170d7d6bd12c679 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Mar 31 2016 19:28:17 +0000 Subject: backport crash fix (kde#360488) --- diff --git a/0009-Fix-crash-in-rename-dialog.patch b/0009-Fix-crash-in-rename-dialog.patch new file mode 100644 index 0000000..bdb190f --- /dev/null +++ b/0009-Fix-crash-in-rename-dialog.patch @@ -0,0 +1,53 @@ +From bf37e9aa27a2321f4a6ce7188a0901fabd47c962 Mon Sep 17 00:00:00 2001 +From: Emmanuel Pescosta +Date: Thu, 17 Mar 2016 10:28:09 +0100 +Subject: [PATCH 09/19] Fix crash in rename dialog + +ResizePanels must only be called in case of overwrite, all other cases violate +the preconditions. + +BUG: 360488 +REVIEW: 127410 +--- + 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/kf5-kio.spec b/kf5-kio.spec index 0b58e90..308d7d3 100644 --- a/kf5-kio.spec +++ b/kf5-kio.spec @@ -2,7 +2,7 @@ Name: kf5-%{framework} Version: 5.20.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: KDE Frameworks 5 Tier 3 solution for filesystem abstraction License: GPLv2+ and MIT and BSD @@ -17,6 +17,9 @@ URL: http://projects.kde.org/kio %endif Source0: http://download.kde.org/%{stable}/frameworks/%{versiondir}/%{framework}-%{version}.tar.xz +## upstream patches +Patch9: 0009-Fix-crash-in-rename-dialog.patch + BuildRequires: extra-cmake-modules >= %{version} BuildRequires: kf5-karchive-devel >= %{version} BuildRequires: kf5-kbookmarks-devel >= %{version} @@ -256,6 +259,9 @@ fi %changelog +* Thu Mar 31 2016 Rex Dieter - 5.20.0-3 +- backport crash fix (kde#360488) + * Sat Mar 26 2016 Rex Dieter - 5.20.0-2 - -core: move Requires: -doc here (from empty main pkg)