mirror of
https://github.com/overte-org/overte.git
synced 2025-04-19 16:23:39 +02:00
Fix ScriptCacheSignalProxy not being properly cleaned up
This commit is contained in:
parent
5287ec1eee
commit
1a704f8d0a
2 changed files with 2 additions and 2 deletions
|
@ -55,7 +55,8 @@ void BatchLoader::start() {
|
|||
// Use a proxy callback to handle the call and emit the signal in a thread-safe way.
|
||||
// If BatchLoader is deleted before the callback is called, the subsequent "emit" call will not do
|
||||
// anything.
|
||||
ScriptCacheSignalProxy* proxy = new ScriptCacheSignalProxy(scriptCache.data());
|
||||
ScriptCacheSignalProxy* proxy = new ScriptCacheSignalProxy();
|
||||
connect(scriptCache.data(), &ScriptCache::destroyed, proxy, &ScriptCacheSignalProxy::deleteLater);
|
||||
|
||||
connect(proxy, &ScriptCacheSignalProxy::contentAvailable, this, [this](const QString& url, const QString& contents, bool isURL, bool success) {
|
||||
if (isURL && success) {
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
class ScriptCacheSignalProxy : public QObject {
|
||||
Q_OBJECT
|
||||
public:
|
||||
ScriptCacheSignalProxy(QObject* parent) : QObject(parent) { }
|
||||
void receivedContent(const QString& url, const QString& contents, bool isURL, bool success);
|
||||
|
||||
signals:
|
||||
|
|
Loading…
Reference in a new issue