[kdebase] rebase folderview/rename patch (kde#270414)
Rex Dieter
rdieter at fedoraproject.org
Sun Oct 9 02:28:26 UTC 2011
commit 3c52cc8a0e7a07d85652fa16b4d774e38b450d89
Author: Rex Dieter <rdieter at fedoraproject.org>
Date: Sat Oct 8 21:35:26 2011 -0500
rebase folderview/rename patch (kde#270414)
kde-baseapps-4.7.2-kdebug270414.patch | 58 +++++++++++++++++++++++++++++++++
kdebase.spec | 8 ++++-
2 files changed, 65 insertions(+), 1 deletions(-)
---
diff --git a/kde-baseapps-4.7.2-kdebug270414.patch b/kde-baseapps-4.7.2-kdebug270414.patch
new file mode 100644
index 0000000..99cf6e8
--- /dev/null
+++ b/kde-baseapps-4.7.2-kdebug270414.patch
@@ -0,0 +1,58 @@
+diff -up kde-baseapps-4.7.2/plasma/applets/folderview/itemeditor.cpp.foo kde-baseapps-4.7.2/plasma/applets/folderview/itemeditor.cpp
+--- kde-baseapps-4.7.2/plasma/applets/folderview/itemeditor.cpp.foo 2011-05-20 15:33:30.000000000 -0500
++++ kde-baseapps-4.7.2/plasma/applets/folderview/itemeditor.cpp 2011-10-08 21:20:48.414176661 -0500
+@@ -29,7 +29,8 @@
+ ItemEditor::ItemEditor(QGraphicsWidget *parent, const QStyleOptionViewItemV4 &option,
+ const QModelIndex &index)
+ : QGraphicsProxyWidget(parent),
+- m_index(index)
++ m_index(index),
++ m_uncommitted(true)
+ {
+ // Create the editor
+ m_editor = new KTextEdit();
+@@ -66,14 +67,18 @@ ItemEditor::~ItemEditor()
+
+ void ItemEditor::commitData()
+ {
+- const_cast<QAbstractItemModel*>(m_index.model())->setData(m_index, m_editor->toPlainText(), Qt::EditRole);
++ if (m_uncommitted) {
++ const_cast<QAbstractItemModel*>(m_index.model())->setData(m_index, m_editor->toPlainText(), Qt::EditRole);
++ m_uncommitted = false;
++ }
+ }
+
+ bool ItemEditor::eventFilter(QObject *watched, QEvent *event)
+ {
+ KTextEdit *editor = qobject_cast<KTextEdit*>(watched);
+- if (!editor)
++ if (!editor) {
+ return false;
++ }
+
+ switch (event->type())
+ {
+@@ -107,8 +112,10 @@ bool ItemEditor::eventFilter(QObject *wa
+
+ case QEvent::FocusOut:
+ {
+- commitData();
+- emit closeEditor(this, QAbstractItemDelegate::NoHint);
++ if (m_uncommitted) {
++ commitData();
++ emit closeEditor(this, QAbstractItemDelegate::NoHint);
++ }
+ return true;
+ }
+
+diff -up kde-baseapps-4.7.2/plasma/applets/folderview/itemeditor.h.foo kde-baseapps-4.7.2/plasma/applets/folderview/itemeditor.h
+--- kde-baseapps-4.7.2/plasma/applets/folderview/itemeditor.h.foo 2011-05-20 15:33:30.000000000 -0500
++++ kde-baseapps-4.7.2/plasma/applets/folderview/itemeditor.h 2011-10-08 21:20:49.359164876 -0500
+@@ -49,6 +49,7 @@ protected:
+ private:
+ KTextEdit *m_editor;
+ QModelIndex m_index;
++ bool m_uncommitted;
+ };
+
+ #endif
diff --git a/kdebase.spec b/kdebase.spec
index 9c5452b..2f0d7b8 100644
--- a/kdebase.spec
+++ b/kdebase.spec
@@ -2,7 +2,7 @@ Name: kdebase
Summary: KDE Core Applications
Epoch: 6
Version: 4.7.2
-Release: 1%{?dist}
+Release: 2%{?dist}
License: GPLv2
Group: User Interface/Desktops
@@ -25,6 +25,8 @@ Patch3: kdebase-4.4.0-konqueror-kde#228593.patch
Patch4: kdebase-4.3.4-bz#609039-chfn-parse.patch
## upstream patches
+# https://bugs.kde.org/270414
+Patch100: kde-baseapps-4.7.2-kdebug270414.patch
%ifnarch s390 s390x
Requires: eject
@@ -122,6 +124,7 @@ Requires: kdelibs4-devel kdepimlibs4-devel
%patch2 -p2 -b .home-icon
%patch3 -p2 -b .kde#228593
%patch4 -p2 -b .bz#631481
+%patch100 -p1 -b .kdebug270414
%build
@@ -278,6 +281,9 @@ fi
%changelog
+* Sat Oct 08 2011 Rex Dieter <rdieter at fedoraproject.org> 4.7.2-2
+- rebase folderview/rename patch (kde#270414)
+
* Tue Oct 04 2011 Rex Dieter <rdieter at fedoraproject.org> 4.7.2-1
- 4.7.2
More information about the scm-commits
mailing list