Ignore:
Timestamp:
02/20/14 14:48:48 (10 months ago)
Author:
Ken Moore <ken@…>
Branches:
master, releng/10.0.1, releng/10.0.2, releng/10.0.3, releng/10.1
Children:
07e812b
Parents:
6b7fcc5
Message:

Add the ability for the AppCafe? to install random PBI files on the system through a menu option, and update the Installed tab interface a bit to make it more uniform between the two pages. Still have a couple things to do to finish it up, but it is perfectly functional.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src-qt4/pc-softwaremanager/extras.h

    r0b12758 re543bca  
    3232#include <QDebug> 
    3333#include <QProcessEnvironment> 
     34#include <QProcess> 
     35#include <QCoreApplication> 
    3436 
    3537class Extras{ 
     
    149151 } 
    150152  
     153static QStringList getCmdOutput(QString cmd, QString dir = ""){ 
     154  QProcess *proc = new QProcess; 
     155  proc->setProcessChannelMode(QProcess::MergedChannels); 
     156  if( !dir.isEmpty() && QFile::exists(dir) ){ proc->setWorkingDirectory(dir); } 
     157  proc->start(cmd); 
     158  while(!proc->waitForFinished(300)){ 
     159    QCoreApplication::processEvents(); 
     160  } 
     161  QStringList out = QString(proc->readAllStandardOutput()).split("\n");  
     162  delete proc;   
     163  return out; 
     164} 
     165  
    151166}; 
    152167 
Note: See TracChangeset for help on using the changeset viewer.