History

put networking library into its own QLoggingCategory

Seth Alves committed 11 years ago

Commit cb7ff861 parent d5832f016 files · +178 −128Browse files

Showing the changes to libraries/networking/src/ResourceCache.cpp (1 of 16 files). Show all

Unified · Split

libraries/networking/src/ResourceCache.cpp+6−4
@@ -21,6 +21,8 @@ · 20 unmodified lines
2121 #include <assert.h>
2222
2323 #include "NetworkAccessManager.h"
24+#include "NetworkLogging.h"
25+
2426 #include "ResourceCache.h"
2527
2628 #define clamp(x, min, max) (((x) < (min)) ? (min) :\
@@ -50,7 +52,7 @@ void ResourceCache::refresh(const QUrl& url) { · 23 unmodified lines
5052 }
5153
5254 void ResourceCache::getResourceAsynchronously(const QUrl& url) {
53− qDebug() << "ResourceCache::getResourceAsynchronously" << url.toString();
55+ qCDebug(networking) << "ResourceCache::getResourceAsynchronously" << url.toString();
5456 _resourcesToBeGottenLock.lockForWrite();
5557 _resourcesToBeGotten.enqueue(QUrl(url));
5658 _resourcesToBeGottenLock.unlock();
@@ -354,10 +356,10 @@ void Resource::maybeRefresh() { · 297 unmodified lines
354356 }
355357 } else if (!variant.isValid() || !variant.canConvert<QDateTime>() ||
356358 !variant.value<QDateTime>().isValid() || variant.value<QDateTime>().isNull()) {
357− qDebug() << "Cannot determine when" << _url.fileName() << "was modified last, cached version might be outdated";
359+ qCDebug(networking) << "Cannot determine when" << _url.fileName() << "was modified last, cached version might be outdated";
358360 return;
359361 }
360− qDebug() << "Loaded" << _url.fileName() << "from the disk cache but the network version is newer, refreshing.";
362+ qCDebug(networking) << "Loaded" << _url.fileName() << "from the disk cache but the network version is newer, refreshing.";
361363 refresh();
362364 }
363365 }
@@ -441,7 +443,7 @@ void Resource::handleReplyError(QNetworkReply::NetworkError error, QDebug debug) · 77 unmodified lines
441443 }
442444
443445 void Resource::handleReplyFinished() {
444− qDebug() << "Got finished without download progress/error?" << _url;
446+ qCDebug(networking) << "Got finished without download progress/error?" << _url;
445447 handleDownloadProgress(0, 0);
446448 }
447449

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t