diff --git a/.github/workflows/ci_macos.yaml b/.github/workflows/ci_macos.yaml index 0d8b1b634..6e3de936c 100644 --- a/.github/workflows/ci_macos.yaml +++ b/.github/workflows/ci_macos.yaml @@ -20,7 +20,7 @@ jobs: matrix: libt_version: ["2.0.11", "1.2.20"] qbt_gui: ["GUI=ON", "GUI=OFF"] - qt_version: ["6.9.0"] + qt_version: ["6.9.1"] env: boost_path: "${{ github.workspace }}/../boost" diff --git a/.github/workflows/ci_windows.yaml b/.github/workflows/ci_windows.yaml index 040844d0d..7a9b0910d 100644 --- a/.github/workflows/ci_windows.yaml +++ b/.github/workflows/ci_windows.yaml @@ -106,7 +106,7 @@ jobs: - name: Install Qt uses: jurplel/install-qt-action@v4 with: - version: "6.9.0" + version: "6.9.1" arch: win64_msvc2022_64 archives: qtbase qtsvg qttools cache: true diff --git a/.github/workflows/coverity-scan.yaml b/.github/workflows/coverity-scan.yaml index 22c5a7082..dc561ac4a 100644 --- a/.github/workflows/coverity-scan.yaml +++ b/.github/workflows/coverity-scan.yaml @@ -16,7 +16,7 @@ jobs: matrix: libt_version: ["2.0.11"] qbt_gui: ["GUI=ON"] - qt_version: ["6.6.3"] + qt_version: ["6.9.1"] env: boost_path: "${{ github.workspace }}/../boost" @@ -39,7 +39,7 @@ jobs: - name: Install boost env: BOOST_MAJOR_VERSION: "1" - BOOST_MINOR_VERSION: "86" + BOOST_MINOR_VERSION: "88" BOOST_PATCH_VERSION: "0" run: | boost_url="https://archives.boost.io/release/${{ env.BOOST_MAJOR_VERSION }}.${{ env.BOOST_MINOR_VERSION }}.${{ env.BOOST_PATCH_VERSION }}/source/boost_${{ env.BOOST_MAJOR_VERSION }}_${{ env.BOOST_MINOR_VERSION }}_${{ env.BOOST_PATCH_VERSION }}.tar.gz" diff --git a/src/base/bittorrent/bencoderesumedatastorage.cpp b/src/base/bittorrent/bencoderesumedatastorage.cpp index b217afcc6..87b349f14 100644 --- a/src/base/bittorrent/bencoderesumedatastorage.cpp +++ b/src/base/bittorrent/bencoderesumedatastorage.cpp @@ -189,8 +189,13 @@ void BitTorrent::BencodeResumeDataStorage::loadQueue(const Path &queueFilename) return; } + QHash registeredTorrentsIndexes; + registeredTorrentsIndexes.reserve(m_registeredTorrents.length()); + for (qsizetype i = 0; i < m_registeredTorrents.length(); ++i) + registeredTorrentsIndexes.insert(m_registeredTorrents.at(i), i); + const QRegularExpression hashPattern {u"^([A-Fa-f0-9]{40})$"_s}; - int start = 0; + qsizetype queuePos = 0; while (true) { const auto line = QString::fromLatin1(queueFile.readLine(lineMaxLength).trimmed()); @@ -201,11 +206,15 @@ void BitTorrent::BencodeResumeDataStorage::loadQueue(const Path &queueFilename) if (rxMatch.hasMatch()) { const auto torrentID = BitTorrent::TorrentID::fromString(rxMatch.captured(1)); - const int pos = m_registeredTorrents.indexOf(torrentID, start); + const qsizetype pos = registeredTorrentsIndexes.value(torrentID, -1); if (pos != -1) { - std::swap(m_registeredTorrents[start], m_registeredTorrents[pos]); - ++start; + if (pos != queuePos) + { + m_registeredTorrents.swapItemsAt(pos, queuePos); + registeredTorrentsIndexes.insert(m_registeredTorrents.at(pos), pos); + } + ++queuePos; } } } diff --git a/src/webui/www/private/addpeers.html b/src/webui/www/private/addpeers.html index d8d176161..39510862f 100644 --- a/src/webui/www/private/addpeers.html +++ b/src/webui/www/private/addpeers.html @@ -5,8 +5,8 @@ QBT_TR(Add Peers)QBT_TR[CONTEXT=PeersAdditionDialog] - - + + - + + - + + - + + - + + - + + - + + - - - + + + + + @@ -156,36 +187,6 @@
- - diff --git a/src/webui/www/private/editfeedurl.html b/src/webui/www/private/editfeedurl.html index 9d87b5176..c1bd69c9a 100644 --- a/src/webui/www/private/editfeedurl.html +++ b/src/webui/www/private/editfeedurl.html @@ -5,8 +5,8 @@ QBT_TR(Please type a RSS feed URL)QBT_TR[CONTEXT=RSSWidget] - - + + - + + - + + - - - + + + + - + + - + + - + + - - + + + - + + - + + - - + + + - - - - + + + + + - + + - - + + + - + + - + + + @@ -19,141 +155,8 @@ - + - - diff --git a/src/webui/www/private/upload.html b/src/webui/www/private/upload.html index ab2410627..1a89cffe1 100644 --- a/src/webui/www/private/upload.html +++ b/src/webui/www/private/upload.html @@ -6,10 +6,38 @@ QBT_TR(Upload local torrent)QBT_TR[CONTEXT=HttpServer] - - - - + + + + + @@ -153,33 +181,6 @@
- -