QNetworkAccessCache: move debug logging to specific ifdef

Instead of for any debug output.
Since QTestLib cuts off output after X messages we shouldn't add these
by default.

Another option would be categorized logging, but QNAC should not be very
interesting for 'outside' users

Change-Id: I4c2c2a68ca4962476bfecd679f3229ccf3403aee
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
bb10
Mårten Nordheim 2021-08-27 12:47:10 +02:00
parent 8460a55d32
commit 3a7d6767e9
1 changed files with 3 additions and 1 deletions

View File

@ -46,6 +46,8 @@
#include <vector>
//#define DEBUG_ACCESSCACHE
QT_BEGIN_NAMESPACE
enum ExpiryTimeEnum {
@ -145,7 +147,7 @@ void QNetworkAccessCache::linkEntry(const QByteArray &key)
node->timestamp = QDateTime::currentDateTimeUtc().addSecs(node->object->expiryTimeoutSeconds);
#ifdef QT_DEBUG
#ifdef DEBUG_ACCESSCACHE
qDebug() << "QNetworkAccessCache case trying to insert=" << QString::fromUtf8(key)
<< node->timestamp;
Node *current = lastExpiringNode;