Diffstat (limited to 'noncore/net/opietooth/manager/pppdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/opietooth/manager/pppdialog.cpp | 9 |
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 | |||
@@ -4,23 +4,25 @@ | |||
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 <opie/oprocess.h> |
9 | 9 | ||
10 | PPPDialog::PPPDialog( QWidget* parent, const char* name, bool modal, WFlags fl ) | 10 | PPPDialog::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 | ||
24 | outPut = new QMultiLineEdit( this ); | 26 | outPut = new QMultiLineEdit( this ); |
25 | QFont outPut_font( outPut->font() ); | 27 | QFont outPut_font( outPut->font() ); |
26 | outPut_font.setPointSize( 8 ); | 28 | outPut_font.setPointSize( 8 ); |
@@ -42,16 +44,15 @@ PPPDialog::PPPDialog( QWidget* parent, const char* name, bool modal, WFlags fl | |||
42 | PPPDialog::~PPPDialog() { | 44 | PPPDialog::~PPPDialog() { |
43 | } | 45 | } |
44 | 46 | ||
45 | void PPPDialog::connectToDevice() { | 47 | void 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) ) { |
55 | qWarning("could not start"); | 56 | qWarning("could not start"); |
56 | delete pppDial; | 57 | delete pppDial; |
57 | } | 58 | } |