mirror of
https://github.com/overte-org/overte.git
synced 2025-04-23 15:13:41 +02:00
switch to bool per CR feedback
This commit is contained in:
parent
3ebf322fcf
commit
e8f0df4363
2 changed files with 3 additions and 3 deletions
|
@ -42,7 +42,7 @@ bool BaseAssetScriptingInterface::initializeCache() {
|
|||
if (!assetClient()) {
|
||||
return false; // not yet possible to initialize the cache
|
||||
}
|
||||
if (!_cacheDirectory.isEmpty()) {
|
||||
if (_cacheReady) {
|
||||
return true; // cache is ready
|
||||
}
|
||||
|
||||
|
@ -51,7 +51,7 @@ bool BaseAssetScriptingInterface::initializeCache() {
|
|||
|
||||
Promise deferred = makePromise("BaseAssetScriptingInterface--queryCacheStatus");
|
||||
deferred->then([this](QVariantMap result) {
|
||||
_cacheDirectory = result.value("cacheDirectory").toString();
|
||||
_cacheReady = !result.value("cacheDirectory").toString().isEmpty();
|
||||
});
|
||||
deferred->fail([](QString error) {
|
||||
qDebug() << "BaseAssetScriptingInterface::queryCacheStatus ERROR" << QThread::currentThread() << error;
|
||||
|
|
|
@ -40,7 +40,7 @@ public slots:
|
|||
QString hashDataHex(const QByteArray& data) { return hashData(data).toHex(); }
|
||||
|
||||
protected:
|
||||
QString _cacheDirectory;
|
||||
bool _cacheReady{ false };
|
||||
bool initializeCache();
|
||||
Promise getCacheStatus();
|
||||
Promise queryCacheMeta(const QUrl& url);
|
||||
|
|
Loading…
Reference in a new issue