qBittorrent
anonymous_namespace{preferences.cpp} Namespace Reference

Functions

template<typename T >
value (const QString &key, const T &defaultValue={})
 
template<typename T >
value (const char *key, const T &defaultValue={})
 
template<typename T >
void setValue (const QString &key, const T &value)
 
template<typename T >
void setValue (const char *key, const T &value)
 

Function Documentation

◆ setValue() [1/2]

template<typename T >
void anonymous_namespace{preferences.cpp}::setValue ( const char *  key,
const T &  value 
)

Definition at line 82 of file preferences.cpp.

83  {
84  setValue(QLatin1String(key), value);
85  }
T value(const char *key, const T &defaultValue={})
Definition: preferences.cpp:70
void setValue(const char *key, const T &value)
Definition: preferences.cpp:82

References value().

Referenced by Preferences::disableRecursiveDownload(), Preferences::recheckTorrentsOnCompletion(), Preferences::resolvePeerCountries(), Preferences::resolvePeerHostNames(), Preferences::setAcceptedLegal(), Preferences::setActionOnDblClOnTorrentDl(), Preferences::setActionOnDblClOnTorrentFn(), Preferences::setAlternatingRowColors(), Preferences::setAltWebUiEnabled(), Preferences::setAutoRunEnabled(), Preferences::setAutoRunProgram(), Preferences::setCategoryFilterState(), Preferences::setCloseToTray(), Preferences::setCloseToTrayNotified(), Preferences::setConfirmOnExit(), Preferences::setConfirmRemoveAllTags(), Preferences::setConfirmTorrentDeletion(), Preferences::setConfirmTorrentRecheck(), Preferences::setCustomUIThemePath(), Preferences::setDeleteTorrentFilesAsDefault(), Preferences::setDNSLastIP(), Preferences::setDNSLastUpd(), Preferences::setDontConfirmAutoExit(), Preferences::setDynDNSEnabled(), Preferences::setDynDNSPassword(), Preferences::setDynDNSService(), Preferences::setDynDNSUsername(), Preferences::setDynDomainName(), Preferences::setHibernateWhenDownloadsComplete(), Preferences::setHideZeroComboValues(), Preferences::setHideZeroValues(), Preferences::setIconsInMenusEnabled(), Preferences::setLastLocationPath(), Preferences::setLocale(), Preferences::setMailNotificationEmail(), Preferences::setMailNotificationEnabled(), Preferences::setMailNotificationSender(), Preferences::setMailNotificationSMTP(), Preferences::setMailNotificationSMTPAuth(), Preferences::setMailNotificationSMTPPassword(), Preferences::setMailNotificationSMTPSSL(), Preferences::setMailNotificationSMTPUsername(), Preferences::setMainGeometry(), Preferences::setMainLastDir(), Preferences::setMainVSplitterState(), Preferences::setMinimizeToTray(), Preferences::setMinimizeToTrayNotified(), Preferences::setNetworkCookies(), Preferences::setPeerListState(), Preferences::setPreventFromSuspendWhenDownloading(), Preferences::setPreventFromSuspendWhenSeeding(), Preferences::setPropCurTab(), Preferences::setPropFileListState(), Preferences::setPropSplitterSizes(), Preferences::setPropTrackerListState(), Preferences::setPropVisible(), Preferences::setRegexAsFilteringPatternForSearchJob(), Preferences::setRegexAsFilteringPatternForTransferList(), Preferences::setRssGeometrySize(), Preferences::setRssHSplitterSizes(), Preferences::setRssMainSplitterState(), Preferences::setRssOpenFolders(), Preferences::setRssSideSplitterState(), Preferences::setRSSWidgetVisible(), Preferences::setScanDirsLastPath(), Preferences::setSchedulerDays(), Preferences::setSchedulerEndTime(), Preferences::setSchedulerStartTime(), Preferences::setSearchEnabled(), Preferences::setSearchEngDisabled(), Preferences::setSearchTabHeaderState(), Preferences::setServerDomains(), Preferences::setShutdownqBTWhenDownloadsComplete(), Preferences::setShutdownWhenDownloadsComplete(), Preferences::setSpeedWidgetEnabled(), Preferences::setSpeedWidgetGraphEnable(), Preferences::setSpeedWidgetPeriod(), Preferences::setSplashScreenDisabled(), Preferences::setStartMinimized(), Preferences::setStatusbarDisplayed(), Preferences::setStatusFilterState(), Preferences::setSuspendWhenDownloadsComplete(), Preferences::setSystemTrayEnabled(), Preferences::setTagFilterState(), Preferences::setToolbarDisplayed(), Preferences::setToolbarTextPosition(), Preferences::setTorImportGeometry(), Preferences::setTorImportLastContentDir(), Preferences::setTrackerFilterState(), Preferences::setTrackerPort(), Preferences::setTransHeaderState(), Preferences::setTransSelFilter(), Preferences::setTrayIconStyle(), Preferences::setUILocked(), Preferences::setUILockPassword(), Preferences::setUPnPForWebUIPort(), Preferences::setUseCustomUITheme(), Preferences::setWebUiAddress(), Preferences::setWebUiAuthSubnetWhitelist(), Preferences::setWebUiAuthSubnetWhitelistEnabled(), Preferences::setWebUIBanDuration(), Preferences::setWebUiClickjackingProtectionEnabled(), Preferences::setWebUiCSRFProtectionEnabled(), Preferences::setWebUICustomHTTPHeaders(), Preferences::setWebUICustomHTTPHeadersEnabled(), Preferences::setWebUiEnabled(), Preferences::setWebUIHostHeaderValidationEnabled(), Preferences::setWebUIHttpsCertificatePath(), Preferences::setWebUiHttpsEnabled(), Preferences::setWebUIHttpsKeyPath(), Preferences::setWebUiLocalAuthEnabled(), Preferences::setWebUIMaxAuthFailCount(), Preferences::setWebUIPassword(), Preferences::setWebUiPort(), Preferences::setWebUIReverseProxySupportEnabled(), Preferences::setWebUiRootFolder(), Preferences::setWebUiSecureCookieEnabled(), Preferences::setWebUISessionTimeout(), Preferences::setWebUITrustedReverseProxiesList(), Preferences::setWebUiUsername(), and Preferences::showSpeedInTitleBar().

Here is the call graph for this function:

◆ setValue() [2/2]

template<typename T >
void anonymous_namespace{preferences.cpp}::setValue ( const QString &  key,
const T &  value 
)

Definition at line 76 of file preferences.cpp.

77  {
79  }
void storeValue(const QString &key, const T &value)
static SettingsStorage * instance()

References SettingsStorage::instance(), SettingsStorage::storeValue(), and value().

Referenced by anonymous_namespace{bencoderesumedatastorage.cpp}::setToEntryList(), SpeedLimitDialog::SpeedLimitDialog(), and TorrentOptionsDialog::TorrentOptionsDialog().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ value() [1/2]

template<typename T >
T anonymous_namespace{preferences.cpp}::value ( const char *  key,
const T &  defaultValue = {} 
)

Definition at line 70 of file preferences.cpp.

70  {})
71  {
72  return value(QLatin1String(key), defaultValue);
73  }

Referenced by Preferences::closeToTray(), Preferences::closeToTrayNotified(), Preferences::confirmOnExit(), Preferences::confirmRemoveAllTags(), Preferences::confirmTorrentDeletion(), Preferences::confirmTorrentRecheck(), Preferences::deleteTorrentFilesAsDefault(), Preferences::dontConfirmAutoExit(), Preferences::getAcceptedLegal(), Preferences::getCategoryFilterState(), Preferences::getDynDNSService(), Preferences::getHideZeroValues(), Preferences::getMailNotificationSMTPAuth(), Preferences::getMailNotificationSMTPSSL(), Preferences::getMainLastDir(), Preferences::getPropVisible(), Preferences::getRegexAsFilteringPatternForSearchJob(), Preferences::getRegexAsFilteringPatternForTransferList(), Preferences::getSchedulerDays(), Preferences::getSchedulerEndTime(), Preferences::getSchedulerStartTime(), Preferences::getSpeedWidgetGraphEnable(), Preferences::getStatusFilterState(), Preferences::getTagFilterState(), Preferences::getTorImportLastContentDir(), Preferences::getTrackerFilterState(), Preferences::getWebUIPassword(), Preferences::hibernateWhenDownloadsComplete(), Preferences::iconsInMenusEnabled(), Preferences::isAltWebUiEnabled(), Preferences::isAutoRunEnabled(), Preferences::isDynDNSEnabled(), Preferences::isMailNotificationEnabled(), Preferences::isRSSWidgetEnabled(), Preferences::isSearchEnabled(), Preferences::isSpeedWidgetEnabled(), Preferences::isSplashScreenDisabled(), Preferences::isStatusbarDisplayed(), Preferences::isToolbarDisplayed(), Preferences::isUILocked(), Preferences::isWebUiAuthSubnetWhitelistEnabled(), Preferences::isWebUiClickjackingProtectionEnabled(), Preferences::isWebUiCSRFProtectionEnabled(), Preferences::isWebUICustomHTTPHeadersEnabled(), Preferences::isWebUiEnabled(), Preferences::isWebUIHostHeaderValidationEnabled(), Preferences::isWebUiHttpsEnabled(), Preferences::isWebUiLocalAuthEnabled(), Preferences::isWebUIReverseProxySupportEnabled(), Preferences::isWebUiSecureCookieEnabled(), Preferences::minimizeToTray(), Preferences::minimizeToTrayNotified(), Preferences::preventFromSuspendWhenDownloading(), Preferences::preventFromSuspendWhenSeeding(), Preferences::recheckTorrentsOnCompletion(), Preferences::recursiveDownloadDisabled(), Preferences::resolvePeerCountries(), Preferences::resolvePeerHostNames(), setValue(), Preferences::shutdownqBTWhenDownloadsComplete(), Preferences::shutdownWhenDownloadsComplete(), Preferences::speedInTitleBar(), Preferences::startMinimized(), Preferences::suspendWhenDownloadsComplete(), Preferences::systemTrayEnabled(), Preferences::trayIconStyle(), Preferences::useAlternatingRowColors(), Preferences::useCustomUITheme(), and Preferences::useUPnPForWebUIPort().

◆ value() [2/2]

template<typename T >
T anonymous_namespace{preferences.cpp}::value ( const QString &  key,
const T &  defaultValue = {} 
)

Definition at line 64 of file preferences.cpp.

64  {})
65  {
66  return SettingsStorage::instance()->loadValue(key, defaultValue);
67  }
T loadValue(const QString &key, const T &defaultValue={}) const

Referenced by TorrentsController::addAction(), DownloadedPiecesBar::bitfieldToFloatVector(), anonymous_namespace{session.cpp}::clampValue(), OrderedSet< T, Compare >::contains(), anonymous_namespace{settingsstorage.cpp}::TransactionalSettings::deserialize(), Net::DownloadRequest::destFileName(), TorrentContentModelItem::displayData(), TransferListModel::displayValue(), Net::Smtp::encodeMimeHeader(), Utils::String::fromEnum(), TorrentCreatorDialog::getPaddedFileSizeLimit(), anonymous_namespace{speedplotview.cpp}::getRoundedYScale(), handleChangedDefaults(), TransferListModel::handleTorrentAboutToBeRemoved(), OrderedSet< T, Compare >::intersect(), PieceAvailabilityBar::intToFloatVector(), TorrentContentTreeView::keyPressEvent(), Net::DownloadRequest::limit(), anonymous_namespace{upgrade.cpp}::migrateSettingKeys(), nsel_DISABLE_MSVC_WARNINGS(), SettingValue< T >::operator=(), CachedSettingValue< T >::operator=(), anonymous_namespace{webapplication.cpp}::parseCookie(), Http::RequestParser::parseFormData(), anonymous_namespace{requestparser.cpp}::parseHeaderLine(), TorrentFilesWatcher::Worker::processFailedTorrents(), anonymous_namespace{synccontroller.cpp}::processMap(), GeoIPDatabase::readPlainValue(), OrderedSet< T, Compare >::remove(), AddNewTorrentDialog::savePathHistoryLength(), Net::DownloadRequest::saveToFile(), BitTorrent::Session::setAddTorrentPaused(), BitTorrent::Session::setAutoTMMDisabledByDefault(), FileLogger::setBackup(), BitTorrent::Session::setConnectionSpeed(), CookiesModel::setData(), TransferListModel::setData(), TorrentContentModel::setData(), BitTorrent::Session::setDisableAutoTMMWhenCategoryChanged(), BitTorrent::Session::setDisableAutoTMMWhenCategorySavePathChanged(), BitTorrent::Session::setDisableAutoTMMWhenDefaultSavePathChanged(), MainWindow::setDownloadTrackerFavicon(), TrackerFiltersList::setDownloadTrackerFavicon(), TransferListFiltersWidget::setDownloadTrackerFavicon(), AddNewTorrentDialog::setEnabled(), MainWindow::setExecutionLogEnabled(), MainWindow::setExecutionLogMsgTypes(), Application::setFileLoggerAge(), Application::setFileLoggerAgeType(), Application::setFileLoggerBackup(), Application::setFileLoggerDeleteOld(), Application::setFileLoggerEnabled(), TorrentsController::setForceStartAction(), BitTorrent::Session::setMaxConcurrentHTTPAnnounces(), FileLogger::setMaxSize(), MainWindow::setNotificationsEnabled(), BitTorrent::Session::setPeerToS(), BitTorrent::Session::setRefreshInterval(), AddNewTorrentDialog::setSavePathHistoryLength(), BitTorrent::Session::setSaveResumeDataInterval(), BitTorrent::Session::setSendBufferLowWatermark(), BitTorrent::Session::setSendBufferWatermark(), BitTorrent::Session::setSendBufferWatermarkFactor(), BitTorrent::Session::setSocketBacklogSize(), SearchJobWidget::setStatus(), BitTorrent::Session::setStopTrackerTimeout(), BitTorrent::Session::setSubcategoriesEnabled(), TorrentsController::setSuperSeedingAction(), AddNewTorrentDialog::setTopLevel(), MainWindow::setTorrentAddedNotificationsEnabled(), BitTorrent::Session::setTorrentContentLayout(), SpeedLimitDialog::SpeedLimitDialog(), anonymous_namespace{misc.cpp}::splitToFriendlyUnit(), SettingsStorage::storeValue(), SettingsStorage::storeValueImpl(), Utils::String::toEnum(), TorrentOptionsDialog::TorrentOptionsDialog(), AdvancedSettings::updateCacheSpinSuffix(), AdvancedSettings::updateSaveResumeDataIntervalSuffix(), anonymous_namespace{speedlimitdialog.cpp}::updateSliderValue(), anonymous_namespace{torrentoptionsdialog.cpp}::updateSliderValue(), anonymous_namespace{upgrade.cpp}::upgradeDNSServiceSettings(), anonymous_namespace{upgrade.cpp}::upgradeSchedulerDaysSettings(), anonymous_namespace{upgrade.cpp}::upgradeTrayIconStyleSettings(), Net::DownloadRequest::url(), Net::DownloadRequest::userAgent(), and anonymous_namespace{cmdoptions.cpp}::IntOption::value().