diff options
author | Marius Kintel <marius@kintel.net> | 2011-01-21 22:04:13 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2011-01-21 22:04:13 (GMT) |
commit | 0419cd823216b6ade267d4e0bdd071242aa8bc55 (patch) | |
tree | 395bf49dbe96d4d46cf76c86c92746b89bd4b4f9 /src/mainwin.cc | |
parent | 195d21dd2d535a3ff06d3f3dfe1b1cdbabd4a0d8 (diff) | |
parent | 52a474eb5213cfdda7b4825d51861de27b48954f (diff) |
Merge branch 'meta23-master'
Diffstat (limited to 'src/mainwin.cc')
-rw-r--r-- | src/mainwin.cc | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/src/mainwin.cc b/src/mainwin.cc index a5c49f0..e217b1f 100644 --- a/src/mainwin.cc +++ b/src/mainwin.cc @@ -73,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 @@ -993,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; @@ -1474,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; |