Commit f09eca29 authored by Oswald Buddenhagen's avatar Oswald Buddenhagen
Browse files

inline last use of ProFileReader::readProFile()

parent 82e10eae
...@@ -89,16 +89,6 @@ ProFileReader::~ProFileReader() ...@@ -89,16 +89,6 @@ ProFileReader::~ProFileReader()
pf->deref(); pf->deref();
} }
bool ProFileReader::readProFile(const QString &fileName)
{
if (ProFile *pro = parsedProFile(fileName)) {
bool ok = accept(pro);
pro->deref();
return ok;
}
return false;
}
void ProFileReader::aboutToEval(ProFile *, ProFile *pro, EvalFileType type) void ProFileReader::aboutToEval(ProFile *, ProFile *pro, EvalFileType type)
{ {
if (m_ignoreLevel || (type != EvalProjectFile && type != EvalIncludeFile)) { if (m_ignoreLevel || (type != EvalProjectFile && type != EvalIncludeFile)) {
......
...@@ -71,8 +71,6 @@ public: ...@@ -71,8 +71,6 @@ public:
ProFileReader(ProFileOption *option); ProFileReader(ProFileOption *option);
~ProFileReader(); ~ProFileReader();
// fileName is expected to be absolute and cleanPath()ed.
bool readProFile(const QString &fileName);
QList<ProFile*> includeFiles() const; QList<ProFile*> includeFiles() const;
ProFile *proFileFor(const QString &name); ProFile *proFileFor(const QString &name);
......
...@@ -421,8 +421,12 @@ void MaemoPackageContents::parseProFile(ParseType type) const ...@@ -421,8 +421,12 @@ void MaemoPackageContents::parseProFile(ParseType type) const
m_proFile = m_proFileReader->parsedProFile(m_proFileName, false, m_proFile = m_proFileReader->parsedProFile(m_proFileName, false,
m_proFileLines.join("\n")); m_proFileLines.join("\n"));
} else { } else {
m_proFile = m_proFileReader->readProFile(m_proFileName) m_proFile = 0;
? m_proFileReader->proFileFor(m_proFileName) : 0; if (ProFile *pro = m_proFileReader->parsedProFile(m_proFileName)) {
if (m_proFileReader->accept(pro))
m_proFile = pro;
pro->deref();
}
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment