GrantleeTheme

grantleethemeengine.cpp
1 /*
2  SPDX-FileCopyrightText: 2016 Daniel Vrátil <[email protected]>
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 
12 using namespace GrantleeTheme;
13 
14 class GrantleeTheme::EnginePrivate
15 {
16 public:
17  EnginePrivate() = default;
18 
19  ~EnginePrivate() = default;
20 
22 };
23 
24 Engine::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 
35 Engine::~Engine() = default;
36 
37 QSharedPointer<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-2023 The KDE developers.
Generated on Sun Oct 1 2023 04:09:27 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.