Commit 922909b0 authored by Oswald Buddenhagen's avatar Oswald Buddenhagen
Browse files

cache profile's parent directory

parent 18f8097a
......@@ -625,8 +625,7 @@ bool ProFileEvaluator::Private::visitBeginProFile(ProFile * pro)
m_cumulative = cumulative;
}
QString fn = pro->fileName();
ok = QDir::setCurrent(QFileInfo(fn).absolutePath());
ok = QDir::setCurrent(pro->directoryName());
}
return ok;
......@@ -961,8 +960,7 @@ QString ProFileEvaluator::Private::currentFileName() const
QString ProFileEvaluator::Private::currentDirectory() const
{
ProFile *cur = m_profileStack.top();
QFileInfo fi(cur->fileName());
return fi.absolutePath();
return cur->directoryName();
}
QStringList ProFileEvaluator::Private::expandVariableReferences(const QString &str)
......
......@@ -275,6 +275,7 @@ ProFile::ProFile(const QString &fileName)
QFileInfo fi(fileName);
m_displayFileName = fi.fileName();
m_directoryName = fi.absolutePath();
}
ProFile::~ProFile()
......@@ -291,6 +292,11 @@ QString ProFile::fileName() const
return m_fileName;
}
QString ProFile::directoryName() const
{
return m_directoryName;
}
void ProFile::setModified(bool modified)
{
m_modified = modified;
......
......@@ -209,6 +209,7 @@ public:
QString displayFileName() const;
QString fileName() const;
QString directoryName() const;
void setModified(bool modified);
bool isModified() const;
......@@ -218,6 +219,7 @@ public:
private:
QString m_fileName;
QString m_displayFileName;
QString m_directoryName;
bool m_modified;
};
......
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