Skip to content

Commit

Permalink
Merge pull request #1 from OPNA2608/fix/mark-ColorSchemeManager-insta…
Browse files Browse the repository at this point in the history
…nce-cpp-owned

Mark ColorSchemeManager singleton as C++-owned
  • Loading branch information
gber authored Oct 4, 2024
2 parents ffc6b2b + f3050bd commit 2a5c5d6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/qmltermwidget_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ static QObject *colorschememanager_provider(QQmlEngine *engine, QJSEngine *scrip
Q_UNUSED(engine)
Q_UNUSED(scriptEngine)

return ColorSchemeManager::instance();
QObject* instance = ColorSchemeManager::instance();
QQmlEngine::setObjectOwnership(instance, QQmlEngine::CppOwnership);
return instance;
}

void QmltermwidgetPlugin::registerTypes(const char *uri)
Expand Down

0 comments on commit 2a5c5d6

Please sign in to comment.