mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-14 02:27:09 -07:00
commit
2f15ea9b54
4 changed files with 23 additions and 20 deletions
|
@ -4337,20 +4337,23 @@ void Session::handleMetadataReceivedAlert(libt::metadata_received_alert *p)
|
|||
|
||||
void Session::handleFileErrorAlert(libt::file_error_alert *p)
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
// NOTE: Check this function!
|
||||
TorrentHandle *const torrent = m_torrents.value(p->handle.info_hash());
|
||||
if (torrent) {
|
||||
const InfoHash hash = torrent->hash();
|
||||
if (!m_recentErroredTorrents.contains(hash)) {
|
||||
m_recentErroredTorrents.insert(hash);
|
||||
const QString msg = QString::fromStdString(p->message());
|
||||
LogMsg(tr("An I/O error occurred, '%1' paused. %2").arg(torrent->name(), msg));
|
||||
emit fullDiskError(torrent, msg);
|
||||
}
|
||||
if (!torrent)
|
||||
return;
|
||||
|
||||
m_recentErroredTorrentsTimer->start();
|
||||
const InfoHash hash = torrent->hash();
|
||||
|
||||
if (!m_recentErroredTorrents.contains(hash)) {
|
||||
m_recentErroredTorrents.insert(hash);
|
||||
|
||||
const QString msg = QString::fromStdString(p->message());
|
||||
LogMsg(tr("File error alert. Torrent: \"%1\". File: \"%2\". Reason: %3")
|
||||
.arg(torrent->name(), p->filename(), msg)
|
||||
, Log::WARNING);
|
||||
emit fullDiskError(torrent, msg);
|
||||
}
|
||||
|
||||
m_recentErroredTorrentsTimer->start();
|
||||
}
|
||||
|
||||
void Session::handlePortmapWarningAlert(libt::portmap_error_alert *p)
|
||||
|
|
|
@ -462,10 +462,10 @@ void PeerListWidget::handleSortColumnChanged(int col)
|
|||
|
||||
void PeerListWidget::wheelEvent(QWheelEvent *event)
|
||||
{
|
||||
event->accept();
|
||||
|
||||
if (event->modifiers() & Qt::ShiftModifier) {
|
||||
// Shift + scroll = horizontal scroll
|
||||
event->accept();
|
||||
|
||||
QWheelEvent scrollHEvent(event->pos(), event->globalPos(), event->delta(), event->buttons(), event->modifiers(), Qt::Horizontal);
|
||||
QTreeView::wheelEvent(&scrollHEvent);
|
||||
return;
|
||||
|
|
|
@ -216,15 +216,15 @@ void TagFilterModel::torrentTagAdded(BitTorrent::TorrentHandle *const torrent, c
|
|||
|
||||
void TagFilterModel::torrentTagRemoved(BitTorrent::TorrentHandle *const torrent, const QString &tag)
|
||||
{
|
||||
Q_ASSERT(torrent->tags().count() >= 0);
|
||||
if (torrent->tags().count() == 0)
|
||||
if (torrent->tags().empty())
|
||||
untaggedItem()->increaseTorrentsCount();
|
||||
|
||||
const int row = findRow(tag);
|
||||
Q_ASSERT(isValidRow(row));
|
||||
TagModelItem &item = m_tagItems[row];
|
||||
if (row < 0)
|
||||
return;
|
||||
|
||||
m_tagItems[row].decreaseTorrentsCount();
|
||||
|
||||
item.decreaseTorrentsCount();
|
||||
const QModelIndex i = index(row, 0, QModelIndex());
|
||||
emit dataChanged(i, i);
|
||||
}
|
||||
|
|
|
@ -1212,10 +1212,10 @@ bool TransferListWidget::loadSettings()
|
|||
|
||||
void TransferListWidget::wheelEvent(QWheelEvent *event)
|
||||
{
|
||||
event->accept();
|
||||
|
||||
if (event->modifiers() & Qt::ShiftModifier) {
|
||||
// Shift + scroll = horizontal scroll
|
||||
event->accept();
|
||||
|
||||
QWheelEvent scrollHEvent(event->pos(), event->globalPos(), event->delta(), event->buttons(), event->modifiers(), Qt::Horizontal);
|
||||
QTreeView::wheelEvent(&scrollHEvent);
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue