mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-19 12:59:56 -07:00
- Clear torrent errors when starting a torrent
This commit is contained in:
parent
e9ad58a373
commit
4bfacb8b91
2 changed files with 7 additions and 0 deletions
|
@ -441,6 +441,11 @@ QString QTorrentHandle::root_path() const {
|
||||||
return save_path();
|
return save_path();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool QTorrentHandle::has_error() const {
|
||||||
|
Q_ASSERT(h.is_valid());
|
||||||
|
return h.status().error.empty();
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Setters
|
// Setters
|
||||||
//
|
//
|
||||||
|
@ -464,6 +469,7 @@ void QTorrentHandle::pause() {
|
||||||
|
|
||||||
void QTorrentHandle::resume() {
|
void QTorrentHandle::resume() {
|
||||||
Q_ASSERT(h.is_valid());
|
Q_ASSERT(h.is_valid());
|
||||||
|
if(has_error()) h.clear_error();
|
||||||
h.auto_managed(true);
|
h.auto_managed(true);
|
||||||
h.resume();
|
h.resume();
|
||||||
}
|
}
|
||||||
|
|
|
@ -127,6 +127,7 @@ class QTorrentHandle {
|
||||||
bool priv() const;
|
bool priv() const;
|
||||||
bool first_last_piece_first() const;
|
bool first_last_piece_first() const;
|
||||||
QString root_path() const;
|
QString root_path() const;
|
||||||
|
bool has_error() const;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Setters
|
// Setters
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue