Changeset 790262f


Ignore:
Timestamp:
12/19/14 10:21:31 (5 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, enter/10, releng/10.1.1, releng/10.1.2
Children:
5d7a8f1, d3f54d7
Parents:
f44fa89
Message:

Fix the LP tray app, now when replications finish, properly reflect
this on the tray

Location:
src-qt5/life-preserver/lp-tray
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src-qt5/life-preserver/lp-tray/LPTray.cpp

    r3667cdb r790262f  
    9595// =============== 
    9696void LPTray::watcherMessage(QString type){ 
    97   qDebug() << "New Watcher Message:" << type; 
     97  if ( ! type.isEmpty() ) 
     98    qDebug() << "New Watcher Message:" << type; 
     99 
    98100  QStringList info; 
    99101  if(type=="message" &&  popupPolicy > 1){ 
  • src-qt5/life-preserver/lp-tray/LPWatcher.cpp

    r3667cdb r790262f  
    167167  while(!LFSTREAM->atEnd()){ 
    168168    QString log = LFSTREAM->readLine(); 
     169 
    169170    //Divide up the log into it's sections 
    170171    QString timestamp = log.section(":",0,2).simplified(); 
     
    172173    QString message = log.section(":",3,3).toLower().simplified(); 
    173174    QString dev = log.section(":",4,4).simplified(); //dataset/snapshot/nothing 
     175 
    174176    //Now decide what to do/show because of the log message 
    175177    //qDebug() << "New Log Message:" << log; 
     
    202204        if(!quiet){ emit MessageAvailable("replication"); } 
    203205      } 
    204     }else if(message.contains("Finished replication")){ 
     206    }else if(message.contains("finished replication task")){ 
    205207      stopRepFileWatcher(); 
    206       dev = message.section(" ",-1).simplified(); 
     208      dev = message.section(" ",-3, -3).simplified(); 
    207209      //Make sure the device is currently setup for replication 
    208210      if( reppools.contains(dev) ){ 
     
    318320  }*/ 
    319321  //Check to make sure that lpreserver actually has a process running before starting this 
    320   if( !isReplicationRunning() ){ qDebug() << "PID not found"; FILE_REPLICATION.clear(); return false; } 
     322  if( !isReplicationRunning() ){ FILE_REPLICATION.clear(); return false; } 
    321323  //Check for the existance of the file to watch and create it as necessary   
    322324  if(!QFile::exists(FILE_REPLICATION)){ system( QString("touch "+FILE_REPLICATION).toUtf8() ); } 
Note: See TracChangeset for help on using the changeset viewer.