Diffstat (limited to 'noncore/apps/opie-console/dialer.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/dialer.cpp | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/noncore/apps/opie-console/dialer.cpp b/noncore/apps/opie-console/dialer.cpp index 7010594..8883b83 100644 --- a/noncore/apps/opie-console/dialer.cpp +++ b/noncore/apps/opie-console/dialer.cpp @@ -1,13 +1,9 @@ #include "dialer.h" #include "io_modem.h" -/* OPIE */ -#include <opie2/odebug.h> -using namespace Opie::Core; - /* QT */ #include <qlayout.h> #include <qprogressbar.h> #include <qlabel.h> #include <qpushbutton.h> #include <qapp.h> @@ -106,13 +102,12 @@ void Dialer::slotCancel() accept(); } } void Dialer::reset() { - owarn << "reset" << oendl; switchState(state_cancel); } void Dialer::slotAutostart() { //state = state_preinit; @@ -138,24 +133,21 @@ void Dialer::dial(const QString& number) reject(); } } void Dialer::trydial(const QString& number) { - owarn << "TryDial:" << number.latin1() << "" << oendl; if(state != state_cancel) switchState(state_preinit); if(cleanshutdown) { - owarn << "HangupString " << m_profile.readEntry("HangupString") << oendl; send(m_profile.readEntry("HangupString", MODEM_DEFAULT_HANGUP_STRING ) + "\r"); } if(state != state_cancel) { switchState(state_init); -// owarn << "Init String " + m_profile.readEntry("InitString") << oendl; send(m_profile.readEntry("InitString",MODEM_DEFAULT_INIT_STRING ) + "\r"); QString response2 = receive(); if(!response2.contains("\nOK\r")) reset(); } @@ -180,13 +172,12 @@ void Dialer::trydial(const QString& number) if(!response4.contains("\nOK\r")) reset(); } if(state != state_cancel) { - owarn << "progress" << oendl; switchState(state_dialing); // send(QString("ATDT %1\r").arg(number)); send(QString("%1 %2\r").arg(m_profile.readEntry("DialPrefix1", MODEM_DEFAULT_DIAL_PREFIX1 )) .arg(number)); @@ -196,13 +187,13 @@ void Dialer::trydial(const QString& number) if(response5.contains("BUSY")) switchState(state_dialing); else { QMessageBox::warning(this, QObject::tr("Failure"), - QObject::tr("Dialing the number failed.")); + QObject::tr("<qt>Dialing the number failed.</qt>")); slotCancel(); } } } @@ -216,13 +207,12 @@ void Dialer::trydial(const QString& number) void Dialer::send(const QString& msg) { QString m = msg; int bytes; QString termination; - owarn << "Sending: " << m.latin1() << "" << oendl; /* termination = "\r"; //termination = m_profile.readEntry("Termination"); if(termination == "\n") m = m + "\n"; else if(termination == "\r") m = m + "\r"; else m = m + "\r\n"; @@ -249,17 +239,15 @@ QString Dialer::receive() if(ret > 0) { for(int i = 0; i < ret; i++) buffer[i] = buffer[i] & 0x7F; buffer[ret] = 0; - owarn << "Got: " << buffer << "" << oendl; buf.append(QString(buffer)); if(buf.contains("OK") || buf.contains("ERROR") || buf.contains("CONNECT") || (buf.contains("BUSY"))) { - //owarn << "Receiving: '" << buf.latin1() << "'" << oendl; cleanshutdown = 1; return buf; }else if (buf.contains("NO CARRIER") || buf.contains("NO DIALTONE") ) { cleanshutdown = 1; return QString::null; } |