mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-11 15:27:54 +00:00
Add missing field initial value
Suppresses the following warning: qBittorrent/src/base/bittorrent/categoryoptions.cpp: In static member function ‘static BitTorrent::CategoryOptions BitTorrent::CategoryOptions::fromJSON(const QJsonObject&)’: qBittorrent/src/base/bittorrent/categoryoptions.cpp:44:59: warning: missing initializer for member ‘BitTorrent::CategoryOptions::DownloadPathOption::path’ [-Wmissing-field-initializers] 44 | options.downloadPath = {downloadPathValue.toBool()};
This commit is contained in:
parent
bf9516d164
commit
01a0fff4c2
@ -41,7 +41,7 @@ BitTorrent::CategoryOptions BitTorrent::CategoryOptions::fromJSON(const QJsonObj
|
|||||||
|
|
||||||
const QJsonValue downloadPathValue = jsonObj.value(OPTION_DOWNLOADPATH);
|
const QJsonValue downloadPathValue = jsonObj.value(OPTION_DOWNLOADPATH);
|
||||||
if (downloadPathValue.isBool())
|
if (downloadPathValue.isBool())
|
||||||
options.downloadPath = {downloadPathValue.toBool()};
|
options.downloadPath = {downloadPathValue.toBool(), {}};
|
||||||
else if (downloadPathValue.isString())
|
else if (downloadPathValue.isString())
|
||||||
options.downloadPath = {true, downloadPathValue.toString()};
|
options.downloadPath = {true, downloadPathValue.toString()};
|
||||||
|
|
||||||
|
@ -142,7 +142,7 @@ BitTorrent::CategoryOptions TorrentCategoryDialog::categoryOptions() const
|
|||||||
if (m_ui->comboUseDownloadPath->currentIndex() == 1)
|
if (m_ui->comboUseDownloadPath->currentIndex() == 1)
|
||||||
categoryOptions.downloadPath = {true, m_ui->comboDownloadPath->selectedPath()};
|
categoryOptions.downloadPath = {true, m_ui->comboDownloadPath->selectedPath()};
|
||||||
else if (m_ui->comboUseDownloadPath->currentIndex() == 2)
|
else if (m_ui->comboUseDownloadPath->currentIndex() == 2)
|
||||||
categoryOptions.downloadPath = {false};
|
categoryOptions.downloadPath = {false, {}};
|
||||||
|
|
||||||
return categoryOptions;
|
return categoryOptions;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user