Diffstat (limited to 'noncore/settings/networksettings2/networksettings2/systemfile.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings2/networksettings2/systemfile.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/noncore/settings/networksettings2/networksettings2/systemfile.cpp b/noncore/settings/networksettings2/networksettings2/systemfile.cpp index 62bb6af..b3fc1a5 100644 --- a/noncore/settings/networksettings2/networksettings2/systemfile.cpp +++ b/noncore/settings/networksettings2/networksettings2/systemfile.cpp @@ -63,123 +63,123 @@ SystemFile::~SystemFile( void ) { if( F ) delete F; } bool SystemFile::open( void ) { if( F ) { F->close(); delete F; } F = new QFile( Path + "bup" ); if( ! F->open( IO_WriteOnly ) ) { return 0; } setDevice( F ); return 1; } bool SystemFile::close( void ) { if( ! F ) { return 1 ; } QString OldP = Path + "bup"; F->close(); delete F; F = 0; return ( rename( OldP.latin1(), Path.latin1() ) >= 0 ); } bool SystemFile::preSection( void ) { if( hasPreSection ) { QFile Fl( TemplDir + Name + "/presection" ); if( ! Fl.open( IO_ReadOnly ) ) return 1; // error // copy file to this file F->writeBlock( Fl.readAll() ); } return 0; } bool SystemFile::postSection( void ) { if( hasPostSection ) { QFile Fl( TemplDir + Name + "/postsection" ); if( ! Fl.open( IO_ReadOnly ) ) return 1; // error // copy file to this file F->writeBlock( Fl.readAll() ); } return 0; } bool SystemFile::preNodeSection( ANetNodeInstance * NNI, long ) { if( hasPreNodeSection ) { QFile Fl( TemplDir + Name + "/prenodesection" ); if( ! Fl.open( IO_ReadOnly ) ) return 1; // error QTextStream TX( &Fl ); QString Out; QString S = TX.readLine(); while( ! TX.eof() ) { Out = S. - arg(NNI->nodeClass()->nodeName()); + arg(NNI->nodeClass()->name()); (*this) << Out << endl; S = TX.readLine(); } } return 0; } bool SystemFile::postNodeSection( ANetNodeInstance * NNI, long ) { if( hasPostNodeSection ) { QFile Fl( TemplDir + Name + "/postnodesection" ); if( ! Fl.open( IO_ReadOnly ) ) return 1; // error QTextStream TX( &Fl ); QString Out; QString S = TX.readLine(); while( ! TX.eof() ) { Out = S. - arg(NNI->nodeName()); + arg(NNI->name()); (*this) << Out << endl; S = TX.readLine(); } } return 0; } bool SystemFile::preDeviceSection( ANetNode * NN ) { if( hasPreDeviceSection ) { QFile Fl( TemplDir + Name + "/predevicesection" ); if( ! Fl.open( IO_ReadOnly ) ) return 1; // error QTextStream TX( &Fl ); QString Out; QString S = TX.readLine(); while( ! TX.eof() ) { - Out = S.arg(NN->nodeName()); + Out = S.arg(NN->name()); (*this) << Out << endl; S = TX.readLine(); } } return 0; } bool SystemFile::postDeviceSection( ANetNode * NN ) { if( hasPostDeviceSection ) { QFile Fl( TemplDir + Name + "/postdevicesection" ); if( ! Fl.open( IO_ReadOnly ) ) return 1; // error QTextStream TX( &Fl ); QString Out; QString S = TX.readLine(); while( ! TX.eof() ) { - Out = S.arg(NN->nodeName()); + Out = S.arg(NN->name()); (*this) << Out << endl; S = TX.readLine(); } } return 0; } |