From 849316bd18f06e43e7dfa2f107ad96d5bedbe7f1 Mon Sep 17 00:00:00 2001 From: zecke Date: Wed, 09 Oct 2002 01:58:20 +0000 Subject: IOSerial fixlet if failed to ioctl m_fd is != 0 so set it 0 and initialize m_read, m_error properly TabWidget was a OTabWidget again but there is a bug somewhere in the removePage code. I hopefully kindly asked drw to take a look at it MainWindiw Close does not terminate Screen is funny to look at... everytime a different background. when using QTabWidget I see nothing when using OTabWidget i've vertical scrollbars and see the content --- diff --git a/noncore/apps/opie-console/io_serial.cpp b/noncore/apps/opie-console/io_serial.cpp index b495f39..77ced85 100644 --- a/noncore/apps/opie-console/io_serial.cpp +++ b/noncore/apps/opie-console/io_serial.cpp @@ -5,6 +5,8 @@ #include "io_serial.h" IOSerial::IOSerial(const Profile &config) : IOLayer(config) { + m_read = 0l; + m_error = 0l; m_fd = 0; reload(config); } @@ -112,6 +114,7 @@ bool IOSerial::open() { return TRUE; } else { emit error(Refuse, tr("Device is already connected")); + m_fd = 0; return FALSE; } } 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 @@ -69,7 +69,7 @@ void MainWindow::initUI() { m_terminate = new QAction(); m_terminate->setText( tr("Terminate") ); m_terminate->addTo( m_console ); - connect(m_disconnect, SIGNAL(activated() ), + connect(m_terminate, SIGNAL(activated() ), this, SLOT(slotTerminate() ) ); a = new QAction(); @@ -188,14 +188,15 @@ void MainWindow::slotConfigure() { * and set the currentSession() */ void MainWindow::slotClose() { + qWarning("close"); if (!currentSession() ) return; tabWidget()->remove( currentSession() ); - tabWidget()->setCurrent( m_sessions.first() ); + /*it's autodelete */ m_sessions.remove( m_curSession ); - delete m_curSession; m_curSession = m_sessions.first(); + tabWidget()->setCurrent( m_curSession ); } /* -- cgit v0.9.0.2