summaryrefslogtreecommitdiff
path: root/src/mainwin.cc
diff options
context:
space:
mode:
authormeta <s@w23.at>2011-01-17 21:34:46 (GMT)
committermeta <s@w23.at>2011-01-17 21:34:46 (GMT)
commite63576ce1aa85b7149f37a1f896a84f17ae58a7d (patch)
tree3ec0c3564032e45218c5e148f70bb823c2d5d970 /src/mainwin.cc
parente6db5c9cc7c61b60a3a66d034950cd0a569b1b0d (diff)
replace stat() with QFileInfo
Diffstat (limited to 'src/mainwin.cc')
-rw-r--r--src/mainwin.cc10
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;
contact: Jan Huwald // Impressum