summaryrefslogtreecommitdiff
path: root/src/context.cc
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2011-12-06 03:09:39 (GMT)
committerMarius Kintel <marius@kintel.net>2011-12-06 03:09:39 (GMT)
commitae30a7978475f8e5bc8272fd1e073fae7f4bd3ed (patch)
tree35de3d04d39d9a767cf828f68713cdd82262213d /src/context.cc
parent0d6b87dd0e28e53ec4601443c7d06dbb66628d47 (diff)
Ported from QFileInfo to boost::filesystem
Diffstat (limited to 'src/context.cc')
-rw-r--r--src/context.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/context.cc b/src/context.cc
index bd97f8f..176bf8d 100644
--- a/src/context.cc
+++ b/src/context.cc
@@ -30,9 +30,9 @@
#include "module.h"
#include "builtin.h"
#include "printutils.h"
-#include <QFileInfo>
-#include <QDir>
#include <boost/foreach.hpp>
+#include <boost/filesystem.hpp>
+using namespace boost::filesystem;
std::vector<const Context*> Context::ctx_stack;
@@ -175,8 +175,7 @@ AbstractNode *Context::evaluate_module(const ModuleInstantiation &inst) const
std::string Context::getAbsolutePath(const std::string &filename) const
{
if (!filename.empty()) {
- return QFileInfo(QDir(QString::fromStdString(this->document_path)),
- QString::fromStdString(filename)).absoluteFilePath().toStdString();
+ return absolute(path(this->document_path) / filename).native();
}
else {
return filename;
contact: Jan Huwald // Impressum