[kdebase] Rename any file using folderview causes an error message (kde#270414)
Rex Dieter
rdieter at fedoraproject.org
Wed Sep 21 13:15:52 UTC 2011
commit 42f9dec12bcfe0124b6c914e31b9366732a358f3
Author: Rex Dieter <rdieter at fedoraproject.org>
Date: Wed Sep 21 08:15:41 2011 -0500
Rename any file using folderview causes an error message (kde#270414)
kde-baseapps-4.7.1-kdebug270414.patch | 99 +++++++++++++++++++++++++++++++++
kdebase.spec | 12 ++++-
2 files changed, 110 insertions(+), 1 deletions(-)
---
diff --git a/kde-baseapps-4.7.1-kdebug270414.patch b/kde-baseapps-4.7.1-kdebug270414.patch
new file mode 100644
index 0000000..4e00dc5
--- /dev/null
+++ b/kde-baseapps-4.7.1-kdebug270414.patch
@@ -0,0 +1,99 @@
+From: Aaron Seigo <aseigo at kde.org>
+Date: Wed, 21 Sep 2011 13:00:39 +0000
+Subject: only try to change the name once
+X-Git-Url: http://quickgit.kde.org/?p=kde-baseapps.git&a=commitdiff&h=1a284bb79e547f0789f02b202fa309823e6198b5
+---
+only try to change the name once
+
+BUG:270414
+---
+
+
+--- a/plasma/applets/folderview/iconview.cpp
++++ b/plasma/applets/folderview/iconview.cpp
+@@ -1380,8 +1380,9 @@ void IconView::updateEditorGeometry()
+ void IconView::renameSelectedIcon()
+ {
+ QModelIndex index = m_selectionModel->currentIndex();
+- if (!index.isValid())
++ if (!index.isValid()) {
+ return;
++ }
+
+ // Don't allow renaming of files the aren't visible in the view
+ const QRect rect = visualRect(index);
+@@ -1476,7 +1477,6 @@ void IconView::closeEditor(QWidget *edit
+ editor->hide();
+ editor->deleteLater();
+ m_editorIndex = QModelIndex();
+-
+ markAreaDirty(visibleArea());
+ }
+
+@@ -1494,7 +1494,6 @@ void IconView::closeEditor(QGraphicsWidg
+ }
+
+ m_editorIndex = QModelIndex();
+-
+ markAreaDirty(visibleArea());
+ }
+
+
+--- a/plasma/applets/folderview/itemeditor.cpp
++++ b/plasma/applets/folderview/itemeditor.cpp
+@@ -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;
+ }
+
+
+--- a/plasma/applets/folderview/itemeditor.h
++++ b/plasma/applets/folderview/itemeditor.h
+@@ -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 3646611..ddb89d5 100644
--- a/kdebase.spec
+++ b/kdebase.spec
@@ -2,7 +2,7 @@ Name: kdebase
Summary: KDE Core Applications
Epoch: 6
Version: 4.7.1
-Release: 1%{?dist}
+Release: 2%{?dist}
License: GPLv2
Group: User Interface/Desktops
@@ -10,6 +10,8 @@ URL: http://www.kde.org/
Source0: ftp://ftp.kde.org/pub/kde/stable/%{version}/src/kde-baseapps-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+## upstreamable patches
# search path for plugins
Patch0: kdebase-4.1.80-nsplugins-paths.patch
@@ -22,6 +24,10 @@ Patch3: kdebase-4.4.0-konqueror-kde#228593.patch
# Password & User account becomes non responding
Patch4: kdebase-4.3.4-bz#609039-chfn-parse.patch
+## upstream patches
+# http://quickgit.kde.org/?p=kde-baseapps.git&a=commit&h=1a284bb79e547f0789f02b202fa309823e6198b5
+Patch100: kde-baseapps-4.7.1-kdebug270414.patch
+
%ifnarch s390 s390x
Requires: eject
%endif
@@ -118,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
@@ -274,6 +281,9 @@ fi
%changelog
+* Wed Sep 21 2011 Rex Dieter <rdieter at fedoraproject.org> 6:4.7.1-2
+- Rename any file using folderview causes an error message (kde#270414)
+
* Fri Sep 02 2011 Than Ngo <than at redhat.com> - 6:4.7.1-1
- 4.7.1
More information about the scm-commits
mailing list