diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2009-04-15 21:15:12 (GMT) |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2009-04-15 21:15:12 (GMT) |
commit | ca83968f235c731f3bd1eb38e3c97d38d34565a0 (patch) | |
tree | 257bab4ee7feeba0739325f214c3c977cb720c50 /tools/linguist/shared/profileevaluator.cpp | |
parent | cf9358a739b3d12c575b572ef6bba7c64f4c4b4a (diff) | |
parent | 287d5e7b349dac0cfdb74e9747752fcadc432064 (diff) | |
download | Qt-ca83968f235c731f3bd1eb38e3c97d38d34565a0.zip Qt-ca83968f235c731f3bd1eb38e3c97d38d34565a0.tar.gz Qt-ca83968f235c731f3bd1eb38e3c97d38d34565a0.tar.bz2 |
Merge branch '4.5' of git@scm.dev.troll.no:qt/qt
Diffstat (limited to 'tools/linguist/shared/profileevaluator.cpp')
-rw-r--r-- | tools/linguist/shared/profileevaluator.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tools/linguist/shared/profileevaluator.cpp b/tools/linguist/shared/profileevaluator.cpp index 14355b3..5c83f7e 100644 --- a/tools/linguist/shared/profileevaluator.cpp +++ b/tools/linguist/shared/profileevaluator.cpp @@ -367,6 +367,9 @@ void ProFileEvaluator::Private::insertVariable(const QString &line, int *i) { ProVariable::VariableOperator opkind; + if (m_proitem.isEmpty()) // Line starting with '=', like a conflict marker + return; + switch (m_proitem.at(m_proitem.length() - 1).unicode()) { case '+': m_proitem.chop(1); @@ -2022,7 +2025,13 @@ ProFile *ProFileEvaluator::parsedProFile(const QString &fileName) { QFileInfo fi(fileName); if (fi.exists()) { - ProFile *pro = new ProFile(fi.absoluteFilePath()); + QString fn = QDir::cleanPath(fi.absoluteFilePath()); + foreach (const ProFile *pf, d->m_profileStack) + if (pf->fileName() == fn) { + errorMessage(d->format("circular inclusion of %1").arg(fn)); + return 0; + } + ProFile *pro = new ProFile(fn); if (d->read(pro)) return pro; delete pro; |