forked from qt-creator/qt-creator
QmlJS: Add refcounting to FakeMetaObjects.
Previously they were leaked when a qmldump or the C++ exported QML type list updated. Just deleting the previous FakeMetaObjects is not an option, as they might still be used in a QmlObjectValue owned by an Engine. Reviewed-by: Erik Verbruggen
This commit is contained in:
@@ -39,16 +39,14 @@
|
||||
#include <QtCore/QSharedPointer>
|
||||
#include <QtCore/QString>
|
||||
|
||||
#include <languageutils/fakemetaobject.h>
|
||||
|
||||
#include "parser/qmldirparser_p.h"
|
||||
#include "parser/qmljsengine_p.h"
|
||||
#include "qmljs_global.h"
|
||||
|
||||
QT_QML_BEGIN_NAMESPACE
|
||||
|
||||
namespace LanguageUtils {
|
||||
class FakeMetaObject;
|
||||
}
|
||||
|
||||
namespace QmlJS {
|
||||
|
||||
class Bind;
|
||||
@@ -134,7 +132,7 @@ private:
|
||||
bool _valid;
|
||||
QList<QmlDirParser::Component> _components;
|
||||
QList<QmlDirParser::Plugin> _plugins;
|
||||
typedef QList<const LanguageUtils::FakeMetaObject *> FakeMetaObjectList;
|
||||
typedef QList<LanguageUtils::FakeMetaObject::ConstPtr> FakeMetaObjectList;
|
||||
FakeMetaObjectList _metaObjects;
|
||||
|
||||
DumpStatus _dumpStatus;
|
||||
|
||||
Reference in New Issue
Block a user