mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-06-19 12:40:10 +02:00
Added a script command to clear caches.
This commit is contained in:
parent
f610d6b201
commit
7f70511d1a
2 changed files with 9 additions and 0 deletions
|
@ -156,3 +156,7 @@ void TestScriptingInterface::profileRange(const QString& name, QScriptValue fn)
|
||||||
fn.call();
|
fn.call();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TestScriptingInterface::clearCaches() {
|
||||||
|
qApp->reloadResourceCaches();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -78,6 +78,11 @@ public slots:
|
||||||
|
|
||||||
Q_INVOKABLE void profileRange(const QString& name, QScriptValue function);
|
Q_INVOKABLE void profileRange(const QString& name, QScriptValue function);
|
||||||
|
|
||||||
|
/**jsdoc
|
||||||
|
* Clear all caches (menu command Reload Content)
|
||||||
|
*/
|
||||||
|
void clearCaches();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool waitForCondition(qint64 maxWaitMs, std::function<bool()> condition);
|
bool waitForCondition(qint64 maxWaitMs, std::function<bool()> condition);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue