[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/4.4/kdebase/apps/konsole/src
From: Kurt Hindenburg <kurt.hindenburg () gmail ! com>
Date: 2010-02-24 4:28:44
Message-ID: 1266985724.045177.31454.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 1095365 by hindenburg:
Fix crash on removing key bindings. Patch by Dario Andres
CCBUG: 183069
M +16 -2 KeyBindingEditor.cpp
--- branches/KDE/4.4/kdebase/apps/konsole/src/KeyBindingEditor.cpp #1095364:1095365
@@ -71,12 +71,26 @@
void KeyBindingEditor::removeSelectedEntry()
{
- QListIterator<QTableWidgetItem*> iter( _ui->keyBindingTable->selectedItems() );
+ QList<QTableWidgetItem*> selectedList = _ui->keyBindingTable->selectedItems();
+ QList<QTableWidgetItem*> uniqueList;
+
+ //Filter unique items
+ QListIterator<QTableWidgetItem*> iter( selectedList );
+ while ( iter.hasNext() )
+ {
+ QTableWidgetItem* item = iter.next();
+ if (item->column() == 1) //Select item at the first column
+ item = _ui->keyBindingTable->item(item->row(),0);
+ if ( !uniqueList.contains(item) )
+ uniqueList.append(item);
+ }
+
+ iter = QListIterator<QTableWidgetItem*>( uniqueList );
while ( iter.hasNext() )
{
// get the first item in the row which has the entry
- QTableWidgetItem* item = _ui->keyBindingTable->item(iter.next()->row(),0);
+ QTableWidgetItem* item = iter.next();
KeyboardTranslator::Entry existing = item->data(Qt::UserRole).
value<KeyboardTranslator::Entry>();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic