KSyntaxHighlighting
8#include "kquicksyntaxhighlightingplugin.h"
9#include "kquicksyntaxhighlighter.h"
11#include <KSyntaxHighlighting/Definition>
12#include <KSyntaxHighlighting/Repository>
13#include <KSyntaxHighlighting/Theme>
21 static std::unique_ptr<Repository> s_instance;
23 s_instance = std::make_unique<Repository>();
25 return s_instance.get();
28void KQuickSyntaxHighlightingPlugin::registerTypes(
const char *uri)
30 Q_ASSERT(QLatin1String(uri) == QLatin1String(
"org.kde.syntaxhighlighting"));
31 qRegisterMetaType<Definition>();
32 qRegisterMetaType<QList<Definition>>();
33 qRegisterMetaType<Theme>();
34 qRegisterMetaType<QList<Theme>>();
35 qmlRegisterType<KQuickSyntaxHighlighter>(uri, 1, 0,
"SyntaxHighlighter");
36 qmlRegisterUncreatableMetaObject(Definition::staticMetaObject, uri, 1, 0,
"Definition", {});
37 qmlRegisterUncreatableMetaObject(Theme::staticMetaObject, uri, 1, 0,
"Theme", {});
38 qmlRegisterSingletonType<Repository>(uri, 1, 0,
"Repository", [](
auto engine,
auto scriptEngine) {
40 auto repo = defaultRepository();
42 return defaultRepository();
46#include "moc_kquicksyntaxhighlightingplugin.cpp"
Syntax highlighting engine for Kate syntax definitions.
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:48:02 by
doxygen 1.13.2 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.