|
|
@ -52,13 +52,17 @@ TQString FileTemplate::read(KDevPlugin *part, const TQString &name, Policy p)
|
|
|
|
|
|
|
|
|
|
|
|
TQString FileTemplate::readFile(KDevPlugin *part, const TQString &fileName)
|
|
|
|
TQString FileTemplate::readFile(KDevPlugin *part, const TQString &fileName)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TQDomDocument &dom = *part->projectDom();
|
|
|
|
TQDomDocument dom;
|
|
|
|
|
|
|
|
|
|
|
|
TQFile f(fileName);
|
|
|
|
TQFile f(fileName);
|
|
|
|
if (!f.open(IO_ReadOnly))
|
|
|
|
if (!f.open(IO_ReadOnly))
|
|
|
|
return TQString();
|
|
|
|
return TQString();
|
|
|
|
TQTextStream stream(&f);
|
|
|
|
TQTextStream stream(&f);
|
|
|
|
TQString str = stream.read();
|
|
|
|
TQString str = stream.read();
|
|
|
|
|
|
|
|
if (part->projectDom())
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
dom = *part->projectDom();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return makeSubstitutions( dom, str );
|
|
|
|
return makeSubstitutions( dom, str );
|
|
|
|
}
|
|
|
|
}
|
|
|
|