1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-23 21:14:33 +00:00

Pass TriStateBool by value

This commit is contained in:
Chocobo1 2019-11-10 02:58:14 +08:00
parent 640f52c05f
commit b55403ce66
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
2 changed files with 6 additions and 6 deletions

View File

@ -62,7 +62,7 @@ namespace
return TriStateBool::Undefined; return TriStateBool::Undefined;
} }
QJsonValue triStateBoolToJsonValue(const TriStateBool &triStateBool) QJsonValue triStateBoolToJsonValue(const TriStateBool triStateBool)
{ {
switch (static_cast<signed char>(triStateBool)) { switch (static_cast<signed char>(triStateBool)) {
case 0: return false; case 0: return false;
@ -80,7 +80,7 @@ namespace
} }
} }
int triStateBoolToAddPausedLegacy(const TriStateBool &triStateBool) int triStateBoolToAddPausedLegacy(const TriStateBool triStateBool)
{ {
switch (static_cast<signed char>(triStateBool)) { switch (static_cast<signed char>(triStateBool)) {
case 0: return 2; // never case 0: return 2; // never
@ -584,7 +584,7 @@ TriStateBool AutoDownloadRule::addPaused() const
return m_dataPtr->addPaused; return m_dataPtr->addPaused;
} }
void AutoDownloadRule::setAddPaused(const TriStateBool &addPaused) void AutoDownloadRule::setAddPaused(const TriStateBool addPaused)
{ {
m_dataPtr->addPaused = addPaused; m_dataPtr->addPaused = addPaused;
} }
@ -594,7 +594,7 @@ TriStateBool AutoDownloadRule::createSubfolder() const
return m_dataPtr->createSubfolder; return m_dataPtr->createSubfolder;
} }
void AutoDownloadRule::setCreateSubfolder(const TriStateBool &createSubfolder) void AutoDownloadRule::setCreateSubfolder(const TriStateBool createSubfolder)
{ {
m_dataPtr->createSubfolder = createSubfolder; m_dataPtr->createSubfolder = createSubfolder;
} }

View File

@ -78,9 +78,9 @@ namespace RSS
QString savePath() const; QString savePath() const;
void setSavePath(const QString &savePath); void setSavePath(const QString &savePath);
TriStateBool addPaused() const; TriStateBool addPaused() const;
void setAddPaused(const TriStateBool &addPaused); void setAddPaused(TriStateBool addPaused);
TriStateBool createSubfolder() const; TriStateBool createSubfolder() const;
void setCreateSubfolder(const TriStateBool &createSubfolder); void setCreateSubfolder(TriStateBool createSubfolder);
QString assignedCategory() const; QString assignedCategory() const;
void setCategory(const QString &category); void setCategory(const QString &category);