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

List:       kde-commits
Subject:    kdebase/konqueror/keditbookmarks
From:       Alexander Kellett <lypanov () kde ! org>
Date:       2003-10-19 19:08:40
[Download RAW message or body]

CVS commit by lypanov: 

ah, if the list is empty currentChanged can pass item == 0
thx for the fix laurent


  M +4 -3      listview.cpp   1.127


--- kdebase/konqueror/keditbookmarks/listview.cpp  #1.126:1.127
@@ -402,12 +402,13 @@ void ListView::fillWithGroup(KEBListView
 
 void ListView::handleCurrentChanged(KEBListView *lv, QListViewItem *item) {
-    // hasParent is paranoid, after some thinking remove it
+    if (!item)
+        return;
     KEBListViewItem *currentItem = static_cast<KEBListViewItem *>(item);
-    if (currentItem && !currentItem->isEmptyFolderPadder() && currentItem->bookmark().hasParent())
+    if (!currentItem->isEmptyFolderPadder() && currentItem->bookmark().hasParent())
         m_last_selection_address = 
               VALID_FIRST(selectedItems())
             ? selectedItems()->first()->bookmark().address()
             : currentItem->bookmark().address();
-    if (item && currentItem && m_splitView && lv == m_folderListView) {
+    if (m_splitView && lv == m_folderListView) {
         m_folderListView->setSelected(item, true);
         QString addr = currentItem->bookmark().address();


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

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