Diffstat (limited to 'noncore/apps/opie-console/configdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/configdialog.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/noncore/apps/opie-console/configdialog.cpp b/noncore/apps/opie-console/configdialog.cpp index 23e94b1..655d649 100644 --- a/noncore/apps/opie-console/configdialog.cpp +++ b/noncore/apps/opie-console/configdialog.cpp | |||
@@ -57,26 +57,28 @@ Profile::ValueList ConfigDialog::list()const { | |||
57 | void ConfigDialog::slotRemove() { | 57 | void ConfigDialog::slotRemove() { |
58 | ConfigListItem* item = (ConfigListItem*)lstView->currentItem(); | 58 | ConfigListItem* item = (ConfigListItem*)lstView->currentItem(); |
59 | if (!item ) | 59 | if (!item ) |
60 | return; | 60 | return; |
61 | 61 | ||
62 | lstView->takeItem( item ); | 62 | lstView->takeItem( item ); |
63 | delete item; | 63 | delete item; |
64 | } | 64 | } |
65 | 65 | ||
66 | void ConfigDialog::slotEdit() { | 66 | void ConfigDialog::slotEdit() { |
67 | Profile p; | 67 | Profile p; |
68 | 68 | ||
69 | if(!lstView->currentItem()) return; | ||
70 | |||
69 | // Load profile | 71 | // Load profile |
70 | // p = currentItem()->profile(); | 72 | p = ((ConfigListItem*)lstView->currentItem())->profile(); |
71 | 73 | ||
72 | ProfileEditorDialog dlg(new MetaFactory(), p); | 74 | ProfileEditorDialog dlg(new MetaFactory(), p); |
73 | 75 | ||
74 | dlg.setCaption("Edit Connection Profile"); | 76 | dlg.setCaption("Edit Connection Profile"); |
75 | dlg.showMaximized(); | 77 | dlg.showMaximized(); |
76 | int ret = dlg.exec(); | 78 | int ret = dlg.exec(); |
77 | 79 | ||
78 | if(ret == QDialog::Accepted) | 80 | if(ret == QDialog::Accepted) |
79 | { | 81 | { |
80 | // if(listView->current()) delete lstView->current(); ... | 82 | // if(listView->current()) delete lstView->current(); ... |
81 | // use dlg.terminal()! | 83 | // use dlg.terminal()! |
82 | new ConfigListItem(lstView, Profile(dlg.prof_name(), dlg.prof_type(), Profile::White, Profile::Black, Profile::VT102)); | 84 | new ConfigListItem(lstView, Profile(dlg.prof_name(), dlg.prof_type(), Profile::White, Profile::Black, Profile::VT102)); |