mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-14 02:27:09 -07:00
Raise minimum Qt version to 5.15.2
This commit is contained in:
parent
ee696e6f36
commit
27baa55443
9 changed files with 30 additions and 48 deletions
|
@ -435,16 +435,12 @@ void Application::runExternalProgram(const BitTorrent::Torrent *torrent) const
|
|||
// enable command injection via torrent name and other arguments
|
||||
// (especially when some automated download mechanism has been setup).
|
||||
// See: https://github.com/qbittorrent/qBittorrent/issues/10925
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0))
|
||||
QStringList args = QProcess::splitCommand(program);
|
||||
if (args.isEmpty())
|
||||
return;
|
||||
|
||||
const QString command = args.takeFirst();
|
||||
QProcess::startDetached(command, args);
|
||||
#else
|
||||
QProcess::startDetached(program);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -122,12 +122,7 @@ Smtp::Smtp(QObject *parent)
|
|||
|
||||
connect(m_socket, &QIODevice::readyRead, this, &Smtp::readyRead);
|
||||
connect(m_socket, &QAbstractSocket::disconnected, this, &QObject::deleteLater);
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0))
|
||||
connect(m_socket, &QAbstractSocket::errorOccurred, this, &Smtp::error);
|
||||
#else
|
||||
connect(m_socket, qOverload<QAbstractSocket::SocketError>(&QAbstractSocket::error)
|
||||
, this, &Smtp::error);
|
||||
#endif
|
||||
|
||||
// Test hmacMD5 function (http://www.faqs.org/rfcs/rfc2202.html)
|
||||
Q_ASSERT(hmacMD5("Jefe", "what do ya want for nothing?").toHex()
|
||||
|
|
|
@ -100,13 +100,8 @@ PropTabBar::PropTabBar(QWidget *parent)
|
|||
addWidget(speedButton);
|
||||
m_btnGroup->addButton(speedButton, SpeedTab);
|
||||
// SIGNAL/SLOT
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0))
|
||||
connect(m_btnGroup, &QButtonGroup::idClicked
|
||||
, this, &PropTabBar::setCurrentIndex);
|
||||
#else
|
||||
connect(m_btnGroup, qOverload<int>(&QButtonGroup::buttonClicked)
|
||||
, this, &PropTabBar::setCurrentIndex);
|
||||
#endif
|
||||
// Disable buttons focus
|
||||
for (QAbstractButton *btn : asConst(m_btnGroup->buttons()))
|
||||
btn->setFocusPolicy(Qt::NoFocus);
|
||||
|
|
|
@ -263,12 +263,7 @@ TorrentOptionsDialog::TorrentOptionsDialog(QWidget *parent, const QVector<BitTor
|
|||
connect(m_ui->checkMaxRatio, &QCheckBox::toggled, m_ui->spinRatioLimit, &QDoubleSpinBox::setEnabled);
|
||||
connect(m_ui->checkMaxTime, &QCheckBox::toggled, m_ui->spinTimeLimit, &QSpinBox::setEnabled);
|
||||
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0))
|
||||
connect(m_ui->buttonGroup, &QButtonGroup::idClicked, this, &TorrentOptionsDialog::handleRatioTypeChanged);
|
||||
#else
|
||||
connect(m_ui->buttonGroup, qOverload<int>(&QButtonGroup::buttonClicked)
|
||||
, this, &TorrentOptionsDialog::handleRatioTypeChanged);
|
||||
#endif
|
||||
|
||||
Utils::Gui::resize(this, m_storeDialogSize);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue