History

remove debug prints; CR feedback

humbletim committed 8 years ago

Commit 8d2e0411 parent 8c7a8f02 files · +70 −85Browse files

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

Unified · Split

libraries/networking/src/BaseAssetScriptingInterface.cpp+1−15
@@ -36,8 +36,6 @@ BaseAssetScriptingInterface::BaseAssetScriptingInterface(QObject* parent) : QObj · 35 unmodified lines
3636
3737
3838 bool BaseAssetScriptingInterface::initializeCache() {
39− qDebug() << "BaseAssetScriptingInterface::getCacheStatus -- current values" << _cache.cacheDirectory() << _cache.cacheSize() << _cache.maximumCacheSize();
40−
4139 // NOTE: *instances* of QNetworkDiskCache are not thread-safe -- however, different threads can effectively
4240 // use the same underlying cache if configured with identical settings. Once AssetClient's disk cache settings
4341 // become available we configure our instance to match.
@@ -50,29 +48,23 @@ bool BaseAssetScriptingInterface::initializeCache() { · 6 unmodified lines
5048 }
5149
5250 // attempt to initialize the cache
53− qDebug() << "BaseAssetScriptingInterface::getCacheStatus -- invoking AssetClient::init" << assetClient().data();
5451 QMetaObject::invokeMethod(assetClient().data(), "init");
5552
56− qDebug() << "BaseAssetScriptingInterface::getCacheStatus querying cache status" << QThread::currentThread();
5753 Promise deferred = makePromise("BaseAssetScriptingInterface--queryCacheStatus");
5854 deferred->then([&](QVariantMap result) {
59− qDebug() << "//queryCacheStatus" << QThread::currentThread();
6055 auto cacheDirectory = result.value("cacheDirectory").toString();
61− auto cacheSize = result.value("cacheSize").toLongLong();
6256 auto maximumCacheSize = result.value("maximumCacheSize").toLongLong();
63− qDebug() << "///queryCacheStatus" << cacheDirectory << cacheSize << maximumCacheSize;
6457 _cache.setCacheDirectory(cacheDirectory);
6558 _cache.setMaximumCacheSize(maximumCacheSize);
6659 });
6760 deferred->fail([&](QString error) {
68− qDebug() << "//queryCacheStatus ERROR" << QThread::currentThread() << error;
61+ qDebug() << "BaseAssetScriptingInterface::queryCacheStatus ERROR" << QThread::currentThread() << error;
6962 });
7063 assets->cacheInfoRequest(deferred);
7164 return false; // cache is not ready yet
7265 }
7366
7467 QVariantMap BaseAssetScriptingInterface::getCacheStatus() {
75− //assetClient()->cacheInfoRequest(this, "onCacheInfoResponse");
7668 return {
7769 { "cacheDirectory", _cache.cacheDirectory() },
7870 { "cacheSize", _cache.cacheSize() },
@@ -104,7 +96,6 @@ QVariantMap BaseAssetScriptingInterface::queryCacheMeta(const QUrl& url) { · 25 unmodified lines
10496 }
10597
10698 QVariantMap BaseAssetScriptingInterface::loadFromCache(const QUrl& url) {
107− qDebug() << "loadFromCache" << url;
10899 QVariantMap result = {
109100 { "metadata", queryCacheMeta(url) },
110101 { "data", QByteArray() },
@@ -112,7 +103,6 @@ QVariantMap BaseAssetScriptingInterface::loadFromCache(const QUrl& url) { · 1 unmodified line
112103 // caller is responsible for the deletion of the ioDevice, hence the unique_ptr
113104 if (auto ioDevice = std::unique_ptr<QIODevice>(_cache.data(url))) {
114105 QByteArray data = ioDevice->readAll();
115− qCDebug(asset_client) << url.toDisplayString() << "loaded from disk cache (" << data.size() << " bytes)";
116106 result["data"] = data;
117107 }
118108 return result;
@@ -170,7 +160,6 @@ Promise BaseAssetScriptingInterface::loadAsset(QString asset, bool decompress, Q · 51 unmodified lines
170160 Q_ASSERT(thread() == QThread::currentThread());
171161 fetched->mixin(result);
172162 if (decompress) {
173− qDebug() << "loadAsset::decompressBytes...";
174163 decompressBytes(result.value("data").toByteArray())
175164 ->mixin(result)
176165 ->ready([=](QString error, QVariantMap result) {
@@ -182,7 +171,6 @@ Promise BaseAssetScriptingInterface::loadAsset(QString asset, bool decompress, Q · 5 unmodified lines
182171 });
183172
184173 fetched->ready([=](QString error, QVariantMap result) {
185− qDebug() << "loadAsset::fetched" << error;
186174 if (responseType == "arraybuffer") {
187175 loaded->resolve(NoError, result);
188176 } else {
@@ -268,7 +256,6 @@ Promise BaseAssetScriptingInterface::downloadBytes(QString hash) { · 79 unmodified lines
268256 Promise deferred = makePromise(__FUNCTION__);
269257
270258 QObject::connect(assetRequest, &AssetRequest::finished, assetRequest, [this, deferred](AssetRequest* request) {
271− qDebug() << "...BaseAssetScriptingInterface::downloadBytes" << request->getErrorString();
272259 // note: we are now on the "Resource Manager" thread
273260 Q_ASSERT(QThread::currentThread() == request->thread());
274261 Q_ASSERT(request->getState() == AssetRequest::Finished);
@@ -287,7 +274,6 @@ Promise BaseAssetScriptingInterface::downloadBytes(QString hash) { · 12 unmodified lines
287274 error = request->getError();
288275 result = { { "error", request->getError() } };
289276 }
290− qDebug() << "//BaseAssetScriptingInterface::downloadBytes" << error << result.keys();
291277 // forward thread-safe copies back to our thread
292278 deferred->handle(error, result);
293279 request->deleteLater();

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