diff --git a/src/bittorrent.cpp b/src/bittorrent.cpp index 31e5aec0d..68e9e81fc 100644 --- a/src/bittorrent.cpp +++ b/src/bittorrent.cpp @@ -1135,7 +1135,7 @@ void bittorrent::reloadTorrent(const QTorrentHandle &h) { // Remove torrent s->remove_torrent(h.get_torrent_handle()); // Add torrent again to session - unsigned short timeout = 0; + unsigned int timeout = 0; while(h.is_valid() && timeout < 6) { SleeperThread::msleep(1000); ++timeout; diff --git a/src/downloadingTorrents.cpp b/src/downloadingTorrents.cpp index f03375969..de6aa79a3 100644 --- a/src/downloadingTorrents.cpp +++ b/src/downloadingTorrents.cpp @@ -114,7 +114,7 @@ void DownloadingTorrents::notifyTorrentDoubleClicked(const QModelIndex& index) { } void DownloadingTorrents::addLogPeerBlocked(QString ip) { - static unsigned short nbLines = 0; + static unsigned int nbLines = 0; ++nbLines; if(nbLines > 200) { textBlockedUsers->clear(); @@ -184,7 +184,7 @@ void DownloadingTorrents::deleteTorrent(QString hash) { // Update Info Bar information void DownloadingTorrents::setInfoBar(QString info, QString color) { - static unsigned short nbLines = 0; + static unsigned int nbLines = 0; ++nbLines; // Check log size, clear it if too big if(nbLines > 200) { diff --git a/src/misc.h b/src/misc.h index 0b03ac25b..b58d7b0d9 100644 --- a/src/misc.h +++ b/src/misc.h @@ -114,7 +114,7 @@ class misc : public QObject{ return tr("Unknown", "Unknown (size)"); } const QString units[4] = {tr("B", "bytes"), tr("KiB", "kibibytes (1024 bytes)"), tr("MiB", "mebibytes (1024 kibibytes)"), tr("GiB", "gibibytes (1024 mibibytes)")}; - for(unsigned short i=0; i<5; ++i) { + for(unsigned int i=0; i<5; ++i) { if (val < 1024.) { snprintf(tmp, MAX_CHAR_TMP, "%.1f", val); return QString::fromUtf8(tmp) + QString::fromUtf8(" ") + units[i];