refactor: Uses single QML engine for all QML code (#323)

* refactor: Uses single QML engine for all QML code

* fix: Adds missing `QPointer` include

* Parents QML engine instance to plugin instance.

---------

Co-authored-by: Ivan Lebedev <ilebedev@flightpath3d.com>
Co-authored-by: Ivan Lebedev <ilebedev1988@gmail.com>
This commit is contained in:
Ivan Lebedev
2026-04-28 16:33:03 +02:00
committed by GitHub
parent bbb9c47cbb
commit 9bb6d55687
9 changed files with 45 additions and 21 deletions

View File

@@ -5,6 +5,9 @@
#include <coreplugin/inavigationwidgetfactory.h>
#include <QObject>
#include <QPointer>
class QQmlEngine;
namespace QodeAssist::Chat {
@@ -12,10 +15,13 @@ class NavigationPanel : public Core::INavigationWidgetFactory
{
Q_OBJECT
public:
explicit NavigationPanel();
explicit NavigationPanel(QQmlEngine* engine);
~NavigationPanel();
Core::NavigationView createWidget() override;
private:
QPointer<QQmlEngine> m_engine;
};
} // namespace QodeAssist::Chat