CloseAppsDialog::CloseAppsDialog(QWidget *parent) : QDialog( parent, Qt::Dialog | Qt::CustomizeWindowHint | Qt::WindowTitleHint ), ui(new Ui::CloseAppsDialog) { ui->setupUi(this); setWindowTitle( tr( "Close Apps" ) ); ui->text->setText( tr( "We are trying to install new media player plugins. The following apps need to be closed before you can continue." ) ); checkApps(); QTimer* timer = new QTimer( this ); connect( timer, SIGNAL(timeout()), SLOT(checkApps()) ); timer->setInterval( 1000 ); timer->start(); }
TorManager::TorManager() { tor=0L; torcontrol = 0L; m_checkTorSilently = false; m_proxyConfigured = false; m_timer = new QTimer(this); connect(m_timer, SIGNAL(timeout()), this, SLOT(checkTorSilently())); checkApps(); m_countries = new Countries(); }
void TorManager::checkTorInstallation(bool checkTorSilently) { checkApps(); m_checkTorSilently = checkTorSilently; if (!m_checkTorSilently) { setBrowsingEnabled(false); BrowserApplication::instance()->mainWindow()->stopReloadAction()->setEnabled(false); BrowserApplication::instance()->mainWindow()->setStatusBarMessagesEnabled(false); reportTorCheckResults(TOR_CHECK); } http = new QHttp(QLatin1String("check.torproject.org"), QHttp::ConnectionModeHttps, 443, this); QNetworkProxy proxy = BrowserApplication::instance()->networkAccessManager()->currentProxy(); http->setProxy(proxy); http->get(QLatin1String("/?TorButton=True")); connect(http, SIGNAL(done(bool)), this, SLOT(torCheckComplete(bool))); }