summaryrefslogtreecommitdiff
path: root/tests/csgtestcore.cc
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2011-12-24 23:22:03 (GMT)
committerMarius Kintel <marius@kintel.net>2011-12-24 23:22:03 (GMT)
commit9293b591c720d2021be15b3bed56633d2ac17a8d (patch)
treecc1d05a3b9f6599f6bc2168fbfe8a78f2f6711d2 /tests/csgtestcore.cc
parenta5ea98c4a499bdc534d58ecf4881d6ce435d3bd5 (diff)
Ported currentdir handling from Qt to boost filesystem
Diffstat (limited to 'tests/csgtestcore.cc')
-rw-r--r--tests/csgtestcore.cc15
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);
contact: Jan Huwald // Impressum