[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [plasmate/terietor/kconfigxt] editors/kconfigxt: Delete the entries and the groups from the ui
From:       Giorgos Tsiapaliwkas <terietor () gmail ! com>
Date:       2012-07-14 17:22:55
Message-ID: 20120714172255.E83A2A6094 () git ! kde ! org
[Download RAW message or body]

Git commit a982b0217aee643c8839f2971ed36e39a605a1eb by Giorgos Tsiapaliwkas.
Committed on 11/07/2012 at 21:07.
Pushed by tsiapaliwkas into branch 'terietor/kconfigxt'.

Delete the entries and the groups from the ui

M  +7    -3    editors/kconfigxt/kconfigxteditor.cpp

http://commits.kde.org/plasmate/a982b0217aee643c8839f2971ed36e39a605a1eb

diff --git a/editors/kconfigxt/kconfigxteditor.cpp b/editors/kconfigxt/kconfigxteditor.cpp
index f725b88..5fa21b1 100644
--- a/editors/kconfigxt/kconfigxteditor.cpp
+++ b/editors/kconfigxt/kconfigxteditor.cpp
@@ -156,7 +156,7 @@ void KConfigXtEditor::takeDataFromParser(const QString& group)
                 m_keysValuesTypes = item;
             } else {
                 //we haven't specified a group.
-                //So we don't want populate the m_ui.twEntries.
+                //So we don't want to populate the m_ui.twEntries.
                 //clear the item.
                 m_keysValuesTypes = KConfigXtParserItem();
             }
@@ -194,7 +194,9 @@ void KConfigXtEditor::removeGroup()
     //take the current item of the tree
     QTreeWidgetItem *item = m_ui.twGroups->currentItem();
     if (removeElement(item->text(0), KConfigXtEditor::Group)) {
-        m_ui.twGroups->removeItemWidget(item, 0);
+        //remote the group from the ui,
+        //we have already deleted it from the xml file
+        delete m_ui.twGroups->currentItem();
     } else {
         removeError();
     }
@@ -205,7 +207,9 @@ void KConfigXtEditor::removeEntry()
     //take the current item of the tree
     QTreeWidgetItem *item = m_ui.twEntries->currentItem();
     if (removeElement(item->text(0), KConfigXtEditor::Entry)) {
-        m_ui.twEntries->removeItemWidget(item, 0);
+        //remote the entry from the ui,
+        //we have already deleted it from the xml file
+        delete m_ui.twEntries->currentItem();
     } else {
         removeError();
     }

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic