summaryrefslogtreecommitdiff
path: root/tests/cgaltest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'tests/cgaltest.cc')
-rw-r--r--tests/cgaltest.cc18
1 files changed, 8 insertions, 10 deletions
diff --git a/tests/cgaltest.cc b/tests/cgaltest.cc
index 6412338..8bdf417 100644
--- a/tests/cgaltest.cc
+++ b/tests/cgaltest.cc
@@ -39,10 +39,6 @@
#include "PolySetCGALEvaluator.h"
#include <QApplication>
-#include <QFile>
-#include <QDir>
-#include <QSet>
-#include <QTextStream>
#ifndef _MSC_VER
#include <getopt.h>
#endif
@@ -50,8 +46,11 @@
#include <assert.h>
#include <sstream>
+#include <boost/filesystem.hpp>
+namespace fs = boost::filesystem;
+
std::string commandline_commands;
-QString currentdir;
+std::string currentdir;
QString examplesdir;
using std::string;
@@ -86,9 +85,9 @@ int main(int argc, char **argv)
Builtins::instance()->initialize();
QApplication app(argc, argv, false);
- QDir original_path = QDir::current();
+ fs::path original_path = fs::current_path();
- currentdir = QDir::currentPath();
+ currentdir = fs::current_path().generic_string();
parser_init();
@@ -103,8 +102,7 @@ int main(int argc, char **argv)
exit(1);
}
- QFileInfo fileInfo(filename);
- QDir::setCurrent(fileInfo.absolutePath());
+ fs::current_path(fs::path(filename).parent_path());
AbstractNode::resetIndexCounter();
AbstractNode *absolute_root_node = root_module->evaluate(&root_ctx, &root_inst);
@@ -119,7 +117,7 @@ int main(int argc, char **argv)
CGAL_Nef_polyhedron N = cgalevaluator.evaluateCGALMesh(*root_node);
- QDir::setCurrent(original_path.absolutePath());
+ current_path(original_path);
if (!N.empty()) {
export_stl(&N, std::cout, NULL);
}
contact: Jan Huwald // Impressum