diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2021-12-03 01:25:31 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2021-12-04 17:11:27 +0100 |
commit | ccd61929923affb8830b6cb95250144fc55e6a8c (patch) | |
tree | 0ffc961efacdea7a7b010b5b35fb4c11ccfc3f8c /src/qml/qml/qqmlengine.cpp | |
parent | c9112c210f3fd3b7d62319d9c9a0a496153d7afa (diff) |
QQmlEngine: some more cleanup
Remove dead code, initialize members inline, write "emit" when emitting
signals.
Change-Id: If7ba5a9235abb9b605194db727847a7e035e5529
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlengine.cpp')
-rw-r--r-- | src/qml/qml/qqmlengine.cpp | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp index 7c2c3648df..22b5ef8df3 100644 --- a/src/qml/qml/qqmlengine.cpp +++ b/src/qml/qml/qqmlengine.cpp @@ -240,26 +240,6 @@ QQmlImageProviderBase::~QQmlImageProviderBase() { } - -QQmlEnginePrivate::QQmlEnginePrivate(QQmlEngine *e) -: propertyCapture(nullptr), rootContext(nullptr), -#if QT_CONFIG(qml_debug) - profiler(nullptr), -#endif - outputWarningsToMsgLog(true), - erroredBindings(nullptr), inProgressCreations(0), -#if QT_CONFIG(qml_worker_script) - workerScriptEngine(nullptr), -#endif - activeObjectCreator(nullptr), -#if QT_CONFIG(qml_network) - networkAccessManager(nullptr), networkAccessManagerFactory(nullptr), -#endif - scarceResourcesRefCount(0), importDatabase(e), typeLoader(e), - uniqueId(1), incubatorCount(0), incubationController(nullptr) -{ -} - QQmlEnginePrivate::~QQmlEnginePrivate() { if (inProgressCreations) @@ -1445,7 +1425,7 @@ static void dumpwarning(const QList<QQmlError> &errors) void QQmlEnginePrivate::warning(const QQmlError &error) { Q_Q(QQmlEngine); - q->warnings(QList<QQmlError>() << error); + emit q->warnings(QList<QQmlError>({error})); if (outputWarningsToMsgLog) dumpwarning(error); } @@ -1453,7 +1433,7 @@ void QQmlEnginePrivate::warning(const QQmlError &error) void QQmlEnginePrivate::warning(const QList<QQmlError> &errors) { Q_Q(QQmlEngine); - q->warnings(errors); + emit q->warnings(errors); if (outputWarningsToMsgLog) dumpwarning(errors); } |