mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-21 05:43:32 -07:00
Merge pull request #10711 from Chocobo1/alert
Log performance alerts from libtorrent
This commit is contained in:
commit
bb3634c382
3 changed files with 24 additions and 13 deletions
|
@ -385,8 +385,9 @@ Session::Session(QObject *parent)
|
||||||
| lt::alert::tracker_notification
|
| lt::alert::tracker_notification
|
||||||
| lt::alert::status_notification
|
| lt::alert::status_notification
|
||||||
| lt::alert::ip_block_notification
|
| lt::alert::ip_block_notification
|
||||||
| lt::alert::file_progress_notification
|
| lt::alert::performance_warning
|
||||||
| lt::alert::stats_notification;
|
| lt::alert::stats_notification
|
||||||
|
| lt::alert::file_progress_notification;
|
||||||
|
|
||||||
const std::string peerId = lt::generate_fingerprint(PEER_ID, QBT_VERSION_MAJOR, QBT_VERSION_MINOR, QBT_VERSION_BUGFIX, QBT_VERSION_BUILD);
|
const std::string peerId = lt::generate_fingerprint(PEER_ID, QBT_VERSION_MAJOR, QBT_VERSION_MINOR, QBT_VERSION_BUGFIX, QBT_VERSION_BUILD);
|
||||||
lt::settings_pack pack;
|
lt::settings_pack pack;
|
||||||
|
|
|
@ -1835,6 +1835,12 @@ void TorrentHandle::handleMetadataReceivedAlert(const lt::metadata_received_aler
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TorrentHandle::handlePerformanceAlert(const lt::performance_alert *p) const
|
||||||
|
{
|
||||||
|
LogMsg((tr("Performance alert: ") + QString::fromStdString(p->message()))
|
||||||
|
, Log::INFO);
|
||||||
|
}
|
||||||
|
|
||||||
void TorrentHandle::handleTempPathChanged()
|
void TorrentHandle::handleTempPathChanged()
|
||||||
{
|
{
|
||||||
adjustActualSavePath();
|
adjustActualSavePath();
|
||||||
|
@ -1907,6 +1913,9 @@ void TorrentHandle::handleAlert(const lt::alert *a)
|
||||||
case lt::torrent_checked_alert::alert_type:
|
case lt::torrent_checked_alert::alert_type:
|
||||||
handleTorrentCheckedAlert(static_cast<const lt::torrent_checked_alert*>(a));
|
handleTorrentCheckedAlert(static_cast<const lt::torrent_checked_alert*>(a));
|
||||||
break;
|
break;
|
||||||
|
case lt::performance_alert::alert_type:
|
||||||
|
handlePerformanceAlert(static_cast<const lt::performance_alert*>(a));
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -360,23 +360,24 @@ namespace BitTorrent
|
||||||
void updateState();
|
void updateState();
|
||||||
void updateTorrentInfo();
|
void updateTorrentInfo();
|
||||||
|
|
||||||
|
void handleFastResumeRejectedAlert(const lt::fastresume_rejected_alert *p);
|
||||||
|
void handleFileCompletedAlert(const lt::file_completed_alert *p);
|
||||||
|
void handleFileRenamedAlert(const lt::file_renamed_alert *p);
|
||||||
|
void handleFileRenameFailedAlert(const lt::file_rename_failed_alert *p);
|
||||||
|
void handleMetadataReceivedAlert(const lt::metadata_received_alert *p);
|
||||||
|
void handlePerformanceAlert(const lt::performance_alert *p) const;
|
||||||
|
void handleSaveResumeDataAlert(const lt::save_resume_data_alert *p);
|
||||||
|
void handleSaveResumeDataFailedAlert(const lt::save_resume_data_failed_alert *p);
|
||||||
|
void handleStatsAlert(const lt::stats_alert *p);
|
||||||
void handleStorageMovedAlert(const lt::storage_moved_alert *p);
|
void handleStorageMovedAlert(const lt::storage_moved_alert *p);
|
||||||
void handleStorageMovedFailedAlert(const lt::storage_moved_failed_alert *p);
|
void handleStorageMovedFailedAlert(const lt::storage_moved_failed_alert *p);
|
||||||
void handleTrackerReplyAlert(const lt::tracker_reply_alert *p);
|
|
||||||
void handleTrackerWarningAlert(const lt::tracker_warning_alert *p);
|
|
||||||
void handleTrackerErrorAlert(const lt::tracker_error_alert *p);
|
|
||||||
void handleTorrentCheckedAlert(const lt::torrent_checked_alert *p);
|
void handleTorrentCheckedAlert(const lt::torrent_checked_alert *p);
|
||||||
void handleTorrentFinishedAlert(const lt::torrent_finished_alert *p);
|
void handleTorrentFinishedAlert(const lt::torrent_finished_alert *p);
|
||||||
void handleTorrentPausedAlert(const lt::torrent_paused_alert *p);
|
void handleTorrentPausedAlert(const lt::torrent_paused_alert *p);
|
||||||
void handleTorrentResumedAlert(const lt::torrent_resumed_alert *p);
|
void handleTorrentResumedAlert(const lt::torrent_resumed_alert *p);
|
||||||
void handleSaveResumeDataAlert(const lt::save_resume_data_alert *p);
|
void handleTrackerErrorAlert(const lt::tracker_error_alert *p);
|
||||||
void handleSaveResumeDataFailedAlert(const lt::save_resume_data_failed_alert *p);
|
void handleTrackerReplyAlert(const lt::tracker_reply_alert *p);
|
||||||
void handleFastResumeRejectedAlert(const lt::fastresume_rejected_alert *p);
|
void handleTrackerWarningAlert(const lt::tracker_warning_alert *p);
|
||||||
void handleFileRenamedAlert(const lt::file_renamed_alert *p);
|
|
||||||
void handleFileRenameFailedAlert(const lt::file_rename_failed_alert *p);
|
|
||||||
void handleFileCompletedAlert(const lt::file_completed_alert *p);
|
|
||||||
void handleMetadataReceivedAlert(const lt::metadata_received_alert *p);
|
|
||||||
void handleStatsAlert(const lt::stats_alert *p);
|
|
||||||
|
|
||||||
void resume_impl(bool forced);
|
void resume_impl(bool forced);
|
||||||
bool isMoveInProgress() const;
|
bool isMoveInProgress() const;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue