author | wimpie <wimpie> | 2004-04-07 00:09:37 (UTC) |
---|---|---|
committer | wimpie <wimpie> | 2004-04-07 00:09:37 (UTC) |
commit | b93d9e0c4384be0a6f40be257ba791004388400b (patch) (side-by-side diff) | |
tree | 2ca0e41dc8c99e1af3ce2f0305d458f76d10db45 /noncore/settings/networksettings2/nsdata.cpp | |
parent | 1b7aaf904fa70c16eee03155bd826e921798cc22 (diff) | |
download | opie-b93d9e0c4384be0a6f40be257ba791004388400b.zip opie-b93d9e0c4384be0a6f40be257ba791004388400b.tar.gz opie-b93d9e0c4384be0a6f40be257ba791004388400b.tar.bz2 |
MANY changes ... lancards should be OK now
Diffstat (limited to 'noncore/settings/networksettings2/nsdata.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings2/nsdata.cpp | 49 |
1 files changed, 26 insertions, 23 deletions
diff --git a/noncore/settings/networksettings2/nsdata.cpp b/noncore/settings/networksettings2/nsdata.cpp index 13979ce..64b83f7 100644 --- a/noncore/settings/networksettings2/nsdata.cpp +++ b/noncore/settings/networksettings2/nsdata.cpp @@ -17,3 +17,3 @@ NetworkSettingsData::NetworkSettingsData( void ) { - CfgFile.sprintf( "%s/NETCONFIG", + CfgFile.sprintf( "%s/Settings/NS2.conf", NSResources->currentUser().HomeDir.latin1() ); @@ -77,6 +77,7 @@ void NetworkSettingsData::loadSettings( void ) { if( S.startsWith( "nodetype " ) ) { - S = S.mid( 9, S.length()-9-1 ); - fprintf( stderr, "Node %s\n", S.latin1() ); + S = S.mid( 9, S.length()-9 ); + S = deQuote(S); // try to find netnode NN = NSResources->findNetNode( S ); + fprintf( stderr, "Node %s : %p\n", S.latin1(), NN ); } else { @@ -84,2 +85,7 @@ void NetworkSettingsData::loadSettings( void ) { NNI = NSResources->createNodeInstance( S ); + fprintf( stderr, "NodeInstance %s : %p\n", S.latin1(), NNI ); + } + + if( NN == 0 && NNI == 0 ) { + LeftOvers.append( Line ); } @@ -87,3 +93,3 @@ void NetworkSettingsData::loadSettings( void ) { do { - S = TS.readLine(); + S = Line = TS.readLine(); @@ -111,3 +117,3 @@ void NetworkSettingsData::loadSettings( void ) { // set the attribute - NNI->setAttribute( Attr, Value ); + NN->setAttribute( Attr, Value ); } else { @@ -125,2 +131,3 @@ void NetworkSettingsData::loadSettings( void ) { } while( 1 ); + if( NNI ) { @@ -168,3 +175,3 @@ QString NetworkSettingsData::saveSettings( void ) { TS << "[nodetype " - << it.current()->NetNode->name() + << quote( QString( it.current()->NetNode->name() ) ) << "]" @@ -173,2 +180,3 @@ QString NetworkSettingsData::saveSettings( void ) { it.current()->NetNode->saveAttributes( TS ); + TS << endl; } @@ -188,3 +196,6 @@ QString NetworkSettingsData::saveSettings( void ) { NNI = nit.current(); - TS << '[' <<NNI->nodeClass()->nodeName() << ']' << endl; + TS << '[' + << QString(NNI->nodeClass()->name()) + << ']' + << endl; NNI->saveAttributes( TS ); @@ -297,3 +308,3 @@ QString NetworkSettingsData::generateSettings( bool ForceReq ) { "<p>Cannot generate files proper to \"%1\"</p>" ). - arg(NNI->nodeClass()->nodeName()) ; + arg(NNI->nodeClass()->name()) ; return S; @@ -392,3 +403,2 @@ QList<NodeCollection> NetworkSettingsData::collectPossible( const char * Interfa // check if this profile handles the requested interface - fprintf( stderr, "check %s\n", NC->name().latin1() ); if( NC->handlesInterface( Interface ) && // if different Intf. @@ -397,3 +407,3 @@ QList<NodeCollection> NetworkSettingsData::collectPossible( const char * Interfa ) { - fprintf( stderr, "Append %s\n", NC->name().latin1() ); + fprintf( stderr, "Append %s for %s\n", NC->name().latin1(), Interface); PossibleConnections.append( NC ); @@ -488,3 +498,3 @@ QString NetworkSettingsData::generateSystemFileNode( arg( SF.name() ). - arg( CurDevNN->nodeName() ); + arg( CurDevNN->name() ); return S; @@ -497,3 +507,3 @@ QString NetworkSettingsData::generateSystemFileNode( arg( SF.name() ). - arg( CurDevNN->nodeName() ); + arg( CurDevNN->name() ); return S; @@ -502,7 +512,2 @@ QString NetworkSettingsData::generateSystemFileNode( - if( CurDev ) - fprintf( stderr, "Cur %s\n", CurDevNN->nodeName().latin1() ); - else - fprintf( stderr, "Cur NO\n" ); - // now generate profile specific data for all @@ -519,3 +524,2 @@ QString NetworkSettingsData::generateSystemFileNode( - fprintf( stderr, "%s\n", Dev->netNode()->nodeName().latin1() ); if( CurDev ) { @@ -523,3 +527,2 @@ QString NetworkSettingsData::generateSystemFileNode( // other device type -> later - fprintf( stderr, "Other Dev type\n" ); continue; @@ -538,3 +541,3 @@ QString NetworkSettingsData::generateSystemFileNode( arg( SF.name() ). - arg( CurDevNN->nodeName() ); + arg( CurDevNN->name() ); return S; @@ -553,3 +556,3 @@ QString NetworkSettingsData::generateSystemFileNode( arg( SF.name() ). - arg( NNI->nodeClass()->nodeName() ); + arg( NNI->nodeClass()->name() ); return S; @@ -563,3 +566,3 @@ QString NetworkSettingsData::generateSystemFileNode( arg( SF.name() ). - arg( CurDevNN->nodeName() ); + arg( CurDevNN->name() ); return S; @@ -573,3 +576,3 @@ QString NetworkSettingsData::generateSystemFileNode( arg( SF.name() ). - arg( CurDevNN->nodeName() ); + arg( CurDevNN->name() ); return S; |