FEATURE: Software update check can now be disabled (Mac OS X / Windows)

This commit is contained in:
Christophe Dumez 2010-12-21 17:41:11 +00:00
parent 4065972179
commit 6bcbfa2e05
4 changed files with 46 additions and 14 deletions

View file

@ -271,9 +271,11 @@ MainWindow::MainWindow(QWidget *parent, QStringList torrentCmdLine) : QMainWindo
#endif
#if defined(Q_WS_WIN) || defined(Q_WS_MAC)
// Check for update
ProgramUpdater *updater = new ProgramUpdater(this);
connect(updater, SIGNAL(updateCheckFinished(bool, QString)), SLOT(handleUpdateCheckFinished(bool, QString)));
updater->checkForUpdates();
if(pref.isUpdateCheckEnabled()) {
ProgramUpdater *updater = new ProgramUpdater(this);
connect(updater, SIGNAL(updateCheckFinished(bool, QString)), SLOT(handleUpdateCheckFinished(bool, QString)));
updater->checkForUpdates();
}
#endif
}
@ -1260,14 +1262,14 @@ void MainWindow::showConnectionSettings()
void MainWindow::on_actionExecution_Logs_triggered(bool checked)
{
if(checked) {
Q_ASSERT(!m_executionLog);
m_executionLog = new ExecutionLog(tabs);
int index_tab = tabs->addTab(m_executionLog, tr("Execution Log"));
tabs->setTabIcon(index_tab, misc::getIcon("view-calendar-journal"));
} else {
Q_ASSERT(m_executionLog);
delete m_executionLog;
}
Preferences().setExecutionLogEnabled(checked);
if(checked) {
Q_ASSERT(!m_executionLog);
m_executionLog = new ExecutionLog(tabs);
int index_tab = tabs->addTab(m_executionLog, tr("Execution Log"));
tabs->setTabIcon(index_tab, misc::getIcon("view-calendar-journal"));
} else {
Q_ASSERT(m_executionLog);
delete m_executionLog;
}
Preferences().setExecutionLogEnabled(checked);
}