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