Drop support of Qt 6.5

PR #22599.
This commit is contained in:
Vladimir Golovnev 2025-04-27 16:21:20 +03:00 committed by GitHub
parent 45babc336d
commit 33aaa867b5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 10 additions and 25 deletions

View file

@ -21,7 +21,7 @@ jobs:
matrix: matrix:
libt_version: ["2.0.11", "1.2.20"] libt_version: ["2.0.11", "1.2.20"]
qbt_gui: ["GUI=ON", "GUI=OFF"] qbt_gui: ["GUI=ON", "GUI=OFF"]
qt_version: ["6.5.2"] qt_version: ["6.6.3"]
env: env:
boost_path: "${{ github.workspace }}/../boost" boost_path: "${{ github.workspace }}/../boost"
@ -162,6 +162,7 @@ jobs:
- name: Package AppImage - name: Package AppImage
run: | run: |
rm -f "${{ runner.workspace }}/Qt/${{ matrix.qt_version }}/gcc_64/plugins/sqldrivers/libqsqlmimer.so"
./linuxdeploy-x86_64.AppImage --appdir qbittorrent --plugin qt ./linuxdeploy-x86_64.AppImage --appdir qbittorrent --plugin qt
rm qbittorrent/apprun-hooks/* rm qbittorrent/apprun-hooks/*
cp .github/workflows/helper/appimage/export_vars.sh qbittorrent/apprun-hooks/export_vars.sh cp .github/workflows/helper/appimage/export_vars.sh qbittorrent/apprun-hooks/export_vars.sh

View file

@ -16,7 +16,7 @@ jobs:
matrix: matrix:
libt_version: ["2.0.11"] libt_version: ["2.0.11"]
qbt_gui: ["GUI=ON"] qbt_gui: ["GUI=ON"]
qt_version: ["6.5.2"] qt_version: ["6.6.3"]
env: env:
boost_path: "${{ github.workspace }}/../boost" boost_path: "${{ github.workspace }}/../boost"

View file

@ -8,7 +8,7 @@ project(qBittorrent
# version requirements - older versions may work, but you are on your own # version requirements - older versions may work, but you are on your own
set(minBoostVersion 1.76) set(minBoostVersion 1.76)
set(minQt6Version 6.5.0) set(minQt6Version 6.6.0)
set(minOpenSSLVersion 3.0.2) set(minOpenSSLVersion 3.0.2)
set(minLibtorrent1Version 1.2.19) set(minLibtorrent1Version 1.2.19)
set(minLibtorrentVersion 2.0.10) set(minLibtorrentVersion 2.0.10)

View file

@ -11,7 +11,7 @@ qBittorrent - A BitTorrent client in C++ / Qt
- OpenSSL >= 3.0.2 - OpenSSL >= 3.0.2
- Qt 6.5.0 - 6.x - Qt 6.6.0 - 6.x
- zlib >= 1.2.11 - zlib >= 1.2.11

View file

@ -20,7 +20,7 @@ target_compile_features(qbt_common_cfg INTERFACE
) )
target_compile_definitions(qbt_common_cfg INTERFACE target_compile_definitions(qbt_common_cfg INTERFACE
QT_DISABLE_DEPRECATED_UP_TO=0x060500 QT_DISABLE_DEPRECATED_UP_TO=0x060600
QT_NO_CAST_FROM_ASCII QT_NO_CAST_FROM_ASCII
QT_NO_CAST_TO_ASCII QT_NO_CAST_TO_ASCII
QT_NO_CAST_FROM_BYTEARRAY QT_NO_CAST_FROM_BYTEARRAY

View file

@ -674,9 +674,7 @@ void Application::runExternalProgram(const QString &programTemplate, const BitTo
QProcess proc; QProcess proc;
proc.setProgram(command); proc.setProgram(command);
proc.setArguments(args); proc.setArguments(args);
#if defined(Q_OS_UNIX) && (QT_VERSION >= QT_VERSION_CHECK(6, 6, 0))
proc.setUnixProcessParameters(QProcess::UnixProcessFlag::CloseFileDescriptors); proc.setUnixProcessParameters(QProcess::UnixProcessFlag::CloseFileDescriptors);
#endif
if (proc.startDetached()) if (proc.startDetached())
{ {

View file

@ -1642,11 +1642,7 @@ void SessionImpl::endStartup(ResumeSessionContext *context)
auto wakeupCheckTimer = new QTimer(this); auto wakeupCheckTimer = new QTimer(this);
connect(wakeupCheckTimer, &QTimer::timeout, this, [this] connect(wakeupCheckTimer, &QTimer::timeout, this, [this]
{ {
#if (QT_VERSION >= QT_VERSION_CHECK(6, 6, 0))
const bool hasSystemSlept = m_wakeupCheckTimestamp.durationElapsed() > 100s; const bool hasSystemSlept = m_wakeupCheckTimestamp.durationElapsed() > 100s;
#else
const bool hasSystemSlept = m_wakeupCheckTimestamp.elapsed() > std::chrono::milliseconds(100s).count();
#endif
if (hasSystemSlept) if (hasSystemSlept)
{ {
LogMsg(tr("System wake-up event detected. Re-announcing to all the trackers...")); LogMsg(tr("System wake-up event detected. Re-announcing to all the trackers..."));

View file

@ -42,7 +42,7 @@ SearchDownloadHandler::SearchDownloadHandler(const QString &pluginName, const QS
, m_downloadProcess {new QProcess(this)} , m_downloadProcess {new QProcess(this)}
{ {
m_downloadProcess->setProcessEnvironment(m_manager->proxyEnvironment()); m_downloadProcess->setProcessEnvironment(m_manager->proxyEnvironment());
#if defined(Q_OS_UNIX) && (QT_VERSION >= QT_VERSION_CHECK(6, 6, 0)) #ifdef Q_OS_UNIX
m_downloadProcess->setUnixProcessParameters(QProcess::UnixProcessFlag::CloseFileDescriptors); m_downloadProcess->setUnixProcessParameters(QProcess::UnixProcessFlag::CloseFileDescriptors);
#endif #endif
connect(m_downloadProcess, qOverload<int, QProcess::ExitStatus>(&QProcess::finished) connect(m_downloadProcess, qOverload<int, QProcess::ExitStatus>(&QProcess::finished)

View file

@ -72,7 +72,7 @@ SearchHandler::SearchHandler(const QString &pattern, const QString &category, co
// Load environment variables (proxy) // Load environment variables (proxy)
m_searchProcess->setProcessEnvironment(m_manager->proxyEnvironment()); m_searchProcess->setProcessEnvironment(m_manager->proxyEnvironment());
m_searchProcess->setProgram(Utils::ForeignApps::pythonInfo().executableName); m_searchProcess->setProgram(Utils::ForeignApps::pythonInfo().executableName);
#if defined(Q_OS_UNIX) && (QT_VERSION >= QT_VERSION_CHECK(6, 6, 0)) #ifdef Q_OS_UNIX
m_searchProcess->setUnixProcessParameters(QProcess::UnixProcessFlag::CloseFileDescriptors); m_searchProcess->setUnixProcessParameters(QProcess::UnixProcessFlag::CloseFileDescriptors);
#endif #endif

View file

@ -546,7 +546,7 @@ void SearchPluginManager::update()
{ {
QProcess nova; QProcess nova;
nova.setProcessEnvironment(proxyEnvironment()); nova.setProcessEnvironment(proxyEnvironment());
#if defined(Q_OS_UNIX) && (QT_VERSION >= QT_VERSION_CHECK(6, 6, 0)) #ifdef Q_OS_UNIX
nova.setUnixProcessParameters(QProcess::UnixProcessFlag::CloseFileDescriptors); nova.setUnixProcessParameters(QProcess::UnixProcessFlag::CloseFileDescriptors);
#endif #endif

View file

@ -57,7 +57,7 @@ namespace
info = {}; info = {};
QProcess proc; QProcess proc;
#if defined(Q_OS_UNIX) && (QT_VERSION >= QT_VERSION_CHECK(6, 6, 0)) #ifdef Q_OS_UNIX
proc.setUnixProcessParameters(QProcess::UnixProcessFlag::CloseFileDescriptors); proc.setUnixProcessParameters(QProcess::UnixProcessFlag::CloseFileDescriptors);
#endif #endif
proc.start(exeName, {u"--version"_s}, QIODevice::ReadOnly); proc.start(exeName, {u"--version"_s}, QIODevice::ReadOnly);

View file

@ -176,9 +176,7 @@ void Utils::Gui::openFolderSelect(const Path &path)
const int lineMaxLength = 64; const int lineMaxLength = 64;
QProcess proc; QProcess proc;
#if QT_VERSION >= QT_VERSION_CHECK(6, 6, 0)
proc.setUnixProcessParameters(QProcess::UnixProcessFlag::CloseFileDescriptors); proc.setUnixProcessParameters(QProcess::UnixProcessFlag::CloseFileDescriptors);
#endif
proc.start(u"xdg-mime"_s, {u"query"_s, u"default"_s, u"inode/directory"_s}); proc.start(u"xdg-mime"_s, {u"query"_s, u"default"_s, u"inode/directory"_s});
proc.waitForFinished(); proc.waitForFinished();
const auto output = QString::fromLocal8Bit(proc.readLine(lineMaxLength).simplified()); const auto output = QString::fromLocal8Bit(proc.readLine(lineMaxLength).simplified());

View file

@ -80,9 +80,7 @@ private slots:
{ {
const Utils::Version<1> version1 {1}; const Utils::Version<1> version1 {1};
QCOMPARE(version1[0], 1); QCOMPARE(version1[0], 1);
#if (QT_VERSION >= QT_VERSION_CHECK(6, 3, 0))
QVERIFY_THROWS_EXCEPTION(std::out_of_range, version1[1]); QVERIFY_THROWS_EXCEPTION(std::out_of_range, version1[1]);
#endif
QCOMPARE(version1.majorNumber(), 1); QCOMPARE(version1.majorNumber(), 1);
// should not compile: // should not compile:
// version1.minorNumber(); // version1.minorNumber();
@ -92,9 +90,7 @@ private slots:
const Utils::Version<2, 1> version2 {2}; const Utils::Version<2, 1> version2 {2};
QCOMPARE(version2[0], 2); QCOMPARE(version2[0], 2);
QCOMPARE(version2[1], 0); QCOMPARE(version2[1], 0);
#if (QT_VERSION >= QT_VERSION_CHECK(6, 3, 0))
QVERIFY_THROWS_EXCEPTION(std::out_of_range, version2[2]); QVERIFY_THROWS_EXCEPTION(std::out_of_range, version2[2]);
#endif
QCOMPARE(version2.majorNumber(), 2); QCOMPARE(version2.majorNumber(), 2);
QCOMPARE(version2.minorNumber(), 0); QCOMPARE(version2.minorNumber(), 0);
// should not compile: // should not compile:
@ -105,9 +101,7 @@ private slots:
QCOMPARE(version3[0], 3); QCOMPARE(version3[0], 3);
QCOMPARE(version3[1], 2); QCOMPARE(version3[1], 2);
QCOMPARE(version3[2], 0); QCOMPARE(version3[2], 0);
#if (QT_VERSION >= QT_VERSION_CHECK(6, 3, 0))
QVERIFY_THROWS_EXCEPTION(std::out_of_range, version3[3]); QVERIFY_THROWS_EXCEPTION(std::out_of_range, version3[3]);
#endif
QCOMPARE(version3.majorNumber(), 3); QCOMPARE(version3.majorNumber(), 3);
QCOMPARE(version3.minorNumber(), 2); QCOMPARE(version3.minorNumber(), 2);
QCOMPARE(version3.revisionNumber(), 0); QCOMPARE(version3.revisionNumber(), 0);
@ -119,9 +113,7 @@ private slots:
QCOMPARE(version4[1], 11); QCOMPARE(version4[1], 11);
QCOMPARE(version4[2], 12); QCOMPARE(version4[2], 12);
QCOMPARE(version4[3], 13); QCOMPARE(version4[3], 13);
#if (QT_VERSION >= QT_VERSION_CHECK(6, 3, 0))
QVERIFY_THROWS_EXCEPTION(std::out_of_range, version4[4]); QVERIFY_THROWS_EXCEPTION(std::out_of_range, version4[4]);
#endif
QCOMPARE(version4.majorNumber(), 10); QCOMPARE(version4.majorNumber(), 10);
QCOMPARE(version4.minorNumber(), 11); QCOMPARE(version4.minorNumber(), 11);
QCOMPARE(version4.revisionNumber(), 12); QCOMPARE(version4.revisionNumber(), 12);