mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 14:38:04 -06:00
Manually backport from master, commit 00e09435 and its fixes. Original author Bruno Barbieri.
This commit is contained in:
@@ -260,12 +260,15 @@ MainWindow::MainWindow(QWidget *parent, const QStringList& torrentCmdLine) : QMa
|
||||
autoShutdownGroup->addAction(actionAutoExit_qBittorrent);
|
||||
autoShutdownGroup->addAction(actionAutoShutdown_system);
|
||||
autoShutdownGroup->addAction(actionAutoSuspend_system);
|
||||
autoShutdownGroup->addAction(actionAutoHibernate_system);
|
||||
#if !defined(Q_WS_X11) || defined(QT_DBUS_LIB)
|
||||
actionAutoShutdown_system->setChecked(pref.shutdownWhenDownloadsComplete());
|
||||
actionAutoSuspend_system->setChecked(pref.suspendWhenDownloadsComplete());
|
||||
actionAutoHibernate_system->setChecked(pref.hibernateWhenDownloadsComplete());
|
||||
#else
|
||||
actionAutoShutdown_system->setDisabled(true);
|
||||
actionAutoSuspend_system->setDisabled(true);
|
||||
actionAutoHibernate_system->setDisabled(true);
|
||||
#endif
|
||||
actionAutoExit_qBittorrent->setChecked(pref.shutdownqBTWhenDownloadsComplete());
|
||||
|
||||
@@ -1421,6 +1424,11 @@ void MainWindow::on_actionAutoSuspend_system_toggled(bool enabled)
|
||||
Preferences().setSuspendWhenDownloadsComplete(enabled);
|
||||
}
|
||||
|
||||
void MainWindow::on_actionAutoHibernate_system_toggled(bool enabled) {
|
||||
qDebug() << Q_FUNC_INFO << enabled;
|
||||
Preferences().setHibernateWhenDownloadsComplete(enabled);
|
||||
}
|
||||
|
||||
void MainWindow::on_actionAutoShutdown_system_toggled(bool enabled)
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO << enabled;
|
||||
|
||||
Reference in New Issue
Block a user