Diffstat (limited to 'noncore/apps/opie-console/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/mainwindow.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp index aeb3742..0bd6a13 100644 --- a/noncore/apps/opie-console/mainwindow.cpp +++ b/noncore/apps/opie-console/mainwindow.cpp | |||
@@ -66,13 +66,13 @@ void MainWindow::initUI() { | |||
66 | /* | 66 | /* |
67 | * terminate action | 67 | * terminate action |
68 | */ | 68 | */ |
69 | m_terminate = new QAction(); | 69 | m_terminate = new QAction(); |
70 | m_terminate->setText( tr("Terminate") ); | 70 | m_terminate->setText( tr("Terminate") ); |
71 | m_terminate->addTo( m_console ); | 71 | m_terminate->addTo( m_console ); |
72 | connect(m_disconnect, SIGNAL(activated() ), | 72 | connect(m_terminate, SIGNAL(activated() ), |
73 | this, SLOT(slotTerminate() ) ); | 73 | this, SLOT(slotTerminate() ) ); |
74 | 74 | ||
75 | a = new QAction(); | 75 | a = new QAction(); |
76 | a->setText( tr("Close Window") ); | 76 | a->setText( tr("Close Window") ); |
77 | a->addTo( m_console ); | 77 | a->addTo( m_console ); |
78 | connect(a, SIGNAL(activated() ), | 78 | connect(a, SIGNAL(activated() ), |
@@ -185,20 +185,21 @@ void MainWindow::slotConfigure() { | |||
185 | * this window from the tabwidget | 185 | * this window from the tabwidget |
186 | * remove it from the list | 186 | * remove it from the list |
187 | * delete it | 187 | * delete it |
188 | * and set the currentSession() | 188 | * and set the currentSession() |
189 | */ | 189 | */ |
190 | void MainWindow::slotClose() { | 190 | void MainWindow::slotClose() { |
191 | qWarning("close"); | ||
191 | if (!currentSession() ) | 192 | if (!currentSession() ) |
192 | return; | 193 | return; |
193 | 194 | ||
194 | tabWidget()->remove( currentSession() ); | 195 | tabWidget()->remove( currentSession() ); |
195 | tabWidget()->setCurrent( m_sessions.first() ); | 196 | /*it's autodelete */ |
196 | m_sessions.remove( m_curSession ); | 197 | m_sessions.remove( m_curSession ); |
197 | delete m_curSession; | ||
198 | m_curSession = m_sessions.first(); | 198 | m_curSession = m_sessions.first(); |
199 | tabWidget()->setCurrent( m_curSession ); | ||
199 | } | 200 | } |
200 | 201 | ||
201 | /* | 202 | /* |
202 | * We will get the name | 203 | * We will get the name |
203 | * Then the profile | 204 | * Then the profile |
204 | * and then we will make a profile | 205 | * and then we will make a profile |