Commit e3526544 authored by hjk's avatar hjk
Browse files

Further remove the number of QDir::cleanPath calls.



Change-Id: I638fe4291d6b682864d0a0c3938ad0066e060a3a
Reviewed-by: default avatarErik Verbruggen <erik.verbruggen@digia.com>
parent c5e44f55
......@@ -340,9 +340,10 @@ QStringList Document::includedFiles() const
return files;
}
// This assumes to be called with a QDir::cleanPath cleaned fileName.
void Document::addIncludeFile(const QString &fileName, unsigned line)
{
_includes.append(Include(QDir::cleanPath(fileName), line));
_includes.append(Include(fileName, line));
}
void Document::appendMacro(const Macro &macro)
......
......@@ -30,6 +30,7 @@
#include "FastPreprocessor.h"
#include <Literals.h>
#include <TranslationUnit.h>
#include <QDir>
using namespace CPlusPlus;
......@@ -62,7 +63,9 @@ QByteArray FastPreprocessor::run(Document::Ptr newDoc, const QString &source)
void FastPreprocessor::sourceNeeded(unsigned line, QString &fileName, IncludeType)
{
Q_ASSERT(_currentDoc);
_currentDoc->addIncludeFile(fileName, line);
// CHECKME: Is that cleanName needed?
QString cleanName = QDir::cleanPath(fileName);
_currentDoc->addIncludeFile(cleanName, line);
mergeEnvironment(fileName);
}
......
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