mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-02 13:48:05 -06:00
Fix some warnings
This commit is contained in:
@@ -258,7 +258,7 @@ QTreeWidgetItem *PluginSelectDialog::findItemWithID(QString id)
|
||||
return item;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void PluginSelectDialog::loadSupportedSearchPlugins()
|
||||
@@ -361,7 +361,7 @@ void PluginSelectDialog::askForPluginUrl()
|
||||
void PluginSelectDialog::askForLocalPlugin()
|
||||
{
|
||||
QStringList pathsList = QFileDialog::getOpenFileNames(
|
||||
0, tr("Select search plugins"), QDir::homePath(),
|
||||
nullptr, tr("Select search plugins"), QDir::homePath(),
|
||||
tr("qBittorrent search plugin") + QLatin1String(" (*.py)")
|
||||
);
|
||||
foreach (QString path, pathsList) {
|
||||
|
||||
@@ -103,7 +103,7 @@ SearchJobWidget::SearchJobWidget(SearchHandler *searchHandler, QWidget *parent)
|
||||
|
||||
// Ensure that at least one column is visible at all times
|
||||
bool atLeastOne = false;
|
||||
for (unsigned int i = 0; i < SearchSortModel::DL_LINK; ++i) {
|
||||
for (int i = 0; i < SearchSortModel::DL_LINK; ++i) {
|
||||
if (!m_ui->resultsBrowser->isColumnHidden(i)) {
|
||||
atLeastOne = true;
|
||||
break;
|
||||
@@ -114,7 +114,7 @@ SearchJobWidget::SearchJobWidget(SearchHandler *searchHandler, QWidget *parent)
|
||||
// To also mitigate the above issue, we have to resize each column when
|
||||
// its size is 0, because explicitly 'showing' the column isn't enough
|
||||
// in the above scenario.
|
||||
for (unsigned int i = 0; i < SearchSortModel::DL_LINK; ++i)
|
||||
for (int i = 0; i < SearchSortModel::DL_LINK; ++i)
|
||||
if ((m_ui->resultsBrowser->columnWidth(i) <= 0) && !m_ui->resultsBrowser->isColumnHidden(i))
|
||||
m_ui->resultsBrowser->resizeColumnToContents(i);
|
||||
|
||||
@@ -412,7 +412,7 @@ void SearchJobWidget::displayToggleColumnsMenu(const QPoint&)
|
||||
actions.append(myAct);
|
||||
}
|
||||
int visibleCols = 0;
|
||||
for (unsigned int i = 0; i < SearchSortModel::DL_LINK; ++i) {
|
||||
for (int i = 0; i < SearchSortModel::DL_LINK; ++i) {
|
||||
if (!m_ui->resultsBrowser->isColumnHidden(i))
|
||||
++visibleCols;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user