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.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/noncore/net/opietooth/manager/pppdialog.cpp b/noncore/net/opietooth/manager/pppdialog.cpp
index 472da73..4d926a5 100644
--- a/noncore/net/opietooth/manager/pppdialog.cpp
+++ b/noncore/net/opietooth/manager/pppdialog.cpp
@@ -7,17 +7,19 @@
7#include <qlabel.h> 7#include <qlabel.h>
8#include <opie/oprocess.h> 8#include <opie/oprocess.h>
9 9
10PPPDialog::PPPDialog( QWidget* parent, const char* name, bool modal, WFlags fl ) 10PPPDialog::PPPDialog( QWidget* parent, const char* name, bool modal, WFlags fl, const QString& device )
11 : QDialog( parent, name, modal, fl ) { 11 : QDialog( parent, name, modal, fl ) {
12 12
13 if ( !name ) 13 if ( !name )
14 setName( "PPPDialog" ); 14 setName( "PPPDialog" );
15 setCaption( tr( "ppp connection " ) ) ; 15 setCaption( tr( "ppp connection " ) ) ;
16 16
17 m_device = device;
18
17 layout = new QVBoxLayout( this ); 19 layout = new QVBoxLayout( this );
18 20
19 QLabel* info = new QLabel( this ); 21 QLabel* info = new QLabel( this );
20 info->setText( "Enter an ppp script name:" ); 22 info->setText( tr("Enter an ppp script name:") );
21 23
22 cmdLine = new QLineEdit( this ); 24 cmdLine = new QLineEdit( this );
23 25
@@ -45,10 +47,9 @@ PPPDialog::~PPPDialog() {
45void PPPDialog::connectToDevice() { 47void PPPDialog::connectToDevice() {
46 outPut->clear(); 48 outPut->clear();
47 // vom popupmenu beziehen 49 // vom popupmenu beziehen
48 QString devName = "/dev/ttyU0";
49 QString connectScript = "/etc/ppp/peers/" + cmdLine->text(); 50 QString connectScript = "/etc/ppp/peers/" + cmdLine->text();
50 OProcess* pppDial = new OProcess(); 51 OProcess* pppDial = new OProcess();
51 *pppDial << "pppd" << devName << "call" << connectScript; 52 *pppDial << "pppd" << m_device << "call" << connectScript;
52 connect( pppDial, SIGNAL(receivedStdout(OProcess*, char*, int ) ), 53 connect( pppDial, SIGNAL(receivedStdout(OProcess*, char*, int ) ),
53 this, SLOT(fillOutPut(OProcess*, char*, int ) ) ); 54 this, SLOT(fillOutPut(OProcess*, char*, int ) ) );
54 if (!pppDial->start(OProcess::DontCare, OProcess::AllOutput) ) { 55 if (!pppDial->start(OProcess::DontCare, OProcess::AllOutput) ) {