diff options
author | Marius Kintel <marius@kintel.net> | 2011-12-24 23:22:03 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2011-12-24 23:22:03 (GMT) |
commit | 9293b591c720d2021be15b3bed56633d2ac17a8d (patch) | |
tree | cc1d05a3b9f6599f6bc2168fbfe8a78f2f6711d2 /tests/csgtestcore.cc | |
parent | a5ea98c4a499bdc534d58ecf4881d6ce435d3bd5 (diff) |
Ported currentdir handling from Qt to boost filesystem
Diffstat (limited to 'tests/csgtestcore.cc')
-rw-r--r-- | tests/csgtestcore.cc | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/tests/csgtestcore.cc b/tests/csgtestcore.cc index 7ad0a35..4cb612a 100644 --- a/tests/csgtestcore.cc +++ b/tests/csgtestcore.cc @@ -23,16 +23,16 @@ #include "OffscreenView.h" #include <QApplication> -#include <QFile> -#include <QDir> -#include <QSet> #include <QTimer> #include <sstream> #include <vector> #include <boost/program_options.hpp> +#include <boost/filesystem.hpp> + namespace po = boost::program_options; +namespace fs = boost::filesystem; using std::string; using std::vector; @@ -251,9 +251,9 @@ int csgtestcore(int argc, char *argv[], test_type_e test_type) QApplication app(argc, argv, false); - QDir original_path = QDir::current(); + fs::path original_path = fs::current_path(); - QString currentdir = QDir::currentPath(); + std::string currentdir = fs::current_path().generic_string(); parser_init(); @@ -273,8 +273,7 @@ int csgtestcore(int argc, char *argv[], test_type_e test_type) } if (!sysinfo_dump) { - QFileInfo fileInfo(filename); - QDir::setCurrent(fileInfo.absolutePath()); + fs::current_path(fs::path(filename).parent_path()); } AbstractNode::resetIndexCounter(); @@ -339,7 +338,7 @@ int csgtestcore(int argc, char *argv[], test_type_e test_type) } } - QDir::setCurrent(original_path.absolutePath()); + fs::current_path(original_path); try { csgInfo.glview = new OffscreenView(512,512); |