mirror of
https://github.com/lubosz/overte.git
synced 2025-04-19 17:03:43 +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();
|
||||
}
|
||||
|
||||
void TestScriptingInterface::clearCaches() {
|
||||
qApp->reloadResourceCaches();
|
||||
}
|
||||
|
||||
|
|
|
@ -78,6 +78,11 @@ public slots:
|
|||
|
||||
Q_INVOKABLE void profileRange(const QString& name, QScriptValue function);
|
||||
|
||||
/**jsdoc
|
||||
* Clear all caches (menu command Reload Content)
|
||||
*/
|
||||
void clearCaches();
|
||||
|
||||
private:
|
||||
bool waitForCondition(qint64 maxWaitMs, std::function<bool()> condition);
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue