Changeset 3536549


Ignore:
Timestamp:
01/23/15 05:55:05 (7 days ago)
Author:
Ken Moore <ken@…>
Branches:
releng/10.1.1
Children:
9107eac
Parents:
3c19b9d
git-author:
Ken Moore <ken@…> (01/23/15 05:49:32)
git-committer:
Ken Moore <ken@…> (01/23/15 05:55:05)
Message:

Add knowledge of the other (non-running) log file to pc-updategui. Now the log tab will always show the most recent logging information (/var/log/pc-updatemanager.log for when an update is running, and /var/log/pc-updatemanager-auto.log for when updates are finished/not running).

Location:
src-qt5/pc-updategui
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src-qt5/pc-updategui/mainUI.cpp

    r5787058 r3536549  
    3535  //Initialize the log file watcher 
    3636  watcher = new QFileSystemWatcher(this); 
    37     watcher->addPath(UPDATE_LOG_FILE); 
     37    watcher->addPath(UPDATE_LOG_FILE_RUNNING); 
    3838         
    3939  //Create/set the list of auto-update options   
     
    171171  //Now make sure that the log file is being watched (in case it did not exist earlier) 
    172172  if(watcher->files().isEmpty()){ 
    173     watcher->addPath(UPDATE_LOG_FILE); 
     173    watcher->addPath(UPDATE_LOG_FILE_RUNNING); 
    174174  } 
    175175} 
     
    231231  //Check that the tab is visible(don't want to constantly be reading the file if not visible) 
    232232  if(ui->tabWidget->currentWidget()==ui->tab_log){ 
    233     QString log = pcbsd::Utils::readTextFile(UPDATE_LOG_FILE); 
     233    QString log = pcbsd::Utils::readTextFile(UPDATE_LOG_FILE_RUNNING); 
     234    if(log.isEmpty()){ log = pcbsd::Utils::readTextFile(UPDATE_LOG_FILE); } 
    234235    //QString clog = ui->text_log->toPlainText(); 
    235236    //if(clog.length() > log.length() || clog.isEmpty() ){ 
  • src-qt5/pc-updategui/mainUI.h

    r00ef2df9 r3536549  
    99#include <pcbsd-utils.h> 
    1010 
    11 #define UPDATE_LOG_FILE QString("/var/log/pc-updatemanager.log") 
     11#define UPDATE_LOG_FILE_RUNNING QString("/var/log/pc-updatemanager.log") 
     12#define UPDATE_LOG_FILE QString("/var/log/pc-updatemanager-auto.log") 
    1213 
    1314namespace Ui{ 
Note: See TracChangeset for help on using the changeset viewer.