mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-01 05:08:05 -06:00
Remove const in declarations' arguments that are passed by value
This commit is contained in:
@@ -1186,7 +1186,7 @@ int Preferences::getPropCurTab() const
|
||||
return value("TorrentProperties/CurrentTab", -1).toInt();
|
||||
}
|
||||
|
||||
void Preferences::setPropCurTab(const int &tab)
|
||||
void Preferences::setPropCurTab(const int tab)
|
||||
{
|
||||
setValue("TorrentProperties/CurrentTab", tab);
|
||||
}
|
||||
@@ -1356,7 +1356,7 @@ int Preferences::getTransSelFilter() const
|
||||
return value("TransferListFilters/selectedFilterIndex", 0).toInt();
|
||||
}
|
||||
|
||||
void Preferences::setTransSelFilter(const int &index)
|
||||
void Preferences::setTransSelFilter(const int index)
|
||||
{
|
||||
setValue("TransferListFilters/selectedFilterIndex", index);
|
||||
}
|
||||
|
||||
@@ -303,7 +303,7 @@ public:
|
||||
QString getDNSLastIP() const;
|
||||
void setDNSLastIP(const QString &ip);
|
||||
bool getAcceptedLegal() const;
|
||||
void setAcceptedLegal(const bool accepted);
|
||||
void setAcceptedLegal(bool accepted);
|
||||
QByteArray getMainGeometry() const;
|
||||
void setMainGeometry(const QByteArray &geometry);
|
||||
QByteArray getMainVSplitterState() const;
|
||||
@@ -321,9 +321,9 @@ public:
|
||||
QByteArray getPropFileListState() const;
|
||||
void setPropFileListState(const QByteArray &state);
|
||||
int getPropCurTab() const;
|
||||
void setPropCurTab(const int &tab);
|
||||
void setPropCurTab(int tab);
|
||||
bool getPropVisible() const;
|
||||
void setPropVisible(const bool visible);
|
||||
void setPropVisible(bool visible);
|
||||
QByteArray getPropTrackerListState() const;
|
||||
void setPropTrackerListState(const QByteArray &state);
|
||||
QSize getRssGeometrySize() const;
|
||||
@@ -351,17 +351,17 @@ public:
|
||||
bool getTagFilterState() const;
|
||||
bool getTrackerFilterState() const;
|
||||
int getTransSelFilter() const;
|
||||
void setTransSelFilter(const int &index);
|
||||
void setTransSelFilter(int index);
|
||||
QByteArray getTransHeaderState() const;
|
||||
void setTransHeaderState(const QByteArray &state);
|
||||
bool getRegexAsFilteringPatternForTransferList() const;
|
||||
void setRegexAsFilteringPatternForTransferList(bool checked);
|
||||
int getToolbarTextPosition() const;
|
||||
void setToolbarTextPosition(const int position);
|
||||
void setToolbarTextPosition(int position);
|
||||
|
||||
// From old RssSettings class
|
||||
bool isRSSWidgetEnabled() const;
|
||||
void setRSSWidgetVisible(const bool enabled);
|
||||
void setRSSWidgetVisible(bool enabled);
|
||||
|
||||
// Network
|
||||
QList<QNetworkCookie> getNetworkCookies() const;
|
||||
@@ -371,9 +371,9 @@ public:
|
||||
bool isSpeedWidgetEnabled() const;
|
||||
void setSpeedWidgetEnabled(bool enabled);
|
||||
int getSpeedWidgetPeriod() const;
|
||||
void setSpeedWidgetPeriod(const int period);
|
||||
void setSpeedWidgetPeriod(int period);
|
||||
bool getSpeedWidgetGraphEnable(int id) const;
|
||||
void setSpeedWidgetGraphEnable(int id, const bool enable);
|
||||
void setSpeedWidgetGraphEnable(int id, bool enable);
|
||||
|
||||
public slots:
|
||||
void setStatusFilterState(bool checked);
|
||||
|
||||
@@ -68,7 +68,7 @@ public:
|
||||
static void freeInstance();
|
||||
static ScanFoldersModel *instance();
|
||||
|
||||
static QString pathTypeDisplayName(const PathType type);
|
||||
static QString pathTypeDisplayName(PathType type);
|
||||
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const;
|
||||
int columnCount(const QModelIndex &parent = QModelIndex()) const;
|
||||
|
||||
@@ -72,7 +72,7 @@ public:
|
||||
TorrentFilter();
|
||||
// category & tags: pass empty string for uncategorized / untagged torrents.
|
||||
// Pass null string (QString()) to disable filtering (i.e. all torrents).
|
||||
TorrentFilter(const Type type, const QStringSet &hashSet = AnyHash, const QString &category = AnyCategory, const QString &tag = AnyTag);
|
||||
TorrentFilter(Type type, const QStringSet &hashSet = AnyHash, const QString &category = AnyCategory, const QString &tag = AnyTag);
|
||||
TorrentFilter(const QString &filter, const QStringSet &hashSet = AnyHash, const QString &category = AnyCategory, const QString &tags = AnyTag);
|
||||
|
||||
bool setType(Type type);
|
||||
|
||||
@@ -40,6 +40,6 @@ namespace Utils
|
||||
|
||||
// Mimic QByteArray::mid(pos, len) but instead of returning a full-copy,
|
||||
// we only return a partial view
|
||||
const QByteArray midView(const QByteArray &in, const int pos, const int len = -1);
|
||||
const QByteArray midView(const QByteArray &in, int pos, int len = -1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace Utils
|
||||
{
|
||||
namespace Random
|
||||
{
|
||||
uint32_t rand(const uint32_t min = 0, const uint32_t max = UINT32_MAX);
|
||||
uint32_t rand(uint32_t min = 0, uint32_t max = UINT32_MAX);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ namespace Utils
|
||||
return str;
|
||||
}
|
||||
|
||||
bool parseBool(const QString &string, const bool defaultValue);
|
||||
bool parseBool(const QString &string, bool defaultValue);
|
||||
TriStateBool parseTriStateBool(const QString &string);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user