[PC-BSD Commits] r14986 - pcbsd/current/src-qt4/pc-systemupdatertray

svn at pcbsd.org svn at pcbsd.org
Sat Jan 21 21:49:16 PST 2012


Author: kris
Date: 2012-01-22 05:49:16 +0000 (Sun, 22 Jan 2012)
New Revision: 14986

Modified:
   pcbsd/current/src-qt4/pc-systemupdatertray/UpdaterTray.cpp
Log:

Fix the trigger file, so we refresh after doing updates



Modified: pcbsd/current/src-qt4/pc-systemupdatertray/UpdaterTray.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-systemupdatertray/UpdaterTray.cpp	2012-01-21 10:15:48 UTC (rev 14985)
+++ pcbsd/current/src-qt4/pc-systemupdatertray/UpdaterTray.cpp	2012-01-22 05:49:16 UTC (rev 14986)
@@ -139,8 +139,8 @@
   if ( sysTrig.open( QIODevice::WriteOnly ) ) {
     QTextStream streamTrig( &sysTrig );
      streamTrig << QDateTime::currentDateTime().toString("hhmmss");
-     sysTrig.close();
   }
+  sysTrig.close();
 
   // Start our file watchers
   fileWatcherAutoUpdate = new QFileSystemWatcher();
@@ -247,6 +247,22 @@
 
       contextMenuRefresh();
    }
+   file.close();
+
+   if ( ! file.exists() ) {
+     QFile sysTrig( SYSTRIGGER );
+     if ( sysTrig.open( QIODevice::WriteOnly ) ) {
+       QTextStream streamTrig( &sysTrig );
+       streamTrig << QDateTime::currentDateTime().toString("hhmmss");
+     }
+     sysTrig.close();
+
+     // Start our file watchers
+     fileWatcherAutoUpdate = new QFileSystemWatcher();
+     fileWatcherAutoUpdate->addPath(SYSTRIGGER);
+     connect(fileWatcherAutoUpdate, SIGNAL(fileChanged(const QString&)), this, SLOT(slotSetTimerReadAutoStatus() ));
+   }
+
 }
 
 void UpdaterTray::slotCheckAllUpdates()



More information about the Commits mailing list