diff --git a/src/statistics.cpp b/src/statistics.cpp index c2687cb..6d10a61 100644 --- a/src/statistics.cpp +++ b/src/statistics.cpp @@ -83,11 +83,14 @@ void Statistics::addToDestinationsList(const QString &dest) { static QMutex mutex; mutex.lock(); - if (lastDestinations().size() >= g::c::LAST_AND_TOP_LIST_SIZE) + if (not lastDestinations().contains(dest)) { - m_lastDestinations.pop_back(); + if (lastDestinations().size() >= g::c::LAST_AND_TOP_LIST_SIZE) + { + m_lastDestinations.pop_back(); + } + m_lastDestinations.push_front(dest); } - m_lastDestinations.push_front(dest); mutex.unlock(); DBManager db; diff --git a/src/webpage.cpp b/src/webpage.cpp index f2c0161..a8d8f13 100644 --- a/src/webpage.cpp +++ b/src/webpage.cpp @@ -334,5 +334,6 @@ QPair WebPage::bytesToHumanReadableString(quint64 bytes) result.second = "PiB"; } + qDebug().noquote() << "Bytes to human-readable:" << bytes << "->" << result.first << result.second; return result; }