summaryrefslogtreecommitdiff
Side-by-side diff
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
@@ -2,10 +2,10 @@
#include "io_modem.h"
#include "dialer.h"
-IOModem:IOModem( const Profile &config ) : IOSerial( config ) {
- m_config = config;
+IOModem::IOModem( const Profile &profile )
+ : IOSerial( profile ), m_profile( profile ) {
}
IOModem::~IOModem() {
@@ -19,8 +19,9 @@ void IOModem::close() {
}
bool IOModem::open() {
+ qWarning("IOModem::open");
IOSerial::open();
Dialer d(m_profile);
int result = d.exec();
@@ -67,7 +68,8 @@ QString IOModem::identifier() const {
QString IOModem::name() const {
return "Modem IO Layer";
}
-void IOIrda::slotExited(OProcess* proc ){
+void IOModem::slotExited(OProcess* proc ){
close();
}
+
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
@@ -2,8 +2,9 @@
#define OPIE_IO_MODEM
#include <opie/oprocess.h>
#include "io_serial.h"
+#include "profile.h"
/* Default values to be used if the profile information is incomplete */
#define MODEM_DEFAULT_DEVICE "/dev/ttyS0"
#define MODEM_DEFAULT_BAUD 9600
@@ -56,9 +57,9 @@ public slots:
private:
QString m_initString, m_resetString, m_dialPref1, m_dialSuf1, m_dialPref2,
- m_dialSuf2, dialPref3, m_dialSuf3, m_connect, m_hangup, m_cancel;
+ m_dialSuf2, m_dialPref3, m_dialSuf3, m_connect, m_hangup, m_cancel;
int m_dialTime, m_delayRedial, m_numberTries, m_dtrDropTime,
m_bpsDetect, m_dcdLines, m_multiLineUntag;
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
@@ -5,8 +5,9 @@
#include <qpopupmenu.h>
#include <qtoolbar.h>
#include <qpe/resource.h>
#include <opie/ofiledialog.h>
+#include <qmessagebox.h>
#include "profileeditordialog.h"
#include "configdialog.h"
#include "default.h"
@@ -308,8 +309,17 @@ void MainWindow::slotProfile( int id) {
}
void MainWindow::create( const Profile& prof ) {
Session *ses = manager()->fromProfile( prof, tabWidget() );
+ if((!ses) || (!ses->layer()) || (!ses->widgetStack()))
+ {
+ QMessageBox::warning(this,
+ QObject::tr("Session failed"),
+ QObject::tr("Cannot open session: Not all components were found."));
+ //if(ses) delete ses;
+ return;
+ }
+
m_sessions.append( ses );
tabWidget()->add( ses );
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
@@ -1,9 +1,9 @@
TEMPLATE = app
#CONFIG = qt warn_on release
CONFIG = qt debug
DESTDIR = $(OPIEDIR)/bin
-HEADERS = io_layer.h io_serial.h io_irda.h io_bt.h\
+HEADERS = io_layer.h io_serial.h io_irda.h io_bt.h io_modem.h \
file_layer.h filetransfer.h \
metafactory.h \
session.h \
mainwindow.h \
@@ -34,9 +34,9 @@ HEADERS = io_layer.h io_serial.h io_irda.h io_bt.h\
receive_layer.h filereceive.h \
script.h \
dialer.h
-SOURCES = io_layer.cpp io_serial.cpp io_irda.cpp io_bt.cpp \
+SOURCES = io_layer.cpp io_serial.cpp io_irda.cpp io_bt.cpp io_modem.cpp \
file_layer.cpp filetransfer.cpp \
main.cpp \
metafactory.cpp \
session.cpp \