diff options
author | meta <s@w23.at> | 2011-01-17 21:34:46 (GMT) |
---|---|---|
committer | meta <s@w23.at> | 2011-01-17 21:34:46 (GMT) |
commit | e63576ce1aa85b7149f37a1f896a84f17ae58a7d (patch) | |
tree | 3ec0c3564032e45218c5e148f70bb823c2d5d970 | |
parent | e6db5c9cc7c61b60a3a66d034950cd0a569b1b0d (diff) |
replace stat() with QFileInfo
-rw-r--r-- | src/mainwin.cc | 10 |
1 files changed, 2 insertions, 8 deletions
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 <unistd.h> -// for stat() -#include <sys/types.h> -#include <sys/stat.h> - #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; |