summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings/ppp/pppconfig.cpp
Unidiff
Diffstat (limited to 'noncore/settings/networksettings/ppp/pppconfig.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings/ppp/pppconfig.cpp27
1 files changed, 17 insertions, 10 deletions
diff --git a/noncore/settings/networksettings/ppp/pppconfig.cpp b/noncore/settings/networksettings/ppp/pppconfig.cpp
index c0f1fef..e2521a6 100644
--- a/noncore/settings/networksettings/ppp/pppconfig.cpp
+++ b/noncore/settings/networksettings/ppp/pppconfig.cpp
@@ -5,25 +5,30 @@
5 5
6#include "accounts.h" 6#include "accounts.h"
7#include "general.h" 7#include "general.h"
8#include "interface.h"
9#include "modem.h"
8#include "pppconfig.h" 10#include "pppconfig.h"
9#include "pppdata.h" 11#include "pppdata.h"
10#include "runtests.h" 12#include "runtests.h"
11#include "modem.h"
12 13
13PPPConfigWidget::PPPConfigWidget( QWidget *parent, const char *name, 14PPPConfigWidget::PPPConfigWidget( Interface* iface, QWidget *parent,
15 const char *name,
14 bool modal, WFlags fl ) 16 bool modal, WFlags fl )
15 : QDialog(parent, name, modal, fl) 17 : QDialog(parent, name, modal, fl)
16{ 18{
17 setCaption(tr("Configure Modem")); 19 setCaption(tr("Configure Modem"));
18 int result = runTests(); 20 int result = runTests();
19 if(result == TEST_CRITICAL){ 21 if(result == TEST_CRITICAL){
20 QMessageBox::critical(0, tr("Modem failure"), tr("A critical failure appeard while testing the modem") ); 22 QMessageBox::critical(0, tr("Modem failure"), tr("A critical failure appeard while testing the modem") );
21 return; 23 return;
22 } 24 }
23
24// setFixedSize(sizeHint());
25 25
26 (void)new Modem; 26 interface = iface;
27 if (!PPPData::data()->setModemDevice( interface->getInterfaceName() ))
28 PPPData::data()->setModemDevice("/dev/modem");
29 if (!PPPData::data()->setAccount( interface->getHardwareName() ))
30 PPPData::data()->setAccount( 0 );
31 (void)new Modem;
27 32
28 QVBoxLayout *layout = new QVBoxLayout( this ); 33 QVBoxLayout *layout = new QVBoxLayout( this );
29 layout->setSpacing( 0 ); 34 layout->setSpacing( 0 );
@@ -50,6 +55,8 @@ PPPConfigWidget::~PPPConfigWidget()
50 55
51void PPPConfigWidget::accept() 56void PPPConfigWidget::accept()
52{ 57{
58 interface->setInterfaceName( PPPData::data()->modemDevice() );
59 interface->setHardwareName( PPPData::data()->accname() );
53 PPPData::data()->save(); 60 PPPData::data()->save();
54 QDialog::accept(); 61 QDialog::accept();
55} 62}