summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/nsdata.cpp
Unidiff
Diffstat (limited to 'noncore/settings/networksettings2/nsdata.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings2/nsdata.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/noncore/settings/networksettings2/nsdata.cpp b/noncore/settings/networksettings2/nsdata.cpp
index 9b2ad3a..3f5e958 100644
--- a/noncore/settings/networksettings2/nsdata.cpp
+++ b/noncore/settings/networksettings2/nsdata.cpp
@@ -1,45 +1,46 @@
1#include <stdlib.h> 1#include <stdlib.h>
2#include <qpe/qpeapplication.h> 2#include <qpe/qpeapplication.h>
3#include <qtextstream.h> 3#include <qtextstream.h>
4#include <qdir.h> 4#include <qdir.h>
5#include <qfile.h> 5#include <qfile.h>
6#include <qfileinfo.h> 6#include <qfileinfo.h>
7 7
8#include "nsdata.h" 8#include "nsdata.h"
9#include <asdevice.h> 9#include <asdevice.h>
10#include <resources.h> 10#include <resources.h>
11 11
12static QString CfgFile; 12static QString CfgFile;
13 13
14NetworkSettingsData::NetworkSettingsData( void ) { 14NetworkSettingsData::NetworkSettingsData( void ) {
15 // init global resources structure 15 // init global resources structure
16 new TheNSResources(); 16 new TheNSResources();
17 17
18 CfgFile.sprintf( "%s/NETCONFIG", getenv("HOME") ); 18 CfgFile.sprintf( "%s/NETCONFIG", getenv("HOME") );
19 19
20 // load settings 20 // load settings
21 Force = 0; 21 Force = 0;
22 IsModified = 0;
22 loadSettings(); 23 loadSettings();
23} 24}
24 25
25// saving is done by caller 26// saving is done by caller
26NetworkSettingsData::~NetworkSettingsData( void ) { 27NetworkSettingsData::~NetworkSettingsData( void ) {
27 delete NSResources; 28 delete NSResources;
28} 29}
29 30
30void NetworkSettingsData::loadSettings( void ) { 31void NetworkSettingsData::loadSettings( void ) {
31 QString S; 32 QString S;
32 ANetNodeInstance* NNI; 33 ANetNodeInstance* NNI;
33 QString Attr, Value; 34 QString Attr, Value;
34 long idx; 35 long idx;
35 36
36 QFile F( CfgFile ); 37 QFile F( CfgFile );
37 QTextStream TS( &F ); 38 QTextStream TS( &F );
38 39
39 do { 40 do {
40 41
41 if( ! F.open(IO_ReadOnly) ) 42 if( ! F.open(IO_ReadOnly) )
42 break; 43 break;
43 44
44 /* load the file -> 45 /* load the file ->
45 46