Browse Source

Don't use deprecated features

adaptive-webui-19844
Vladimir Golovnev (Glassez) 4 years ago
parent
commit
a078633a32
No known key found for this signature in database
GPG Key ID: 52A2C7DEE2DFA6F7
  1. 6
      src/base/bittorrent/session.cpp
  2. 2
      src/gui/rss/automatedrssdownloader.cpp
  3. 2
      src/gui/torrentcontentmodel.cpp

6
src/base/bittorrent/session.cpp

@ -1850,8 +1850,8 @@ bool Session::deleteTorrent(const TorrentID &id, const DeleteOption deleteOption @@ -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 @@ -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); });
}

2
src/gui/rss/automatedrssdownloader.cpp

@ -187,7 +187,7 @@ void AutomatedRssDownloader::loadFeedList() @@ -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();

2
src/gui/torrentcontentmodel.cpp

@ -386,7 +386,7 @@ Qt::ItemFlags TorrentContentModel::flags(const QModelIndex &index) const @@ -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;

Loading…
Cancel
Save