summaryrefslogtreecommitdiff
path: root/noncore/apps/odict/configdlg.cpp
Unidiff
Diffstat (limited to 'noncore/apps/odict/configdlg.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/odict/configdlg.cpp9
1 files changed, 8 insertions, 1 deletions
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()
91 if ( dlg.exec() == QDialog::Accepted ) 91 if ( dlg.exec() == QDialog::Accepted )
92 { 92 {
93 dlg.saveItem(); 93 dlg.saveItem();
94 QListViewItem *item = new QListViewItem( list ); 94 QListViewItem *item = list->selectedItem();
95 item->setText( 0 , dlg.nameLE->text() ); 95 item->setText( 0 , dlg.nameLE->text() );
96 } 96 }
97 else qDebug( "SearchMethodDlg abgebrochen" ); 97 else qDebug( "SearchMethodDlg abgebrochen" );
@@ -102,7 +102,14 @@ void ConfigDlg::slotChangeMethod()
102void ConfigDlg::slotDeleteMethod() 102void ConfigDlg::slotDeleteMethod()
103{ 103{
104 if ( list->selectedItem() ) 104 if ( list->selectedItem() )
105 {
106 Config cfg ( "odict" );
107 cfg.setGroup( "Method_"+list->selectedItem()->text(0) );
108 cfg.clearGroup();
109 //FIXME: this only removes the entries but not the group itself
110
105 list->takeItem( list->selectedItem() ); 111 list->takeItem( list->selectedItem() );
112 }
106 else qDebug("no item selected"); 113 else qDebug("no item selected");
107} 114}
108 115