summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/networksettings2/systemfile.cpp
Side-by-side diff
Diffstat (limited to 'noncore/settings/networksettings2/networksettings2/systemfile.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings2/networksettings2/systemfile.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/noncore/settings/networksettings2/networksettings2/systemfile.cpp b/noncore/settings/networksettings2/networksettings2/systemfile.cpp
index 394ff52..62bb6af 100644
--- a/noncore/settings/networksettings2/networksettings2/systemfile.cpp
+++ b/noncore/settings/networksettings2/networksettings2/systemfile.cpp
@@ -79,109 +79,107 @@ bool SystemFile::open( void ) {
}
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->netNode()->nodeName());
+ arg(NNI->nodeClass()->nodeName());
(*this) << Out << endl;
S = TX.readLine();
}
}
return 0;
}
-bool SystemFile::postNodeSection( ANetNodeInstance * NNI, long DevNr ) {
+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());
(*this) << Out << endl;
S = TX.readLine();
}
}
return 0;
}
-bool SystemFile::preDeviceSection( ANetNodeInstance * NNI, long ) {
+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(NNI->netNode()->nodeName());
+ Out = S.arg(NN->nodeName());
(*this) << Out << endl;
S = TX.readLine();
}
}
return 0;
}
-bool SystemFile::postDeviceSection( ANetNodeInstance * NNI, long DevNr ) {
+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(NNI->nodeName());
+ Out = S.arg(NN->nodeName());
(*this) << Out << endl;
S = TX.readLine();
}
}
return 0;
}