From e63576ce1aa85b7149f37a1f896a84f17ae58a7d Mon Sep 17 00:00:00 2001 From: meta Date: Mon, 17 Jan 2011 22:34:46 +0100 Subject: replace stat() with QFileInfo diff --git a/src/mainwin.cc b/src/mainwin.cc index ef738fc..7645860 100644 --- a/src/mainwin.cc +++ b/src/mainwin.cc @@ -75,10 +75,6 @@ //for chdir #include -// for stat() -#include -#include - #ifdef ENABLE_CGAL #if 1 @@ -992,10 +988,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; -- cgit v0.10.1