summaryrefslogtreecommitdiff
path: root/src/dxflinextrude.cc
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2011-04-12 15:51:45 (GMT)
committerMarius Kintel <marius@kintel.net>2011-04-12 15:51:45 (GMT)
commit1754a970a76c071fff91cc7c716aa0b78b4ac6be (patch)
tree5faa0fad3b5324423cd44413d5fdd16c586c1e29 /src/dxflinextrude.cc
parent592ca6abadcb6443629be4407b973279a891278c (diff)
parenta3cfe9e6d76f41cbd13711d1bc3843afe3d14f2d (diff)
Merge branch 'master' of github.com:openscad/openscad
Diffstat (limited to 'src/dxflinextrude.cc')
-rw-r--r--src/dxflinextrude.cc21
1 files changed, 9 insertions, 12 deletions
diff --git a/src/dxflinextrude.cc b/src/dxflinextrude.cc
index 83c3d9c..9661066 100644
--- a/src/dxflinextrude.cc
+++ b/src/dxflinextrude.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
@@ -34,13 +35,11 @@
#include "progress.h"
#include "openscad.h" // get_fragments_from_r()
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-
#include <QApplication>
#include <QTime>
#include <QProgressDialog>
+#include <QDateTime>
+#include <QFileInfo>
class DxfLinearExtrudeModule : public AbstractModule
{
@@ -320,14 +319,12 @@ QString DxfLinearExtrudeNode::dump(QString indent) const
{
if (dump_cache.isEmpty()) {
QString text;
- struct stat st;
- memset(&st, 0, sizeof(struct stat));
- stat(filename.toAscii().data(), &st);
+ QFileInfo fileInfo(filename);
text.sprintf("linear_extrude(file = \"%s\", cache = \"%x.%x\", layer = \"%s\", "
"height = %g, origin = [ %g %g ], scale = %g, center = %s, convexity = %d",
- filename.toAscii().data(), (int)st.st_mtime, (int)st.st_size,
- layername.toAscii().data(), height, origin_x, origin_y, scale,
- center ? "true" : "false", convexity);
+ filename.toAscii().data(), (int)fileInfo.lastModified().toTime_t(),
+ (int)fileInfo.size(), layername.toAscii().data(), height, origin_x,
+ origin_y, scale, center ? "true" : "false", convexity);
if (has_twist) {
QString t2;
t2.sprintf(", twist = %g, slices = %d", twist, slices);
contact: Jan Huwald // Impressum