Ignore:
Timestamp:
02/14/14 06:55:15 (5 months ago)
Author:
Ken Moore <ken@…>
Branches:
master, releng/10.0.1, releng/10.0.2
Children:
a74d9df
Parents:
b02e573
Message:

Add the diagnostic sheet generation functionality to pc-bugreport

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src-qt4/pc-bugreport/toolbox.cpp

    r1620346 ra238837  
    44 
    55#include <QFile> 
     6#include <QDir> 
    67#include <QProcess> 
     8#include <QDate> 
    79 
    810#define PREFIX "/usr/local/" 
     
    6971void Toolbox::on_actionDiagnostic_report_triggered() 
    7072{ 
    71  
     73        //Generate the diagnostic file on the user desktop 
     74        QString filename = QDir::homePath()+"/Desktop/diagnostic-"+QDate::currentDate().toString("yyyyMMdd")+".txt"; 
     75        QString username = getenv("LOGNAME"); 
     76        QString cmd = "/usr/local/share/pcbsd/scripts/GetDiagSheet.sh "+filename+" "+username; 
     77        QProcess p; 
     78        p.setProcessEnvironment(QProcessEnvironment::systemEnvironment()); 
     79        p.start(cmd); 
     80        while(p.waitForFinished(200)){ 
     81          QApplication::processEvents(); 
     82        } 
     83        //Now show the info dialog for the newly generated diagnostic file 
     84        ShowInfoDialog *dlg = new ShowInfoDialog(this); 
     85        dlg->show(filename); 
     86         
    7287} 
    7388 
Note: See TracChangeset for help on using the changeset viewer.