mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-11 15:56:17 -07:00
Clean up code
Add const. Move template implementation to .cpp file.
This commit is contained in:
parent
538c88ced4
commit
114c6d36d1
4 changed files with 26 additions and 23 deletions
|
@ -156,7 +156,7 @@ AdvancedSettings::AdvancedSettings(QWidget *parent)
|
|||
{
|
||||
// column
|
||||
setColumnCount(COL_COUNT);
|
||||
QStringList header = {tr("Setting"), tr("Value", "Value set for this setting")};
|
||||
const QStringList header = {tr("Setting"), tr("Value", "Value set for this setting")};
|
||||
setHorizontalHeaderLabels(header);
|
||||
// row
|
||||
setRowCount(ROW_COUNT);
|
||||
|
@ -171,7 +171,7 @@ AdvancedSettings::AdvancedSettings(QWidget *parent)
|
|||
horizontalHeader()->setStretchLastSection(true);
|
||||
}
|
||||
|
||||
void AdvancedSettings::saveAdvancedSettings()
|
||||
void AdvancedSettings::saveAdvancedSettings() const
|
||||
{
|
||||
Preferences *const pref = Preferences::instance();
|
||||
BitTorrent::Session *const session = BitTorrent::Session::instance();
|
||||
|
@ -314,7 +314,7 @@ void AdvancedSettings::saveAdvancedSettings()
|
|||
}
|
||||
|
||||
#ifndef QBT_USES_LIBTORRENT2
|
||||
void AdvancedSettings::updateCacheSpinSuffix(int value)
|
||||
void AdvancedSettings::updateCacheSpinSuffix(const int value)
|
||||
{
|
||||
if (value == 0)
|
||||
m_spinBoxCache.setSuffix(tr(" (disabled)"));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue