mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-11 15:56:17 -07:00
Revise SettingsStorage store/load value interface
This commit is contained in:
parent
b1020c599f
commit
be5af2796d
12 changed files with 87 additions and 70 deletions
|
@ -491,7 +491,7 @@ MainWindow::~MainWindow()
|
|||
|
||||
bool MainWindow::isExecutionLogEnabled() const
|
||||
{
|
||||
return settings()->loadValue(KEY_EXECUTIONLOG_ENABLED, false).toBool();
|
||||
return settings()->loadValue(KEY_EXECUTIONLOG_ENABLED, false);
|
||||
}
|
||||
|
||||
void MainWindow::setExecutionLogEnabled(bool value)
|
||||
|
@ -503,7 +503,7 @@ int MainWindow::executionLogMsgTypes() const
|
|||
{
|
||||
// as default value we need all the bits set
|
||||
// -1 is considered the portable way to achieve that
|
||||
return settings()->loadValue(KEY_EXECUTIONLOG_TYPES, -1).toInt();
|
||||
return settings()->loadValue(KEY_EXECUTIONLOG_TYPES, -1);
|
||||
}
|
||||
|
||||
void MainWindow::setExecutionLogMsgTypes(const int value)
|
||||
|
@ -514,7 +514,7 @@ void MainWindow::setExecutionLogMsgTypes(const int value)
|
|||
|
||||
bool MainWindow::isNotificationsEnabled() const
|
||||
{
|
||||
return settings()->loadValue(KEY_NOTIFICATIONS_ENABLED, true).toBool();
|
||||
return settings()->loadValue(KEY_NOTIFICATIONS_ENABLED, true);
|
||||
}
|
||||
|
||||
void MainWindow::setNotificationsEnabled(bool value)
|
||||
|
@ -524,7 +524,7 @@ void MainWindow::setNotificationsEnabled(bool value)
|
|||
|
||||
bool MainWindow::isTorrentAddedNotificationsEnabled() const
|
||||
{
|
||||
return settings()->loadValue(KEY_NOTIFICATIONS_TORRENTADDED, false).toBool();
|
||||
return settings()->loadValue(KEY_NOTIFICATIONS_TORRENTADDED, false);
|
||||
}
|
||||
|
||||
void MainWindow::setTorrentAddedNotificationsEnabled(bool value)
|
||||
|
@ -534,7 +534,7 @@ void MainWindow::setTorrentAddedNotificationsEnabled(bool value)
|
|||
|
||||
bool MainWindow::isDownloadTrackerFavicon() const
|
||||
{
|
||||
return settings()->loadValue(KEY_DOWNLOAD_TRACKER_FAVICON, false).toBool();
|
||||
return settings()->loadValue(KEY_DOWNLOAD_TRACKER_FAVICON, false);
|
||||
}
|
||||
|
||||
void MainWindow::setDownloadTrackerFavicon(bool value)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue