From 851c182383c34fd4925677713bb5f6fd603c86a0 Mon Sep 17 00:00:00 2001 From: cniehaus Date: Sat, 04 Jan 2003 14:08:38 +0000 Subject: one typo ;) several bugfixes --- (limited to 'noncore/apps/odict/configdlg.cpp') diff --git a/noncore/apps/odict/configdlg.cpp b/noncore/apps/odict/configdlg.cpp index 33296e3..89bc6f6 100644 --- a/noncore/apps/odict/configdlg.cpp +++ b/noncore/apps/odict/configdlg.cpp @@ -91,7 +91,7 @@ void ConfigDlg::slotChangeMethod() if ( dlg.exec() == QDialog::Accepted ) { dlg.saveItem(); - QListViewItem *item = new QListViewItem( list ); + QListViewItem *item = list->selectedItem(); item->setText( 0 , dlg.nameLE->text() ); } else qDebug( "SearchMethodDlg abgebrochen" ); @@ -102,7 +102,14 @@ void ConfigDlg::slotChangeMethod() void ConfigDlg::slotDeleteMethod() { if ( list->selectedItem() ) + { + Config cfg ( "odict" ); + cfg.setGroup( "Method_"+list->selectedItem()->text(0) ); + cfg.clearGroup(); + //FIXME: this only removes the entries but not the group itself + list->takeItem( list->selectedItem() ); + } else qDebug("no item selected"); } -- cgit v0.9.0.2