Changeset 3b696abf


Ignore:
Timestamp:
12/06/13 01:09:24 (12 months ago)
Author:
yurkis <yurkis@…>
Branches:
master, releng/10.0, releng/10.0.1, releng/10.0.2, releng/10.0.3, releng/10.1
Children:
2b8a19b
Parents:
ba90871
Message:

Fix jails support command line

Location:
src-qt4/pc-updatecenter
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src-qt4/pc-updatecenter/main.cpp

    r03d4335 r3b696abf  
    1010 
    1111int main(int argc, char *argv[]) 
    12 { 
     12{         
    1313    PCSingleApplication a(argc, argv); 
    1414 
    15     MainWindow w; 
    16  
    17     QObject::connect(&a, SIGNAL(messageReceived(const QString &)), &w, SLOT(slotSingleInstance())); 
     15    CJailsBackend jail; 
     16    CJailsBackend* pJail = NULL; 
    1817 
    1918    bool is_warden_found= false; 
     
    3433    }//for all args 
    3534    if (jail_name.length()) 
    36     { 
    37         CJailsBackend jail; 
     35    {         
    3836        jail.setJail(jail_name); 
    39         jail.setJailEnabled(true); 
    40         qDebug()<<"JAIL"; 
    41         w.setJail(jail); 
     37        jail.setJailEnabled(true);         
     38        pJail = &jail; 
    4239    } 
     40 
     41    MainWindow w(pJail); 
     42 
     43    QObject::connect(&a, SIGNAL(messageReceived(const QString &)), &w, SLOT(slotSingleInstance())); 
    4344 
    4445    w.show(); 
  • src-qt4/pc-updatecenter/mainwindow.cpp

    r14ec59d r3b696abf  
    7171 
    7272/////////////////////////////////////////////////////////////////////////////// 
    73 MainWindow::MainWindow(QWidget *parent) : 
     73MainWindow::MainWindow(CJailsBackend *jail, QWidget *parent) : 
    7474    QMainWindow(parent), 
    7575    ui(new Ui::MainWindow) 
    7676{ 
    7777    ui->setupUi(this); 
     78    if (jail) 
     79    { 
     80        mJail = *jail; 
     81    } 
    7882    init(); 
    7983} 
  • src-qt4/pc-updatecenter/mainwindow.h

    rf8829868 r3b696abf  
    4444     
    4545public: 
    46     explicit MainWindow(QWidget *parent = 0); 
     46    explicit MainWindow(CJailsBackend* jail=0, QWidget *parent = 0); 
    4747    ~MainWindow(); 
    4848 
Note: See TracChangeset for help on using the changeset viewer.