summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/io_modem.cpp8
-rw-r--r--noncore/apps/opie-console/io_modem.h3
-rw-r--r--noncore/apps/opie-console/mainwindow.cpp10
-rw-r--r--noncore/apps/opie-console/opie-console.pro4
4 files changed, 19 insertions, 6 deletions
diff --git a/noncore/apps/opie-console/io_modem.cpp b/noncore/apps/opie-console/io_modem.cpp
index eb0aeb7..56147d8 100644
--- a/noncore/apps/opie-console/io_modem.cpp
+++ b/noncore/apps/opie-console/io_modem.cpp
@@ -3,8 +3,8 @@
3 3
4#include "dialer.h" 4#include "dialer.h"
5 5
6IOModem:IOModem( const Profile &config ) : IOSerial( config ) { 6IOModem::IOModem( const Profile &profile )
7 m_config = config; 7 : IOSerial( profile ), m_profile( profile ) {
8} 8}
9 9
10 10
@@ -20,6 +20,7 @@ void IOModem::close() {
20} 20}
21 21
22bool IOModem::open() { 22bool IOModem::open() {
23 qWarning("IOModem::open");
23 IOSerial::open(); 24 IOSerial::open();
24 25
25 Dialer d(m_profile); 26 Dialer d(m_profile);
@@ -68,6 +69,7 @@ QString IOModem::name() const {
68 return "Modem IO Layer"; 69 return "Modem IO Layer";
69} 70}
70 71
71void IOIrda::slotExited(OProcess* proc ){ 72void IOModem::slotExited(OProcess* proc ){
72 close(); 73 close();
73} 74}
75
diff --git a/noncore/apps/opie-console/io_modem.h b/noncore/apps/opie-console/io_modem.h
index 6d44349..d681f66 100644
--- a/noncore/apps/opie-console/io_modem.h
+++ b/noncore/apps/opie-console/io_modem.h
@@ -3,6 +3,7 @@
3 3
4#include <opie/oprocess.h> 4#include <opie/oprocess.h>
5#include "io_serial.h" 5#include "io_serial.h"
6#include "profile.h"
6 7
7/* Default values to be used if the profile information is incomplete */ 8/* Default values to be used if the profile information is incomplete */
8#define MODEM_DEFAULT_DEVICE "/dev/ttyS0" 9#define MODEM_DEFAULT_DEVICE "/dev/ttyS0"
@@ -57,7 +58,7 @@ public slots:
57private: 58private:
58 59
59 QString m_initString, m_resetString, m_dialPref1, m_dialSuf1, m_dialPref2, 60 QString m_initString, m_resetString, m_dialPref1, m_dialSuf1, m_dialPref2,
60 m_dialSuf2, dialPref3, m_dialSuf3, m_connect, m_hangup, m_cancel; 61 m_dialSuf2, m_dialPref3, m_dialSuf3, m_connect, m_hangup, m_cancel;
61 int m_dialTime, m_delayRedial, m_numberTries, m_dtrDropTime, 62 int m_dialTime, m_delayRedial, m_numberTries, m_dtrDropTime,
62 m_bpsDetect, m_dcdLines, m_multiLineUntag; 63 m_bpsDetect, m_dcdLines, m_multiLineUntag;
63 const Profile& m_profile; 64 const Profile& m_profile;
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp
index 415259e..1adb43d 100644
--- a/noncore/apps/opie-console/mainwindow.cpp
+++ b/noncore/apps/opie-console/mainwindow.cpp
@@ -6,6 +6,7 @@
6#include <qtoolbar.h> 6#include <qtoolbar.h>
7#include <qpe/resource.h> 7#include <qpe/resource.h>
8#include <opie/ofiledialog.h> 8#include <opie/ofiledialog.h>
9#include <qmessagebox.h>
9 10
10#include "profileeditordialog.h" 11#include "profileeditordialog.h"
11#include "configdialog.h" 12#include "configdialog.h"
@@ -309,6 +310,15 @@ void MainWindow::slotProfile( int id) {
309void MainWindow::create( const Profile& prof ) { 310void MainWindow::create( const Profile& prof ) {
310 Session *ses = manager()->fromProfile( prof, tabWidget() ); 311 Session *ses = manager()->fromProfile( prof, tabWidget() );
311 312
313 if((!ses) || (!ses->layer()) || (!ses->widgetStack()))
314 {
315 QMessageBox::warning(this,
316 QObject::tr("Session failed"),
317 QObject::tr("Cannot open session: Not all components were found."));
318 //if(ses) delete ses;
319 return;
320 }
321
312 m_sessions.append( ses ); 322 m_sessions.append( ses );
313 tabWidget()->add( ses ); 323 tabWidget()->add( ses );
314 m_curSession = ses; 324 m_curSession = ses;
diff --git a/noncore/apps/opie-console/opie-console.pro b/noncore/apps/opie-console/opie-console.pro
index ef6bc21..26bce83 100644
--- a/noncore/apps/opie-console/opie-console.pro
+++ b/noncore/apps/opie-console/opie-console.pro
@@ -2,7 +2,7 @@ TEMPLATE = app
2#CONFIG = qt warn_on release 2#CONFIG = qt warn_on release
3 CONFIG = qt debug 3 CONFIG = qt debug
4DESTDIR = $(OPIEDIR)/bin 4DESTDIR = $(OPIEDIR)/bin
5HEADERS = io_layer.h io_serial.h io_irda.h io_bt.h\ 5HEADERS = io_layer.h io_serial.h io_irda.h io_bt.h io_modem.h \
6 file_layer.h filetransfer.h \ 6 file_layer.h filetransfer.h \
7 metafactory.h \ 7 metafactory.h \
8 session.h \ 8 session.h \
@@ -35,7 +35,7 @@ HEADERS = io_layer.h io_serial.h io_irda.h io_bt.h\
35 script.h \ 35 script.h \
36 dialer.h 36 dialer.h
37 37
38SOURCES = io_layer.cpp io_serial.cpp io_irda.cpp io_bt.cpp \ 38SOURCES = io_layer.cpp io_serial.cpp io_irda.cpp io_bt.cpp io_modem.cpp \
39 file_layer.cpp filetransfer.cpp \ 39 file_layer.cpp filetransfer.cpp \
40 main.cpp \ 40 main.cpp \
41 metafactory.cpp \ 41 metafactory.cpp \