summaryrefslogtreecommitdiff
path: root/noncore/net/opietooth/manager/pppdialog.cpp
Unidiff
Diffstat (limited to 'noncore/net/opietooth/manager/pppdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opietooth/manager/pppdialog.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/noncore/net/opietooth/manager/pppdialog.cpp b/noncore/net/opietooth/manager/pppdialog.cpp
index 4e58552..870e7fd 100644
--- a/noncore/net/opietooth/manager/pppdialog.cpp
+++ b/noncore/net/opietooth/manager/pppdialog.cpp
@@ -1,23 +1,25 @@
1 1
2#include "pppdialog.h" 2#include "pppdialog.h"
3#include <qpushbutton.h> 3#include <qpushbutton.h>
4#include <qmultilineedit.h> 4#include <qmultilineedit.h>
5#include <qlineedit.h> 5#include <qlineedit.h>
6#include <qlayout.h> 6#include <qlayout.h>
7#include <qlabel.h> 7#include <qlabel.h>
8#include <opie/oprocess.h> 8#include <opie2/oprocess.h>
9 9
10using namespace OpieTooth; 10using namespace OpieTooth;
11 11
12using namespace Opie::Core;
13using namespace Opie::Core;
12PPPDialog::PPPDialog( QWidget* parent, const char* name, bool modal, WFlags fl, const QString& device ) 14PPPDialog::PPPDialog( QWidget* parent, const char* name, bool modal, WFlags fl, const QString& device )
13 : QDialog( parent, name, modal, fl ) { 15 : QDialog( parent, name, modal, fl ) {
14 16
15 if ( !name ) 17 if ( !name )
16 setName( "PPPDialog" ); 18 setName( "PPPDialog" );
17 setCaption( tr( "ppp connection " ) ) ; 19 setCaption( tr( "ppp connection " ) ) ;
18 20
19 m_device = device; 21 m_device = device;
20 22
21 layout = new QVBoxLayout( this ); 23 layout = new QVBoxLayout( this );
22 24
23 QLabel* info = new QLabel( this ); 25 QLabel* info = new QLabel( this );
@@ -43,25 +45,25 @@ PPPDialog::PPPDialog( QWidget* parent, const char* name, bool modal, WFlags fl,
43 45
44} 46}
45 47
46PPPDialog::~PPPDialog() { 48PPPDialog::~PPPDialog() {
47} 49}
48 50
49void PPPDialog::connectToDevice() { 51void PPPDialog::connectToDevice() {
50 outPut->clear(); 52 outPut->clear();
51 // vom popupmenu beziehen 53 // vom popupmenu beziehen
52 QString connectScript = "/etc/ppp/peers/" + cmdLine->text(); 54 QString connectScript = "/etc/ppp/peers/" + cmdLine->text();
53 OProcess* pppDial = new OProcess(); 55 OProcess* pppDial = new OProcess();
54 *pppDial << "pppd" << m_device << "call" << connectScript; 56 *pppDial << "pppd" << m_device << "call" << connectScript;
55 connect( pppDial, SIGNAL(receivedStdout(OProcess*,char*,int) ), 57 connect( pppDial, SIGNAL(receivedStdout(Opie::Core::OProcess*,char*,int) ),
56 this, SLOT(fillOutPut(OProcess*,char*,int) ) ); 58 this, SLOT(fillOutPut(OProcess*,char*,int) ) );
57 if (!pppDial->start(OProcess::DontCare, OProcess::AllOutput) ) { 59 if (!pppDial->start(OProcess::DontCare, OProcess::AllOutput) ) {
58 qWarning("could not start"); 60 qWarning("could not start");
59 delete pppDial; 61 delete pppDial;
60 } 62 }
61} 63}
62 64
63void PPPDialog::fillOutPut( OProcess* pppDial, char* cha, int len ) { 65void PPPDialog::fillOutPut( OProcess* pppDial, char* cha, int len ) {
64 QCString str(cha, len ); 66 QCString str(cha, len );
65 outPut->insertLine( str ); 67 outPut->insertLine( str );
66 delete pppDial; 68 delete pppDial;
67} 69}