Summary: | The _Input Actions_ module in kontrolcenter crashes when selecting actions in the tree view box in a certain order | ||
---|---|---|---|
Product: | [Plasma] khotkeys | Reporter: | Daniel Adolfsson <adolfsson> |
Component: | general | Assignee: | Lubos Lunak <l.lunak> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | adrian.dziubek, ossi, ssstarduster, vlegacy |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: | khotkeysrc file |
Description
Daniel Adolfsson
2007-01-12 12:24:16 UTC
*** Bug 130872 has been marked as a duplicate of this bug. *** *** Bug 128172 has been marked as a duplicate of this bug. *** *** Bug 89182 has been marked as a duplicate of this bug. *** SVN commit 629444 by lunakl: Avoid various braindamage when deleting condition objects. BUG: 139962 BUG: 115109 M +11 -7 kcontrol/condition_list_widget.cpp M +10 -0 shared/conditions.cpp M +0 -6 shared/conditions.h M +1 -1 shared/khlistview.cpp --- branches/KDE/3.5/kdebase/khotkeys/kcontrol/condition_list_widget.cpp #629443:629444 @@ -84,8 +84,8 @@ void Condition_list_widget::clear_data() { comment_lineedit->clear(); + conditions.clear(); conditions_listview->clear(); - conditions.clear(); } void Condition_list_widget::set_data( const Condition_list* data_P ) @@ -96,8 +96,8 @@ return; } comment_lineedit->setText( data_P->comment()); + conditions.clear(); conditions_listview->clear(); - conditions.clear(); insert_listview_items( data_P, conditions_listview, NULL ); #ifdef KHOTKEYS_DEBUG kdDebug( 1217 ) << "Condition_list_widget::set_data():" << endl; @@ -278,12 +278,14 @@ if( parent1_P == NULL ) { parent2_P->setOpen( true ); - conditions.append( new_cond ); // we own it, not the listview + if( new_cond->parent() == NULL ) // own only toplevels, they own the rest + conditions.append( new_cond ); // we own it, not the listview return new Condition_list_item( parent2_P, after_P, new_cond ); } else { - conditions.append( new_cond ); // we own it, not the listview + if( new_cond->parent() == NULL ) + conditions.append( new_cond ); // we own it, not the listview return new Condition_list_item( parent1_P, after_P, new_cond ); } } @@ -312,9 +314,11 @@ Condition* old_cond = item_P->condition(); item_P->set_condition( new_condition ); int pos = conditions.find( old_cond ); - assert( pos >= 0 ); - conditions.remove( pos ); // we own it - conditions.insert( pos, new_condition ); + if( pos >= 0 ) + { + conditions.remove( pos ); // we own it + conditions.insert( pos, new_condition ); + } item_P->widthChanged( 0 ); conditions_listview->repaintItem( item_P ); } --- branches/KDE/3.5/kdebase/khotkeys/shared/conditions.cpp #629443:629444 @@ -133,6 +133,16 @@ cfg_P.setGroup( save_cfg_group ); } +Condition_list_base::~Condition_list_base() + { + while( !isEmpty()) + { + Condition* c = getFirst(); + remove( c ); + delete c; + } + } + void Condition_list_base::cfg_write( KConfig& cfg_P ) const { QString save_cfg_group = cfg_P.group(); --- branches/KDE/3.5/kdebase/khotkeys/shared/conditions.h #629443:629444 @@ -213,12 +213,6 @@ { } -inline -Condition_list_base::~Condition_list_base() - { - setAutoDelete( true ); - } - // Condition_list inline --- branches/KDE/3.5/kdebase/khotkeys/shared/khlistview.cpp #629443:629444 @@ -96,8 +96,8 @@ void KHListView::clearSelection() { - saved_current_item = NULL; KListView::clearSelection(); + slot_current_changed( currentItem()); } // items are often inserted using the QListViewItem constructor, Created attachment 25300 [details]
khotkeysrc file
Linux mymachinename 2.6.20-16-generic #2 SMP Tue Feb 12 05:41:34 UTC 2008 i686
GNU/Linux
Qt: 3.3.7
KDE: 3.5.6
KDE Control Center: 3.5.6
package: kcontrol 4:3.5.6-0ubuntu20.9
KHotKeys: 2.1
package: kdebase-bin 4:3.5.6-0ubuntu20.9
I just attached my khotkeysrc file which is causing a crash whenever I select my "back" and "forward" khotkeys... with this file, select group "fwd_bwd_buttons", then select the children alternately. I usually crash on the second item I select. It seems to vary, so YMMV. Linux mymachinename 2.6.20-16-generic #2 SMP Tue Feb 12 05:41:34 UTC 2008 i686 GNU/Linux Qt: 3.3.7 KDE: 3.5.6 KDE Control Center: 3.5.6 package: kcontrol 4:3.5.6-0ubuntu20.9 KHotKeys: 2.1 package: kdebase-bin 4:3.5.6-0ubuntu20.9 I went through the khotkeysrc file and made sure all the "Comments=" lines had a comment of some kind. The problem has disappeared, temporarily. *** Bug 136679 has been marked as a duplicate of this bug. *** |