Hello community,

here is the log from the commit of package kdebase4 for openSUSE:Factory
checked in at Tue Oct 11 16:55:58 CEST 2011.



--------
--- openSUSE:Factory/kdebase4/kdebase4.changes  2011-10-07 00:48:10.000000000 
+0200
+++ /mounts/work_src_done/STABLE/kdebase4/kdebase4.changes      2011-10-08 
12:45:46.000000000 +0200
@@ -1,0 +2,5 @@
+Sat Oct  8 10:41:49 UTC 2011 - [email protected]
+
+- fix renaming files in folderview-widget (bnc#722684)
+
+-------------------------------------------------------------------

calling whatdependson for head-i586


New:
----
  bnc722684-fix-renaming-in-folderview.diff

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

Other differences:
------------------
++++++ kdebase4.spec ++++++
--- /var/tmp/diff_new_pack.jChDBB/_old  2011-10-11 16:55:53.000000000 +0200
+++ /var/tmp/diff_new_pack.jChDBB/_new  2011-10-11 16:55:53.000000000 +0200
@@ -29,6 +29,7 @@
 Source2:        rpmlintrc
 Source3:        dolphinsu.desktop
 Patch1:         dolphin-go_up.diff
+Patch2:         bnc722684-fix-renaming-in-folderview.diff
 BuildRequires:  NetworkManager-devel
 BuildRequires:  bluez-devel
 BuildRequires:  fdupes
@@ -52,6 +53,7 @@
 %prep
 %setup -q -n kde-baseapps-%{version}
 %patch1
+%patch2
 
 %build
   %cmake_kde4 -d build

++++++ bnc722684-fix-renaming-in-folderview.diff ++++++
commit 1a284bb79e547f0789f02b202fa309823e6198b5
Author: Aaron Seigo <[email protected]>
Date:   Wed Sep 21 15:00:39 2011 +0200

    only try to change the name once
    
    BUG:270414

Updated to match 4.7.2

 
diff --git a/plasma/applets/folderview/itemeditor.cpp 
b/plasma/applets/folderview/itemeditor.cpp
index 63febf6..3ff708a 100644
--- plasma/applets/folderview/itemeditor.cpp
+++ 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 *watched, QEvent 
*event)
 
     case QEvent::FocusOut:
     {
-        commitData();
-        emit closeEditor(this, QAbstractItemDelegate::NoHint);
+        if (m_uncommitted) {
+            commitData();
+            emit closeEditor(this, QAbstractItemDelegate::NoHint);
+        }
         return true;
     }
 
diff --git a/plasma/applets/folderview/itemeditor.h 
b/plasma/applets/folderview/itemeditor.h
index 3d54ea6..7ffa450 100644
--- plasma/applets/folderview/itemeditor.h
+++ plasma/applets/folderview/itemeditor.h
@@ -49,6 +49,7 @@ protected:
 private:
     KTextEdit *m_editor;
     QModelIndex m_index;
+    bool m_uncommitted;
 };
 
 #endif
continue with "q"...



Remember to have fun...

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to