mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-20 15:37:26 -06:00
@@ -845,16 +845,21 @@ void OptionsDialog::loadOptions()
|
||||
case ProxyType::SOCKS4:
|
||||
m_ui->comboProxyType->setCurrentIndex(1);
|
||||
break;
|
||||
|
||||
case ProxyType::SOCKS5_PW:
|
||||
useProxyAuth = true;
|
||||
// fallthrough
|
||||
case ProxyType::SOCKS5:
|
||||
m_ui->comboProxyType->setCurrentIndex(2);
|
||||
break;
|
||||
|
||||
case ProxyType::HTTP_PW:
|
||||
useProxyAuth = true;
|
||||
// fallthrough
|
||||
case ProxyType::HTTP:
|
||||
m_ui->comboProxyType->setCurrentIndex(3);
|
||||
break;
|
||||
|
||||
default:
|
||||
m_ui->comboProxyType->setCurrentIndex(0);
|
||||
}
|
||||
|
||||
@@ -37,6 +37,7 @@ SpeedPlotView::SpeedPlotView(QWidget *parent)
|
||||
, m_data5Min(MIN5_BUF_SIZE)
|
||||
, m_data30Min(MIN30_BUF_SIZE)
|
||||
, m_data6Hour(HOUR6_BUF_SIZE)
|
||||
, m_period(MIN5)
|
||||
, m_viewablePointsCount(MIN5_SEC)
|
||||
, m_counter30Min(-1)
|
||||
, m_counter6Hour(-1)
|
||||
|
||||
@@ -288,17 +288,18 @@ void TorrentContentModel::clear()
|
||||
void TorrentContentModel::setupModelData(const BitTorrent::TorrentInfo &info)
|
||||
{
|
||||
qDebug("setup model data called");
|
||||
if (info.filesCount() <= 0)
|
||||
const int filesCount = info.filesCount();
|
||||
if (filesCount <= 0)
|
||||
return;
|
||||
|
||||
emit layoutAboutToBeChanged();
|
||||
// Initialize files_index array
|
||||
qDebug("Torrent contains %d files", info.filesCount());
|
||||
m_filesIndex.reserve(info.filesCount());
|
||||
qDebug("Torrent contains %d files", filesCount);
|
||||
m_filesIndex.reserve(filesCount);
|
||||
|
||||
TorrentContentModelFolder* currentParent;
|
||||
// Iterate over files
|
||||
for (int i = 0; i < info.filesCount(); ++i) {
|
||||
for (int i = 0; i < filesCount; ++i) {
|
||||
currentParent = m_rootItem;
|
||||
QString path = Utils::Fs::fromNativePath(info.filePath(i));
|
||||
// Iterate of parts of the path to create necessary folders
|
||||
|
||||
Reference in New Issue
Block a user