diff options
Diffstat (limited to 'src/dxfrotextrude.cc')
-rw-r--r-- | src/dxfrotextrude.cc | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/dxfrotextrude.cc b/src/dxfrotextrude.cc index b59270f..7b89676 100644 --- a/src/dxfrotextrude.cc +++ b/src/dxfrotextrude.cc @@ -1,6 +1,7 @@ /* - * OpenSCAD (www.openscad.at) - * Copyright (C) 2009 Clifford Wolf <clifford@clifford.at> + * OpenSCAD (www.openscad.org) + * Copyright (C) 2009-2011 Clifford Wolf <clifford@clifford.at> and + * Marius Kintel <marius@kintel.net> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -35,14 +36,13 @@ #include "PolySetRenderer.h" #include "openscad.h" // get_fragments_from_r() -#include <sys/types.h> -#include <sys/stat.h> -#include <unistd.h> #include <sstream> #include <QTime> #include <QApplication> #include <QProgressDialog> +#include <QDateTime> +#include <QFileInfo> class DxfRotateExtrudeModule : public AbstractModule { @@ -125,12 +125,10 @@ std::string DxfRotateExtrudeNode::toString() const { std::stringstream stream; - struct stat st; - memset(&st, 0, sizeof(struct stat)); - stat(filename.toAscii().data(), &st); + QFileInfo fileInfo(this->filename); stream << this->name() << "(" "file = \"" << this->filename << "\", " - "cache = \"" << std::hex << (int)st.st_mtime << "." << (int)st.st_size << "\", " + "cache = \"" << std::hex << (int)fileInfo.lastModified().toTime_t() << "." << (int)fileInfo.size() << "\", " "layer = \"" << this->layername << "\", " "origin = [ " << std::dec << this->origin_x << " " << this->origin_y << " ], " "scale = " << this->scale << ", " |