mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-22 08:27:24 -06:00
Support changes to plugin API in libtorrent-2.0
libtorrent-2.0 introduced a type-safe alternative to void* (lt::client_data_t) for passing user-data into plugins. qBT doesn't use any user data in its plugins, but the signatures have changed nevertheless, and qBT need to update to be compatible with libtorrent-2.0.
This commit is contained in:
@@ -53,12 +53,12 @@ lt::feature_flags_t NativeSessionExtension::implemented_features()
|
||||
return alert_feature;
|
||||
}
|
||||
|
||||
std::shared_ptr<lt::torrent_plugin> NativeSessionExtension::new_torrent(const lt::torrent_handle &torrentHandle, void *)
|
||||
std::shared_ptr<lt::torrent_plugin> NativeSessionExtension::new_torrent(const lt::torrent_handle &torrentHandle, ClientData)
|
||||
{
|
||||
return std::make_shared<NativeTorrentExtension>(torrentHandle);
|
||||
}
|
||||
#else
|
||||
boost::shared_ptr<lt::torrent_plugin> NativeSessionExtension::new_torrent(const lt::torrent_handle &torrentHandle, void *)
|
||||
boost::shared_ptr<lt::torrent_plugin> NativeSessionExtension::new_torrent(const lt::torrent_handle &torrentHandle, ClientData)
|
||||
{
|
||||
return boost::make_shared<NativeTorrentExtension>(torrentHandle);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user