Changeset 74 for trunk/src/gui/about.cpp

Show
Ignore:
Timestamp:
01/12/06 18:37:22 (3 years ago)
Author:
edmanm
Message:

Create an instance of TorControl? as a member of MainWindow? and then pass a
pointer to that instance to each child dialog (that needs access to Tor) in
its constructor.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/gui/about.cpp

    r73 r74  
    2424#include "about.h" 
    2525 
    26 AboutDialog::AboutDialog(QWidget *parent) 
     26AboutDialog::AboutDialog(TorControl *torControl, QWidget *parent) 
    2727: QDialog(parent) 
    2828{ 
     
    3232  ui.lblVidaliaVersion->setText(VidaliaSettings::getVersion()); 
    3333 
    34 /* FIXME Need access to global TorControl object to retrieve version */ 
    35 /* 
    36   QString* errmsg; 
    37   QString torVersion = TorControl::getTorVersion(errmsg); 
    38   if (errmsg) { 
    39     ui.lblTorVersion->setText("Unknown"); 
    40   } else { 
    41     ui.lblTorVersion->setText(torVersion); 
    42   } 
    43 */ 
     34  /* Access the TorControl object to retrieve version */ 
     35  ui.lblTorVersion->setText(torControl->getTorVersion()); 
    4436 
    4537  /* Get Qt's version number */ 
    4638  ui.lblQtVersion->setText(QT_VERSION_STR); 
    4739} 
     40