summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/ppp/ppp_NN.cpp
Side-by-side diff
Diffstat (limited to 'noncore/settings/networksettings2/ppp/ppp_NN.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings2/ppp/ppp_NN.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/noncore/settings/networksettings2/ppp/ppp_NN.cpp b/noncore/settings/networksettings2/ppp/ppp_NN.cpp
index ff4465c..51ba27d 100644
--- a/noncore/settings/networksettings2/ppp/ppp_NN.cpp
+++ b/noncore/settings/networksettings2/ppp/ppp_NN.cpp
@@ -1,2 +1,3 @@
#include <qfile.h>
+#include <resources.h>
#include <qtextstream.h>
@@ -8,4 +9,8 @@ QStringList * PPPNetNode::ProperFiles = 0;
static const char * PPPNeeds[] =
- { "line",
- "modem",
+ { "modem",
+ 0
+ };
+
+static const char * PPPProvides[] =
+ { "connection",
0
@@ -18,12 +23,6 @@ PPPNetNode::PPPNetNode() : ANetNode(tr("PPP Connection")) {
- // proper files : will leak
- ProperFiles =new QStringList;
- *ProperFiles << "peers";
- *ProperFiles << "chatscript";
-
- // system files
NSResources->addSystemFile(
- "pap-secrets", "/tmp/pap-secrets", 0 );
+ "pap-secrets", "/etc/ppp/pap-secrets", 0 );
NSResources->addSystemFile(
- "chap-secrets", "/tmp/chap-secrets", 0 );
+ "chap-secrets", "/etc/ppp/chap-secrets", 0 );
}
@@ -52,9 +51,10 @@ const char ** PPPNetNode::needs( void ) {
-const char * PPPNetNode::provides( void ) {
- return "connection";
+const char ** PPPNetNode::provides( void ) {
+ return PPPProvides;
}
-QStringList * PPPNetNode::properFiles( void ) {
- return ProperFiles;
-
+QStringList PPPNetNode::properFiles( void ) {
+ QStringList SL;
+ SL << "peers" << "chatscripts";
+ return SL;
}
@@ -64,5 +64,5 @@ QStringList * PPPNetNode::properFiles( void ) {
// /etc/ppp/pap-secrets
-bool PPPNetNode::hasDataForFile( const QString & S ) {
- return S == "pap-secrets" ||
- S == "chap-secrets" ;
+bool PPPNetNode::hasDataForFile( SystemFile & S ) {
+ return S.name() == "pap-secrets" ||
+ S.name() == "chap-secrets" ;
}