summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings/ppp/interfaceppp.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/noncore/settings/networksettings/ppp/interfaceppp.cpp b/noncore/settings/networksettings/ppp/interfaceppp.cpp
index 85ddbee..9ec30bc 100644
--- a/noncore/settings/networksettings/ppp/interfaceppp.cpp
+++ b/noncore/settings/networksettings/ppp/interfaceppp.cpp
@@ -1,88 +1,89 @@
1 1
2#include <qmessagebox.h> 2#include <qmessagebox.h>
3#define i18n QObject::tr 3#define i18n QObject::tr
4 4
5#include "auth.h" 5#include "auth.h"
6#include "interfaceppp.h" 6#include "interfaceppp.h"
7#include "modem.h" 7#include "modem.h"
8#include "pppdata.h" 8#include "pppdata.h"
9 9
10InterfacePPP::InterfacePPP(QObject *parent, const char *name, bool status) 10InterfacePPP::InterfacePPP(QObject *parent, const char *name, bool status)
11 : Interface(parent, name, status), 11 : Interface(parent, name, status),
12 _modemPtr(0), 12 _modemPtr(0),
13 _dataPtr(0) 13 _dataPtr(0)
14{ 14{
15 qDebug("InterfacePPP::InterfacePPP("); 15 qDebug("InterfacePPP::InterfacePPP(");
16} 16}
17 17
18PPPData* InterfacePPP::data() 18PPPData* InterfacePPP::data()
19{ 19{
20 if (!_dataPtr){ 20 if (!_dataPtr){
21 qDebug("creating new Data obj"); 21 qDebug("creating new Data obj");
22 _dataPtr = new PPPData(); 22 _dataPtr = new PPPData();
23 _dataPtr->setModemDevice( getInterfaceName() ); 23 _dataPtr->setModemDevice( getInterfaceName() );
24 _dataPtr->setAccount( getHardwareName() ); 24 _dataPtr->setAccount( getHardwareName() );
25 } 25 }
26 return _dataPtr; 26 return _dataPtr;
27} 27}
28 28
29Modem* InterfacePPP::modem() 29Modem* InterfacePPP::modem()
30{ 30{
31 if (!_modemPtr){ 31 if (!_modemPtr){
32 qDebug("creating new modem obj"); 32 qDebug("creating new modem obj");
33 _modemPtr = new Modem( data() ); 33 _modemPtr = new Modem( data() );
34 } 34 }
35 return _modemPtr; 35 return _modemPtr;
36} 36}
37 37
38bool InterfacePPP::refresh() 38bool InterfacePPP::refresh()
39{ 39{
40 qDebug("InterfacePPP::refresh()"); 40 qDebug("InterfacePPP::refresh()");
41 updateInterface(this);
41 QMessageBox::information(0,"Not Implemented","This feature is not yet implemneted... ;-("); 42 QMessageBox::information(0,"Not Implemented","This feature is not yet implemneted... ;-(");
42 return false; 43 return false;
43} 44}
44 45
45void InterfacePPP::start() 46void InterfacePPP::start()
46{ 47{
47 qDebug("InterfacePPP::start"); 48 qDebug("InterfacePPP::start");
48// should work... 49// should work...
49// if (data()->password().isEmpty() ){ 50// if (data()->password().isEmpty() ){
50// //FIXME: ask for password 51// //FIXME: ask for password
51// qDebug("using dummy password"); 52// qDebug("using dummy password");
52// QMessageBox::critical( 0, "no password", "you should be prompted for a password, but you are not! ;-)"); 53// QMessageBox::critical( 0, "no password", "you should be prompted for a password, but you are not! ;-)");
53// } 54// }
54 55
55 56
56 QFileInfo info(pppdPath()); 57 QFileInfo info(pppdPath());
57 58
58 if(!info.exists()){ 59 if(!info.exists()){
59 QMessageBox::warning(0, tr("Error"), 60 QMessageBox::warning(0, tr("Error"),
60 i18n("<qt>Cannot find the PPP daemon!<br>" 61 i18n("<qt>Cannot find the PPP daemon!<br>"
61 "Make sure that pppd is installed and " 62 "Make sure that pppd is installed and "
62 "that you have entered the correct path.</qt>")); 63 "that you have entered the correct path.</qt>"));
63 return; 64 return;
64 } 65 }
65//#if 0 66//#if 0
66 if(!info.isExecutable()){ 67 if(!info.isExecutable()){
67 68
68 QString string; 69 QString string;
69 string = i18n( "<qt>Cannot execute:<br> %1<br>" 70 string = i18n( "<qt>Cannot execute:<br> %1<br>"
70 "Please make sure that you have given " 71 "Please make sure that you have given "
71 "setuid permission and that " 72 "setuid permission and that "
72 "pppd is executable.<br>").arg(pppdPath()); 73 "pppd is executable.<br>").arg(pppdPath());
73 QMessageBox::warning(0, tr("Error"), string); 74 QMessageBox::warning(0, tr("Error"), string);
74 return; 75 return;
75 76
76 } 77 }
77//#endif 78//#endif
78 79
79 QFileInfo info2(data()->modemDevice()); 80 QFileInfo info2(data()->modemDevice());
80 81
81 if(!info2.exists()){ 82 if(!info2.exists()){
82 QString string; 83 QString string;
83 string = i18n( "<qt>Cannot find:<br> %1<br>" 84 string = i18n( "<qt>Cannot find:<br> %1<br>"
84 "Please make sure you have setup " 85 "Please make sure you have setup "
85 "your modem device properly " 86 "your modem device properly "
86 "and/or adjust the location of the modem device on " 87 "and/or adjust the location of the modem device on "
87 "the modem tab of " 88 "the modem tab of "
88 "the setup dialog.</qt>").arg(data()->modemDevice()); 89 "the setup dialog.</qt>").arg(data()->modemDevice());