diff options
author | Marius Kintel <marius@kintel.net> | 2011-04-12 15:51:45 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2011-04-12 15:51:45 (GMT) |
commit | 1754a970a76c071fff91cc7c716aa0b78b4ac6be (patch) | |
tree | 5faa0fad3b5324423cd44413d5fdd16c586c1e29 /src/mainwin.cc | |
parent | 592ca6abadcb6443629be4407b973279a891278c (diff) | |
parent | a3cfe9e6d76f41cbd13711d1bc3843afe3d14f2d (diff) |
Merge branch 'master' of github.com:openscad/openscad
Diffstat (limited to 'src/mainwin.cc')
-rw-r--r-- | src/mainwin.cc | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/src/mainwin.cc b/src/mainwin.cc index ef738fc..e217b1f 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 @@ -72,13 +73,6 @@ #include "qlanguagefactory.h" #endif -//for chdir -#include <unistd.h> - -// for stat() -#include <sys/types.h> -#include <sys/stat.h> - #ifdef ENABLE_CGAL #if 1 @@ -117,7 +111,7 @@ static char helptitle[] = QUOTED(OPENSCAD_VERSION) " (www.openscad.org)\n"; 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" @@ -992,10 +986,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; @@ -1473,7 +1465,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; |