summaryrefslogtreecommitdiff
path: root/src/mainwin.cc
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2011-04-12 18:35:44 (GMT)
committerMarius Kintel <marius@kintel.net>2011-04-12 18:35:44 (GMT)
commitd24b3cc84d0701a5423925765e515db7df9614c5 (patch)
tree0d63867d8b5a3c6ffe107371caa6b29cf8ad0f02 /src/mainwin.cc
parent633343c47e0d2bced64d47f62e814489b8e76dc2 (diff)
parent1754a970a76c071fff91cc7c716aa0b78b4ac6be (diff)
Ported recent changes to master into the visitor branch
Diffstat (limited to 'src/mainwin.cc')
-rw-r--r--src/mainwin.cc22
1 files changed, 7 insertions, 15 deletions
diff --git a/src/mainwin.cc b/src/mainwin.cc
index e7014fa..c500938 100644
--- a/src/mainwin.cc
+++ b/src/mainwin.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
@@ -80,13 +81,6 @@
#include <boost/lambda/bind.hpp>
using namespace boost::lambda;
-//for chdir
-#include <unistd.h>
-
-// for stat()
-#include <sys/types.h>
-#include <sys/stat.h>
-
#ifdef ENABLE_CGAL
#if 1
@@ -127,7 +121,7 @@ static char helptitle[] =
"OpenSCAD " QUOTED(OPENSCAD_VERSION) " (www.openscad.org)\n"
"Visitor refactored version";
static char copyrighttext[] =
- "Copyright (C) 2009 Clifford Wolf <clifford@clifford.at>\n"
+ "Copyright (C) 2009-2011 Marius Kintel <marius@kintel.net> and Clifford Wolf <clifford@clifford.at>\n"
"\n"
"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"
@@ -1009,10 +1003,8 @@ void MainWindow::pasteViewportRotation()
void MainWindow::checkAutoReload()
{
QString new_stinfo;
- struct stat st;
- memset(&st, 0, sizeof(struct stat));
- stat(this->fileName.toAscii().data(), &st);
- new_stinfo.sprintf("%x.%x", (int)st.st_mtime, (int)st.st_size);
+ QFileInfo finfo(this->fileName);
+ new_stinfo = QString::number(finfo.size()) + QString::number(finfo.lastModified().toTime_t());
if (new_stinfo != autoReloadInfo)
actionReloadCompile();
autoReloadInfo = new_stinfo;
@@ -1526,7 +1518,7 @@ static void renderGLviaCGAL(void *vp)
glColor3f(col2.redF(), col2.greenF(), col2.blueF());
// Extract the boundary, including inner boundaries of the polygons
- for (fci_t fit = E.faces_begin(), fend = E.faces_end(); fit != fend; ++fit)
+ for (fci_t fit = E.faces_begin(), facesend = E.faces_end(); fit != facesend; ++fit)
{
bool fset = false;
double fx = 0.0, fy = 0.0;
contact: Jan Huwald // Impressum