File indexing completed on 2024-05-19 15:10:52
0001 /* 0002 This file is part of the KDE libraries 0003 SPDX-FileCopyrightText: 2014 Daniel Vrátil <dvratil@redhat.com> 0004 0005 SPDX-License-Identifier: LGPL-2.0-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0006 */ 0007 0008 #include "ktexttohtml.h" 0009 0010 #include <kemoticons.h> 0011 #include <kemoticonstheme.h> 0012 0013 0014 Q_GLOBAL_STATIC(KEmoticons, sEmoticons) 0015 0016 0017 KTextToHTMLEmoticons::KTextToHTMLEmoticons() 0018 { 0019 } 0020 0021 QString KTextToHTMLEmoticons::parseEmoticons(const QString &text, 0022 bool strictParse, 0023 const QStringList &exclude) 0024 { 0025 KEmoticonsTheme::ParseMode mode = KEmoticonsTheme::DefaultParse; 0026 if (strictParse) { 0027 mode = KEmoticonsTheme::StrictParse; 0028 } 0029 return sEmoticons->theme().parseEmoticons(text, mode, exclude); 0030 }