mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-27 23:14:31 +00:00
Don't use deprecated features
This commit is contained in:
parent
f022458383
commit
a078633a32
@ -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); });
|
||||
}
|
||||
|
@ -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();
|
||||
|
@ -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…
x
Reference in New Issue
Block a user