From a078633a3278c4c6c5d3cc0a0616bcf1676ad799 Mon Sep 17 00:00:00 2001 From: "Vladimir Golovnev (Glassez)" Date: Fri, 19 Feb 2021 17:51:53 +0300 Subject: [PATCH] Don't use deprecated features --- src/base/bittorrent/session.cpp | 6 +++--- src/gui/rss/automatedrssdownloader.cpp | 2 +- src/gui/torrentcontentmodel.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/base/bittorrent/session.cpp b/src/base/bittorrent/session.cpp index cb5159b53..4ea12ea4e 100644 --- a/src/base/bittorrent/session.cpp +++ b/src/base/bittorrent/session.cpp @@ -1850,8 +1850,8 @@ bool Session::deleteTorrent(const TorrentID &id, const DeleteOption deleteOption } // Remove it from torrent resume directory - const QString resumedataFile = QString::fromLatin1("%1.fastresume").arg(torrent->id()); - const QString metadataFile = QString::fromLatin1("%1.torrent").arg(torrent->id()); + const QString resumedataFile = QString::fromLatin1("%1.fastresume").arg(torrent->id().toString()); + const QString metadataFile = QString::fromLatin1("%1.torrent").arg(torrent->id().toString()); QMetaObject::invokeMethod(m_resumeDataSavingManager, [this, resumedataFile, metadataFile]() { m_resumeDataSavingManager->remove(resumedataFile); @@ -3928,7 +3928,7 @@ void Session::handleTorrentResumeDataReady(TorrentImpl *const torrent, const std // Separated thread is used for the blocking IO which results in slow processing of many torrents. // Copying lt::entry objects around isn't cheap. - const QString filename = QString::fromLatin1("%1.fastresume").arg(torrent->id()); + const QString filename = QString::fromLatin1("%1.fastresume").arg(torrent->id().toString()); QMetaObject::invokeMethod(m_resumeDataSavingManager , [this, filename, data]() { m_resumeDataSavingManager->save(filename, data); }); } diff --git a/src/gui/rss/automatedrssdownloader.cpp b/src/gui/rss/automatedrssdownloader.cpp index ddcc8fe7f..4cf58947a 100644 --- a/src/gui/rss/automatedrssdownloader.cpp +++ b/src/gui/rss/automatedrssdownloader.cpp @@ -187,7 +187,7 @@ void AutomatedRssDownloader::loadFeedList() { QListWidgetItem *item = new QListWidgetItem(feed->name(), m_ui->listFeeds); item->setData(Qt::UserRole, feed->url()); - item->setFlags(item->flags() | Qt::ItemIsUserCheckable | Qt::ItemIsTristate); + item->setFlags(item->flags() | Qt::ItemIsUserCheckable | Qt::ItemIsAutoTristate); } updateFeedList(); diff --git a/src/gui/torrentcontentmodel.cpp b/src/gui/torrentcontentmodel.cpp index e2e8f74a3..28b072a78 100644 --- a/src/gui/torrentcontentmodel.cpp +++ b/src/gui/torrentcontentmodel.cpp @@ -386,7 +386,7 @@ Qt::ItemFlags TorrentContentModel::flags(const QModelIndex &index) const Qt::ItemFlags flags {Qt::ItemIsEnabled | Qt::ItemIsSelectable | Qt::ItemIsUserCheckable}; if (itemType(index) == TorrentContentModelItem::FolderType) - flags |= Qt::ItemIsTristate; + flags |= Qt::ItemIsAutoTristate; if (index.column() == TorrentContentModelItem::COL_PRIO) flags |= Qt::ItemIsEditable;