mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-29 05:48:47 +03:00
Display more useful information in log window when an I/O error occurs
I/O errors are now reported in nox version too
This commit is contained in:
parent
0f4f108eb5
commit
4d5001d18d
2 changed files with 4 additions and 6 deletions
|
@ -307,12 +307,8 @@ void GUI::finishedTorrent(QTorrentHandle& h) const {
|
||||||
|
|
||||||
// Notification when disk is full
|
// Notification when disk is full
|
||||||
void GUI::fullDiskError(QTorrentHandle& h, QString msg) const {
|
void GUI::fullDiskError(QTorrentHandle& h, QString msg) const {
|
||||||
if(!h.is_valid()) return;
|
if(!h.is_valid()) return; showNotificationBaloon(tr("I/O Error", "i.e: Input/Output Error"), tr("An I/O error occured for torrent %1.\n Reason: %2", "e.g: An error occured for torrent xxx.avi.\n Reason: disk is full.").arg(h.name()).arg(msg));
|
||||||
showNotificationBaloon(tr("I/O Error", "i.e: Input/Output Error"), tr("An I/O error occured for torrent %1.\n Reason: %2", "e.g: An error occured for torrent xxx.avi.\n Reason: disk is full.").arg(h.name()).arg(msg));
|
|
||||||
// Download will be paused by libtorrent. Updating GUI information accordingly
|
|
||||||
QString hash = h.hash();
|
|
||||||
qDebug("Full disk error, pausing torrent %s", hash.toLocal8Bit().data());
|
|
||||||
BTSession->addConsoleMessage(tr("An error occured (full disk?), '%1' paused.", "e.g: An error occured (full disk?), 'xxx.avi' paused.").arg(h.name()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void GUI::createKeyboardShortcuts() {
|
void GUI::createKeyboardShortcuts() {
|
||||||
|
|
|
@ -1964,6 +1964,8 @@ void Bittorrent::addConsoleMessage(QString msg, QString) {
|
||||||
if(h.is_valid()) {
|
if(h.is_valid()) {
|
||||||
h.auto_managed(false);
|
h.auto_managed(false);
|
||||||
std::cerr << "File Error: " << p->message().c_str() << std::endl;
|
std::cerr << "File Error: " << p->message().c_str() << std::endl;
|
||||||
|
addConsoleMessage(tr("An I/O error occured, '%1' paused.").arg(h.name()));
|
||||||
|
addConsoleMessage(tr("Reason: %1").arg(misc::toQString(p->message())));
|
||||||
if(h.is_valid()) {
|
if(h.is_valid()) {
|
||||||
emit fullDiskError(h, misc::toQString(p->message()));
|
emit fullDiskError(h, misc::toQString(p->message()));
|
||||||
h.pause();
|
h.pause();
|
||||||
|
|
Loading…
Reference in a new issue