GrantleeTheme

grantleethemeengine.cpp
1/*
2 SPDX-FileCopyrightText: 2016 Daniel Vrátil <dvratil@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.1-or-later
5*/
6
7#include "grantleethemeengine.h"
8#include "grantleeki18nlocalizer.h"
9
10#include <config-grantleetheme.h>
11
12using namespace GrantleeTheme;
13
14class GrantleeTheme::EnginePrivate
15{
16public:
17 EnginePrivate() = default;
18
19 ~EnginePrivate() = default;
20
22};
23
24Engine::Engine(QObject *parent)
25 : KTextTemplate::Engine(parent)
26 , d(new GrantleeTheme::EnginePrivate)
27{
28 addPluginPath(QStringLiteral(GRANTLEE_PLUGIN_INSTALL_DIR));
29 addDefaultLibrary(QStringLiteral("ktexttemplate_i18ntags"));
30 addDefaultLibrary(QStringLiteral("kde_grantlee_plugin"));
31 addDefaultLibrary(QStringLiteral("ktexttemplate_scriptabletags"));
32 setSmartTrimEnabled(true);
33}
34
35Engine::~Engine() = default;
36
37QSharedPointer<GrantleeKi18nLocalizer> Engine::localizer() const
38{
39 auto loc = d->localizer.toStrongRef();
40 if (!loc) {
41 loc.reset(new GrantleeKi18nLocalizer());
42 d->localizer = loc.toWeakRef();
43 }
44 return loc;
45}
46
47#include "moc_grantleethemeengine.cpp"
The GrantleeKi18nLocalizer class.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:07:43 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.