Hello community,

here is the log from the commit of package kemoticons for openSUSE:Factory 
checked in at 2018-01-09 14:41:48
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kemoticons (Old)
 and      /work/SRC/openSUSE:Factory/.kemoticons.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "kemoticons"

Tue Jan  9 14:41:48 2018 rev:47 rq:559438 version:5.41.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/kemoticons/kemoticons.changes    2017-11-16 
14:37:46.357723450 +0100
+++ /work/SRC/openSUSE:Factory/.kemoticons.new/kemoticons.changes       
2018-01-09 14:41:51.539689138 +0100
@@ -1,0 +2,13 @@
+Sun Dec 17 09:43:48 CET 2017 - lbeltr...@kde.org
+
+- Update to 5.41.0
+  * New feature release
+  * For more details please see:
+  * https://www.kde.org/announcements/kde-frameworks-5.41.0.php
+- Changes since 5.40.0:
+  * Build with QT_NO_CAST_FROM_ASCII
+  * KEmoticons: port plugins to JSON and add support for loading with 
KPluginMetaData
+  * Do not leak symbols of pimpl classes, protect with Q_DECL_HIDDEN
+  * Code cleanups
+
+-------------------------------------------------------------------

Old:
----
  kemoticons-5.40.0.tar.xz

New:
----
  kemoticons-5.41.0.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ kemoticons.spec ++++++
--- /var/tmp/diff_new_pack.6pL9nk/_old  2018-01-09 14:41:52.167659688 +0100
+++ /var/tmp/diff_new_pack.6pL9nk/_new  2018-01-09 14:41:52.175659312 +0100
@@ -17,13 +17,13 @@
 
 
 %define lname   libKF5Emoticons5
-%define _tar_path 5.40
+%define _tar_path 5.41
 # Full KF5 version (e.g. 5.33.0)
 %{!?_kf5_version: %global _kf5_version %{version}}
 # Last major and minor KF5 version (e.g. 5.33)
 %{!?_kf5_bugfix_version: %global _kf5_bugfix_version %(echo %{_kf5_version} | 
awk -F. '{print $1"."$2}')}
 Name:           kemoticons
-Version:        5.40.0
+Version:        5.41.0
 Release:        0
 %define kf5_version %{version}
 BuildRequires:  cmake >= 3.0

++++++ kemoticons-5.40.0.tar.xz -> kemoticons-5.41.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kemoticons-5.40.0/CMakeLists.txt 
new/kemoticons-5.41.0/CMakeLists.txt
--- old/kemoticons-5.40.0/CMakeLists.txt        2017-11-04 22:41:43.000000000 
+0100
+++ new/kemoticons-5.41.0/CMakeLists.txt        2017-12-02 11:12:45.000000000 
+0100
@@ -1,11 +1,11 @@
 cmake_minimum_required(VERSION 3.0)
 
-set(KF5_VERSION "5.40.0") # handled by release scripts
-set(KF5_DEP_VERSION "5.40.0") # handled by release scripts
+set(KF5_VERSION "5.41.0") # handled by release scripts
+set(KF5_DEP_VERSION "5.41.0") # handled by release scripts
 project(KEmoticons VERSION ${KF5_VERSION})
 
 include(FeatureSummary)
-find_package(ECM 5.40.0  NO_MODULE)
+find_package(ECM 5.41.0  NO_MODULE)
 set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake 
Modules." URL 
"https://projects.kde.org/projects/kdesupport/extra-cmake-modules";)
 feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND 
FATAL_ON_MISSING_REQUIRED_PACKAGES)
 
@@ -46,7 +46,6 @@
 
 # the strings throughout this library are used to search ressources
 # so they don't need translations
-remove_definitions(-DQT_NO_CAST_FROM_ASCII)
 
 add_subdirectory(src)
 add_subdirectory(themes)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kemoticons-5.40.0/autotests/autotestbase.h 
new/kemoticons-5.41.0/autotests/autotestbase.h
--- old/kemoticons-5.40.0/autotests/autotestbase.h      2017-11-04 
22:41:43.000000000 +0100
+++ new/kemoticons-5.41.0/autotests/autotestbase.h      2017-12-02 
11:12:45.000000000 +0100
@@ -30,7 +30,7 @@
     if (!sourceThemeDir.exists()) {
         return false;
     }
-    QDir themeDir(baseThemeDir.absolutePath() + '/' + themeName);
+    QDir themeDir(baseThemeDir.absolutePath() + QLatin1Char('/') + themeName);
     themeDir.removeRecursively();
     themeDir.mkpath(QStringLiteral("."));
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kemoticons-5.40.0/autotests/kemoticontest.cpp 
new/kemoticons-5.41.0/autotests/kemoticontest.cpp
--- old/kemoticons-5.40.0/autotests/kemoticontest.cpp   2017-11-04 
22:41:43.000000000 +0100
+++ new/kemoticons-5.41.0/autotests/kemoticontest.cpp   2017-12-02 
11:12:45.000000000 +0100
@@ -53,9 +53,9 @@
         QString dataPath = 
QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation);
         QString destThemePath = dataPath + QLatin1String("/emoticons/");
         QVERIFY(QDir().mkpath(destThemePath));
-        const QString destPath = destThemePath + default_theme;
+        const QString destPath = destThemePath + 
QString::fromLatin1(default_theme);
         QDir themeDir(destThemePath);
-        QVERIFY(copyTheme(QFINDTESTDATA("default-testtheme"), themeDir, 
default_theme));
+        QVERIFY(copyTheme(QFINDTESTDATA("default-testtheme"), themeDir, 
QString::fromLatin1(default_theme)));
 
         // check it can actually be found
         themePath = QStandardPaths::locate(
@@ -73,7 +73,7 @@
     {
         QString dataPath = 
QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation);
         const QString themePath = dataPath + QLatin1String("/emoticons/");
-        QVERIFY(QDir(themePath + default_theme).removeRecursively());
+        QVERIFY(QDir(themePath + 
QString::fromLatin1(default_theme)).removeRecursively());
         QVERIFY(QDir(themePath + 
QStringLiteral("xmpp-testtheme")).removeRecursively());
     }
 
@@ -93,10 +93,10 @@
             QString outputFileName = fileName;
             outputFileName.replace(QStringLiteral("input"), 
QStringLiteral("output"));
             const QString baseName = fileName.section(QLatin1Char('-'), 0, 0);
-            QTest::newRow(qPrintable(fileName.left(fileName.lastIndexOf('.'))))
+            
QTest::newRow(qPrintable(fileName.left(fileName.lastIndexOf(QLatin1Char('.')))))
                 << basePath + QLatin1Char('/') + fileName
                 << basePath + QLatin1Char('/') + outputFileName
-                << (baseName == QLatin1String("xmpp") ? "xmpp-testtheme" : 
default_theme)
+                << (baseName == QLatin1String("xmpp") ? 
QStringLiteral("xmpp-testtheme") : QString::fromLatin1(default_theme))
                 << (baseName == QLatin1String("broken"));
         }
     }
@@ -123,7 +123,7 @@
 
             QString result = emo.parseEmoticons(inputData,
                     KEmoticonsTheme::RelaxedParse | KEmoticonsTheme::SkipHTML);
-            result.replace(themePath + themeName + '/', QString());
+            result.replace(themePath + themeName + QLatin1Char('/'), 
QString());
 
             if (xfail) {
                 QEXPECT_FAIL("", "Checking known-broken testcase", Continue);
@@ -149,8 +149,8 @@
             QString outputFileName = fileName;
             outputFileName.replace(QStringLiteral("input"), 
QStringLiteral("output"));
             const QString baseName = fileName.section(QLatin1Char('-'), 0, 0);
-            QTest::newRow(qPrintable(fileName.left(fileName.lastIndexOf('.'))))
-            << (baseName == QLatin1String("xmpp") ? "xmpp-testtheme" : 
default_theme);
+            
QTest::newRow(qPrintable(fileName.left(fileName.lastIndexOf(QLatin1Char('.')))))
+            << (baseName == QLatin1String("xmpp") ? 
QStringLiteral("xmpp-testtheme") : QString::fromLatin1(default_theme));
         }
     }
 
@@ -162,7 +162,7 @@
 
         KEmoticonsTheme theme = kemoticons.theme(themeName);
 
-        const QString parsed = theme.parseEmoticons(":)");
+        const QString parsed = theme.parseEmoticons(QStringLiteral(":)"));
 
         QVERIFY(parsed.contains(QStringLiteral("width=\"99\"")));
         QVERIFY(parsed.contains(QStringLiteral("height=\"77\"")));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kemoticons-5.40.0/autotests/ktexttohtmlplugintest.cpp 
new/kemoticons-5.41.0/autotests/ktexttohtmlplugintest.cpp
--- old/kemoticons-5.40.0/autotests/ktexttohtmlplugintest.cpp   2017-11-04 
22:41:43.000000000 +0100
+++ new/kemoticons-5.41.0/autotests/ktexttohtmlplugintest.cpp   2017-12-02 
11:12:45.000000000 +0100
@@ -50,12 +50,12 @@
     QString dataPath = 
QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation);
     QString destThemePath = dataPath + QLatin1String("/emoticons/");
     QVERIFY(QDir().mkpath(destThemePath));
-    mEmoticonsThemePath = destThemePath + "default-testtheme";
+    mEmoticonsThemePath = destThemePath + QStringLiteral("default-testtheme");
     if (QFileInfo::exists(mEmoticonsThemePath)) {
         QVERIFY(QDir(mEmoticonsThemePath).removeRecursively());
     }
     QDir themeDir(destThemePath);
-    QVERIFY(copyTheme(QFINDTESTDATA("default-testtheme"), themeDir, 
"default-testtheme"));
+    QVERIFY(copyTheme(QFINDTESTDATA("default-testtheme"), themeDir, 
QStringLiteral("default-testtheme")));
 
     KEmoticons::setTheme(QStringLiteral("default-testtheme"));
     QVERIFY(!mEmoticonsThemePath.isEmpty());
@@ -63,7 +63,7 @@
 
 QString KTextToHTMLPluginTest::htmlForSmiley(const QString &emoticon, const 
QString &name) const
 {
-    return QString("<img align=\"center\" title=\"%1\" alt=\"%1\" 
src=\"%2/%3.png\" width=\"22\" height=\"22\" />")
+    return QStringLiteral("<img align=\"center\" title=\"%1\" alt=\"%1\" 
src=\"%2/%3.png\" width=\"22\" height=\"22\" />")
                 .arg(emoticon,
                      mEmoticonsThemePath,
                      name);
@@ -81,12 +81,12 @@
     QTest::newRow("simple")
         << "Hello :-)"
         << false << QStringList()
-        << QString("Hello %1").arg(htmlForSmiley(QStringLiteral(":-)"), 
QStringLiteral("smile")));
+        << QStringLiteral("Hello %1").arg(htmlForSmiley(QStringLiteral(":-)"), 
QStringLiteral("smile")));
 
     QTest::newRow("between strings")
         << "Hello :-) How are you?"
         << false << QStringList()
-        << QString("Hello %1 How are 
you?").arg(htmlForSmiley(QStringLiteral(":-)"), QStringLiteral("smile")));
+        << QStringLiteral("Hello %1 How are 
you?").arg(htmlForSmiley(QStringLiteral(":-)"), QStringLiteral("smile")));
 
     QTest::newRow("excluded")
         << "Bye :-("
@@ -96,7 +96,7 @@
     QTest::newRow("don't mix in HTML")
         << "<b>:(</b>"
         << false << QStringList()
-        << QString("<b>%1</b>").arg(htmlForSmiley(QStringLiteral(":("), 
QStringLiteral("sad")));
+        << QStringLiteral("<b>%1</b>").arg(htmlForSmiley(QStringLiteral(":("), 
QStringLiteral("sad")));
 
     QTest::newRow("strict parsing of smileys without space")
         << "Very happy! :-):-)"
@@ -106,7 +106,7 @@
     QTest::newRow("nonstrict parsing of smileys without space")
         << "Very happy! :-):-)"
         << false << QStringList()
-        << QString("Very happy! 
%1%1").arg(htmlForSmiley(QStringLiteral(":-)"), QStringLiteral("smile")));
+        << QStringLiteral("Very happy! 
%1%1").arg(htmlForSmiley(QStringLiteral(":-)"), QStringLiteral("smile")));
 
     QTest::newRow("smiley in HTML")
         << "<img src=\"...\" title=\":-)\" />"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kemoticons-5.40.0/src/core/kemoticons.cpp 
new/kemoticons-5.41.0/src/core/kemoticons.cpp
--- old/kemoticons-5.40.0/src/core/kemoticons.cpp       2017-11-04 
22:41:43.000000000 +0100
+++ new/kemoticons-5.41.0/src/core/kemoticons.cpp       2017-12-02 
11:12:45.000000000 +0100
@@ -29,6 +29,7 @@
 #include <QFileSystemWatcher>
 
 #include <kpluginloader.h>
+#include <kpluginmetadata.h>
 #include <kconfiggroup.h>
 #include <ksharedconfig.h>
 #include <ktar.h>
@@ -42,10 +43,12 @@
     KEmoticonsPrivate(KEmoticons *parent);
     ~KEmoticonsPrivate();
     void loadServiceList();
+    KEmoticonsProvider *loadProvider(const KPluginMetaData &plugin);
     KEmoticonsProvider *loadProvider(const KService::Ptr &service);
     KEmoticonsTheme loadTheme(const QString &name);
 
-    QList<KService::Ptr> m_loaded;
+    QList<KService::Ptr> m_oldStylePlugins;
+    QVector<KPluginMetaData> m_plugins;
     QHash<QString, KEmoticonsTheme> m_themes;
     QFileSystemWatcher m_fileWatcher;
     KEmoticons *q;
@@ -64,16 +67,32 @@
 {
 }
 
-bool priorityLessThan(const KService::Ptr &s1, const KService::Ptr &s2)
+static bool priorityLessThan(const KService::Ptr &s1, const KService::Ptr &s2)
 {
     return (s1->property(QStringLiteral("X-KDE-Priority")).toInt() > 
s2->property(QStringLiteral("X-KDE-Priority")).toInt());
 }
 
 void KEmoticonsPrivate::loadServiceList()
 {
-    QString constraint("(exist Library)");
-    m_loaded = KServiceTypeTrader::self()->query(QStringLiteral("KEmoticons"), 
constraint);
-    qSort(m_loaded.begin(), m_loaded.end(), priorityLessThan);
+    const QString constraint(QStringLiteral("(exist Library)"));
+    m_oldStylePlugins = 
KServiceTypeTrader::self()->query(QStringLiteral("KEmoticons"), constraint);
+    qSort(m_oldStylePlugins.begin(), m_oldStylePlugins.end(), 
priorityLessThan);
+
+    m_plugins = 
KPluginLoader::findPlugins(QStringLiteral("kf5/emoticonsthemes"));
+    std::sort(m_plugins.begin(), m_plugins.end(), [](const KPluginMetaData 
&s1, const KPluginMetaData &s2) {
+            return 
s1.rawData().value(QStringLiteral("X-KDE-Priority")).toInt() > 
s2.rawData().value(QStringLiteral("X-KDE-Priority")).toInt();
+    });
+}
+
+KEmoticonsProvider *KEmoticonsPrivate::loadProvider(const KPluginMetaData 
&plugin)
+{
+    KPluginFactory *factory = qobject_cast<KPluginFactory 
*>(plugin.instantiate());
+    if (!factory) {
+        qWarning() << "Invalid plugin factory for" << plugin.fileName();
+        return nullptr;
+    }
+    KEmoticonsProvider *provider = 
factory->create<KEmoticonsProvider>(nullptr);
+    return provider;
 }
 
 KEmoticonsProvider *KEmoticonsPrivate::loadProvider(const KService::Ptr 
&service)
@@ -89,8 +108,8 @@
 
 void KEmoticonsPrivate::changeTheme(const QString &path)
 {
-    QFileInfo info(path);
-    QString name = info.dir().dirName();
+    const QFileInfo info(path);
+    const QString name = info.dir().dirName();
 
     if (m_themes.contains(name)) {
         loadTheme(name);
@@ -99,22 +118,37 @@
 
 KEmoticonsTheme KEmoticonsPrivate::loadTheme(const QString &name)
 {
-    const int numberOfTheme = m_loaded.size();
-    for (int i = 0; i < numberOfTheme; ++i) {
-        const QString fName = 
m_loaded.at(i)->property(QStringLiteral("X-KDE-EmoticonsFileName")).toString();
-        const QString path = 
QStandardPaths::locate(QStandardPaths::GenericDataLocation, "emoticons/" + name 
+ '/' + fName);
+    const auto registerProvider = [this](const QString &name, const QString 
&path, KEmoticonsProvider *provider) {
+        if (m_preferredSize.isValid()) {
+            provider->setPreferredEmoticonSize(m_preferredSize);
+        }
+        KEmoticonsTheme theme(provider);
+        provider->loadTheme(path);
+        m_themes.insert(name, theme);
+        m_fileWatcher.addPath(path);
+        return theme;
+    };
+
+    for (const KPluginMetaData &plugin : qAsConst(m_plugins)) {
+        const QString fName = 
plugin.rawData().value(QStringLiteral("X-KDE-EmoticonsFileName")).toString();
+        const QString path = 
QStandardPaths::locate(QStandardPaths::GenericDataLocation, 
QStringLiteral("emoticons/") + name + QLatin1Char('/') + fName);
 
         if (QFile::exists(path)) {
-            KEmoticonsProvider *provider = loadProvider(m_loaded.at(i));
+            KEmoticonsProvider *provider = loadProvider(plugin);
             if (provider) {
-                if (m_preferredSize.isValid()) {
-                    provider->setPreferredEmoticonSize(m_preferredSize);
-                }
-                KEmoticonsTheme theme(provider);
-                provider->loadTheme(path);
-                m_themes.insert(name, theme);
-                m_fileWatcher.addPath(path);
-                return theme;
+                return registerProvider(name, path, provider);
+            }
+        }
+    }
+    // KF6: remove support for old plugins
+    for (const KService::Ptr &service : qAsConst(m_oldStylePlugins)) {
+        const QString fName = 
service->property(QStringLiteral("X-KDE-EmoticonsFileName")).toString();
+        const QString path = 
QStandardPaths::locate(QStandardPaths::GenericDataLocation, 
QStringLiteral("emoticons/") + name + QLatin1Char('/') + fName);
+
+        if (QFile::exists(path)) {
+            KEmoticonsProvider *provider = loadProvider(service);
+            if (provider) {
+                return registerProvider(name, path, provider);
             }
         }
     }
@@ -153,8 +187,9 @@
 
 QStringList KEmoticons::themeList()
 {
-    QStringList ls;
     const QStringList themeDirs = 
QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, 
QStringLiteral("emoticons"), QStandardPaths::LocateDirectory);
+    QStringList ls;
+    ls.reserve(themeDirs.count());
 
     for (int i = 0; i < themeDirs.count(); ++i) {
         QDir themeQDir(themeDirs[i]);
@@ -206,7 +241,7 @@
     KArchiveDirectory *currentDir = nullptr;
     KArchive *archive = nullptr;
 
-    QString 
localThemesDir(QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation)
 + "/emoticons");
+    QString 
localThemesDir(QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation)
 + QStringLiteral("/emoticons"));
 
     if (localThemesDir.isEmpty()) {
         qCritical() << "Could not find a suitable place in which to install 
the emoticon theme";
@@ -251,9 +286,14 @@
         if (currentEntry->isDirectory()) {
             currentDir = dynamic_cast<KArchiveDirectory *>(currentEntry);
 
-            for (int i = 0; i < d->m_loaded.size(); ++i) {
-                QString fName = 
d->m_loaded.at(i)->property(QStringLiteral("X-KDE-EmoticonsFileName")).toString();
-
+            for (const KPluginMetaData &plugin : qAsConst(d->m_plugins)) {
+                const QString fName = 
plugin.rawData().value(QStringLiteral("X-KDE-EmoticonsFileName")).toString();
+                if (currentDir && currentDir->entry(fName) != nullptr) {
+                    foundThemes.append(currentDir->name());
+                }
+            }
+            for (const KService::Ptr &service : 
qAsConst(d->m_oldStylePlugins)) {
+                const QString fName = 
service->property(QStringLiteral("X-KDE-EmoticonsFileName")).toString();
                 if (currentDir && currentDir->entry(fName) != nullptr) {
                     foundThemes.append(currentDir->name());
                 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kemoticons-5.40.0/src/core/kemoticonsglobal.cpp 
new/kemoticons-5.41.0/src/core/kemoticonsglobal.cpp
--- old/kemoticons-5.40.0/src/core/kemoticonsglobal.cpp 2017-11-04 
22:41:43.000000000 +0100
+++ new/kemoticons-5.41.0/src/core/kemoticonsglobal.cpp 2017-12-02 
11:12:45.000000000 +0100
@@ -35,8 +35,8 @@
     m_parseMode = 
static_cast<KEmoticonsTheme::ParseMode>(config.readEntry("parseMode", 
int(KEmoticonsTheme::RelaxedParse)));
 
     QDBusConnection dbus = QDBusConnection::sessionBus();
-    dbus.connect(QString(), s_dbusPath, s_dbusInterface, s_themeChangedSignal, 
this, SLOT(slotEmoticonsThemeChanged(QString)));
-    dbus.connect(QString(), s_dbusPath, s_dbusInterface, 
s_parseModeChangedSignal, this, SLOT(slotEmoticonsParseModeChanged(int)));
+    dbus.connect(QString(), QString::fromLatin1(s_dbusPath), 
QString::fromLatin1(s_dbusInterface), 
QString::fromLatin1(s_themeChangedSignal), this, 
SLOT(slotEmoticonsThemeChanged(QString)));
+    dbus.connect(QString(), QString::fromLatin1(s_dbusPath), 
QString::fromLatin1(s_dbusInterface), 
QString::fromLatin1(s_parseModeChangedSignal), this, 
SLOT(slotEmoticonsParseModeChanged(int)));
 }
 
 void KEmoticonsGlobal::setThemeName(const QString &name)
@@ -48,7 +48,7 @@
     config.sync();
 
     // Inform running apps
-    QDBusMessage message = QDBusMessage::createSignal(s_dbusPath, 
s_dbusInterface, s_themeChangedSignal);
+    QDBusMessage message = 
QDBusMessage::createSignal(QString::fromLatin1(s_dbusPath), 
QString::fromLatin1(s_dbusInterface), 
QString::fromLatin1(s_themeChangedSignal));
     message << name;
     if (!QDBusConnection::sessionBus().send(message)) {
         qWarning() << "Error sending dbus signal" << s_themeChangedSignal;
@@ -64,7 +64,7 @@
     config.sync();
 
     // Inform running apps
-    QDBusMessage message = QDBusMessage::createSignal(s_dbusPath, 
s_dbusInterface, s_parseModeChangedSignal);
+    QDBusMessage message = 
QDBusMessage::createSignal(QString::fromLatin1(s_dbusPath), 
QString::fromLatin1(s_dbusInterface), 
QString::fromLatin1(s_parseModeChangedSignal));
     message << static_cast<int>(mode);
     if (!QDBusConnection::sessionBus().send(message)) {
         qWarning() << "Error sending dbus signal" << s_parseModeChangedSignal;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kemoticons-5.40.0/src/core/kemoticonsprovider.cpp 
new/kemoticons-5.41.0/src/core/kemoticonsprovider.cpp
--- old/kemoticons-5.40.0/src/core/kemoticonsprovider.cpp       2017-11-04 
22:41:43.000000000 +0100
+++ new/kemoticons-5.41.0/src/core/kemoticonsprovider.cpp       2017-12-02 
11:12:45.000000000 +0100
@@ -152,7 +152,7 @@
         const int preferredHeight = hasPreferredSize ? 
d->m_preferredSize.height() : p.height();
         const int preferredWidth = hasPreferredSize ? 
d->m_preferredSize.width() : p.width();
 
-        e.picHTMLCode = QString("<img align=\"center\" title=\"%1\" alt=\"%1\" 
src=\"%2\" width=\"%3\" height=\"%4\" />").arg(escaped, 
path).arg(preferredWidth).arg(preferredHeight);
+        e.picHTMLCode = QStringLiteral("<img align=\"center\" title=\"%1\" 
alt=\"%1\" src=\"%2\" width=\"%3\" height=\"%4\" />").arg(escaped, 
path).arg(preferredWidth).arg(preferredHeight);
 
         e.matchTextEscaped = escaped;
         e.matchText = s;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kemoticons-5.40.0/src/core/kemoticonstheme.cpp 
new/kemoticons-5.41.0/src/core/kemoticonstheme.cpp
--- old/kemoticons-5.40.0/src/core/kemoticonstheme.cpp  2017-11-04 
22:41:43.000000000 +0100
+++ new/kemoticons-5.41.0/src/core/kemoticonstheme.cpp  2017-12-02 
11:12:45.000000000 +0100
@@ -24,7 +24,7 @@
 
 #include <QDebug>
 
-class KEmoticonsTheme::KEmoticonsThemeData : public QSharedData
+class Q_DECL_HIDDEN KEmoticonsTheme::KEmoticonsThemeData : public QSharedData
 {
 public:
     KEmoticonsThemeData();
@@ -205,7 +205,7 @@
 
     /* previous char, in the firs iteration assume that it is space since we 
want
      * to let emoticons at the beginning, the very first previous QChar must 
be a space. */
-    QChar p = ' ';
+    QChar p = QLatin1Char(' ');
     QChar c; /* current char */
     QChar n;
 
@@ -227,19 +227,19 @@
 
         if (mode & SkipHTML) { // Shall we skip HTML ?
             if (!inHTMLTag) { // Are we already in an HTML tag ?
-                if (c == '<') { // If not check if are going into one
+                if (c == QLatin1Char('<')) { // If not check if are going into 
one
                     inHTMLTag = true; // If we are, change the state to inHTML
                     p = c;
                     continue;
                 }
             } else { // We are already in a HTML tag
-                if (c == '>') { // Check if it ends
+                if (c == QLatin1Char('>')) { // Check if it ends
                     inHTMLTag = false;   // If so, change the state
 
-                    if (p == 'a') {
+                    if (p == QLatin1Char('a')) {
                         inHTMLLink = false;
                     }
-                } else if (c == 'a' && p == '<') { // check if we just entered 
an achor tag
+                } else if (c == QLatin1Char('a') && p == QLatin1Char('<')) { 
// check if we just entered an achor tag
                     inHTMLLink = true; // don't put smileys in urls
                 }
                 p = c;
@@ -247,7 +247,7 @@
             }
 
             if (!inHTMLEntity) { // are we
-                if (c == '&') {
+                if (c == QLatin1Char('&')) {
                     inHTMLEntity = true;
                 }
             }
@@ -258,7 +258,7 @@
             continue;
         }
 
-        if ((mode & StrictParse)  &&  !p.isSpace() && p != '>') {  // '>' may 
mark the end of an html tag
+        if ((mode & StrictParse)  &&  !p.isSpace() && p != QLatin1Char('>')) { 
 // '>' may mark the end of an html tag
             p = c;
             continue;
         } /* strict requires space before the emoticon */
@@ -282,7 +282,7 @@
                         if (message.length() > pos + needle.length()) {
                             n = message[pos + needle.length()];
                             //<br/> marks the end of a line
-                            if (n != '<' && !n.isSpace() &&  !n.isNull() && n 
!= '&') {
+                            if (n != QLatin1Char('<') && !n.isSpace() &&  
!n.isNull() && n != QLatin1Char('&')) {
                                 break;
                             }
                         }
@@ -303,7 +303,7 @@
             if (!found) {
                 if (inHTMLEntity) {
                     // If we are in an HTML entitiy such as &gt;
-                    int htmlEnd = message.indexOf(';', pos);
+                    int htmlEnd = message.indexOf(QLatin1Char(';'), pos);
                     // Search for where it ends
                     if (htmlEnd == -1) {
                         // Apparently this HTML entity isn't ended, something 
is wrong, try skip the '&'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kemoticons-5.40.0/src/providers/adium/CMakeLists.txt 
new/kemoticons-5.41.0/src/providers/adium/CMakeLists.txt
--- old/kemoticons-5.40.0/src/providers/adium/CMakeLists.txt    2017-11-04 
22:41:43.000000000 +0100
+++ new/kemoticons-5.41.0/src/providers/adium/CMakeLists.txt    2017-12-02 
11:12:45.000000000 +0100
@@ -2,7 +2,7 @@
 ########### next target ###############
 set(adiumemoticons_SRCS adium_emoticons.cpp)
 
-add_library(emoticonstheme_adium MODULE ${adiumemoticons_SRCS})
+kcoreaddons_add_plugin(emoticonstheme_adium INSTALL_NAMESPACE 
kf5/emoticonsthemes JSON emoticonstheme_adium.json SOURCES 
${adiumemoticons_SRCS})
 
 find_package(Qt5Xml REQUIRED)
 target_link_libraries(emoticonstheme_adium
@@ -16,11 +16,7 @@
 set_target_properties(emoticonstheme_adium PROPERTIES
     OUTPUT_NAME "adium"
 )
-set_target_properties(emoticonstheme_adium PROPERTIES LIBRARY_OUTPUT_DIRECTORY 
"${CMAKE_BINARY_DIR}/bin/kf5/emoticonsthemes")
-install(
-    TARGETS emoticonstheme_adium
-    DESTINATION ${KDE_INSTALL_PLUGINDIR}/kf5/emoticonsthemes
-)
+# KF6: remove
 install(
     FILES emoticonstheme_adium.desktop
     DESTINATION ${KDE_INSTALL_KSERVICES5DIR}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kemoticons-5.40.0/src/providers/adium/adium_emoticons.cpp 
new/kemoticons-5.41.0/src/providers/adium/adium_emoticons.cpp
--- old/kemoticons-5.40.0/src/providers/adium/adium_emoticons.cpp       
2017-11-04 22:41:43.000000000 +0100
+++ new/kemoticons-5.41.0/src/providers/adium/adium_emoticons.cpp       
2017-12-02 11:12:45.000000000 +0100
@@ -26,7 +26,7 @@
 
 #include <kpluginfactory.h>
 
-K_PLUGIN_FACTORY(AdiumEmoticonsFactory, registerPlugin<AdiumEmoticons>();)
+K_PLUGIN_FACTORY_WITH_JSON(AdiumEmoticonsFactory, "emoticonstheme_adium.json", 
registerPlugin<AdiumEmoticons>();)
 
 AdiumEmoticons::AdiumEmoticons(QObject *parent, const QVariantList &args)
     : KEmoticonsProvider(parent)
@@ -36,7 +36,7 @@
 
 bool AdiumEmoticons::removeEmoticon(const QString &emo)
 {
-    QString emoticon = QFileInfo(emoticonsMap().key(emo.split(' 
'))).fileName();
+    QString emoticon = QFileInfo(emoticonsMap().key(emo.split(QLatin1Char(' 
')))).fileName();
     QDomElement fce = 
m_themeXml.firstChildElement(QStringLiteral("plist")).firstChildElement(QStringLiteral("dict")).firstChildElement(QStringLiteral("dict"));
 
     if (fce.isNull()) {
@@ -53,8 +53,8 @@
             }
 
             fce.removeChild(de);
-            removeMapItem(emoticonsMap().key(emo.split(' ')));
-            removeIndexItem(emoticon, emo.split(' '));
+            removeMapItem(emoticonsMap().key(emo.split(QLatin1Char(' '))));
+            removeIndexItem(emoticon, emo.split(QLatin1Char(' ')));
             return true;
         }
     }
@@ -71,7 +71,7 @@
         }
     }
 
-    const QStringList splitted = text.split(' ');
+    const QStringList splitted = text.split(QLatin1Char(' '));
     QDomElement fce = 
m_themeXml.firstChildElement(QStringLiteral("plist")).firstChildElement(QStringLiteral("dict")).firstChildElement(QStringLiteral("dict"));
 
     if (fce.isNull()) {
@@ -116,7 +116,7 @@
 
 void AdiumEmoticons::saveTheme()
 {
-    QFile fp(themePath() + '/' + fileName());
+    QFile fp(themePath() + QLatin1Char('/') + fileName());
 
     if (!fp.exists()) {
         qWarning() << fp.fileName() << "doesn't exist!";
@@ -174,7 +174,7 @@
         QDomElement de = nl.item(i).toElement();
 
         if (!de.isNull() && de.tagName() == QLatin1String("key")) {
-            name = QStandardPaths::locate(QStandardPaths::GenericDataLocation, 
"emoticons/" + themeName() + '/' + de.text());
+            name = QStandardPaths::locate(QStandardPaths::GenericDataLocation, 
QStringLiteral("emoticons/") + themeName() + QLatin1Char('/') + de.text());
             continue;
         } else if (!de.isNull() && de.tagName() == QLatin1String("dict")) {
             QDomElement arr = de.firstChildElement(QStringLiteral("array"));
@@ -201,10 +201,10 @@
 
 void AdiumEmoticons::newTheme()
 {
-    QString path = 
QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + 
"/emoticons/" + themeName();
+    QString path = 
QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + 
QStringLiteral("/emoticons/") + themeName();
     QDir().mkpath(path);
 
-    QFile fp(path + '/' + "Emoticons.plist");
+    QFile fp(path + QLatin1Char('/') + QStringLiteral("Emoticons.plist"));
 
     if (!fp.open(QIODevice::WriteOnly)) {
         qWarning() << fp.fileName() << "can't open WriteOnly!";
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kemoticons-5.40.0/src/providers/adium/emoticonstheme_adium.json 
new/kemoticons-5.41.0/src/providers/adium/emoticonstheme_adium.json
--- old/kemoticons-5.40.0/src/providers/adium/emoticonstheme_adium.json 
1970-01-01 01:00:00.000000000 +0100
+++ new/kemoticons-5.41.0/src/providers/adium/emoticonstheme_adium.json 
2017-12-02 11:12:45.000000000 +0100
@@ -0,0 +1,8 @@
+{
+    "KPlugin": {
+        "ServiceTypes": [ "KEmoticons" ]
+    },
+    "X-KDE-Priority": 8,
+    "X-KDE-EmoticonsFileName": "Emoticons.plist"
+}
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kemoticons-5.40.0/src/providers/kde/CMakeLists.txt 
new/kemoticons-5.41.0/src/providers/kde/CMakeLists.txt
--- old/kemoticons-5.40.0/src/providers/kde/CMakeLists.txt      2017-11-04 
22:41:43.000000000 +0100
+++ new/kemoticons-5.41.0/src/providers/kde/CMakeLists.txt      2017-12-02 
11:12:45.000000000 +0100
@@ -2,7 +2,7 @@
 ########### next target ###############
 set(kdeemoticons_SRCS kde_emoticons.cpp)
 
-add_library(emoticonstheme_kde MODULE ${kdeemoticons_SRCS})
+kcoreaddons_add_plugin(emoticonstheme_kde INSTALL_NAMESPACE 
kf5/emoticonsthemes JSON emoticonstheme_kde.json SOURCES ${kdeemoticons_SRCS})
 
 find_package(Qt5Xml REQUIRED)
 target_link_libraries(emoticonstheme_kde
@@ -15,12 +15,8 @@
 set_target_properties(emoticonstheme_kde PROPERTIES
     OUTPUT_NAME "kde"
 )
-set_target_properties(emoticonstheme_kde PROPERTIES LIBRARY_OUTPUT_DIRECTORY 
"${CMAKE_BINARY_DIR}/bin/kf5/emoticonsthemes")
 
-install(
-    TARGETS emoticonstheme_kde
-    DESTINATION ${KDE_INSTALL_PLUGINDIR}/kf5/emoticonsthemes
-)
+# KF6: remove
 install(
     FILES emoticonstheme_kde.desktop
     DESTINATION ${KDE_INSTALL_KSERVICES5DIR}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kemoticons-5.40.0/src/providers/kde/emoticonstheme_kde.json 
new/kemoticons-5.41.0/src/providers/kde/emoticonstheme_kde.json
--- old/kemoticons-5.40.0/src/providers/kde/emoticonstheme_kde.json     
1970-01-01 01:00:00.000000000 +0100
+++ new/kemoticons-5.41.0/src/providers/kde/emoticonstheme_kde.json     
2017-12-02 11:12:45.000000000 +0100
@@ -0,0 +1,8 @@
+{
+    "KPlugin": {
+        "ServiceTypes": [ "KEmoticons" ]
+    },
+    "X-KDE-Priority": 10,
+    "X-KDE-EmoticonsFileName": "emoticons.xml"
+}
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kemoticons-5.40.0/src/providers/kde/kde_emoticons.cpp 
new/kemoticons-5.41.0/src/providers/kde/kde_emoticons.cpp
--- old/kemoticons-5.40.0/src/providers/kde/kde_emoticons.cpp   2017-11-04 
22:41:43.000000000 +0100
+++ new/kemoticons-5.41.0/src/providers/kde/kde_emoticons.cpp   2017-12-02 
11:12:45.000000000 +0100
@@ -27,7 +27,7 @@
 
 #include <kpluginfactory.h>
 
-K_PLUGIN_FACTORY(KdeEmoticonsFactory, registerPlugin<KdeEmoticons>();)
+K_PLUGIN_FACTORY_WITH_JSON(KdeEmoticonsFactory, "emoticonstheme_kde.json", 
registerPlugin<KdeEmoticons>();)
 
 KdeEmoticons::KdeEmoticons(QObject *parent, const QVariantList &args)
     : KEmoticonsProvider(parent)
@@ -37,7 +37,7 @@
 
 bool KdeEmoticons::removeEmoticon(const QString &emo)
 {
-    QString emoticon = QFileInfo(emoticonsMap().key(emo.split(' 
'))).fileName();
+    QString emoticon = QFileInfo(emoticonsMap().key(emo.split(QLatin1Char(' 
')))).fileName();
     QDomElement fce = 
m_themeXml.firstChildElement(QStringLiteral("messaging-emoticon-map"));
 
     if (fce.isNull()) {
@@ -49,8 +49,8 @@
         QDomElement de = nl.item(i).toElement();
         if (!de.isNull() && de.tagName() == QLatin1String("emoticon") && 
(de.attribute(QStringLiteral("file")) == emoticon || 
de.attribute(QStringLiteral("file")) == QFileInfo(emoticon).baseName())) {
             fce.removeChild(de);
-            removeMapItem(emoticonsMap().key(emo.split(' ')));
-            removeIndexItem(emoticon, emo.split(' '));
+            removeMapItem(emoticonsMap().key(emo.split(QLatin1Char(' '))));
+            removeIndexItem(emoticon, emo.split(QLatin1Char(' ')));
             return true;
         }
     }
@@ -67,7 +67,7 @@
         }
     }
 
-    const QStringList splitted = text.split(' ');
+    const QStringList splitted = text.split(QLatin1Char(' '));
     QDomElement fce = 
m_themeXml.firstChildElement(QStringLiteral("messaging-emoticon-map"));
 
     if (fce.isNull()) {
@@ -92,7 +92,7 @@
 
 void KdeEmoticons::saveTheme()
 {
-    QFile fp(themePath() + '/' + fileName());
+    QFile fp(themePath() + QLatin1Char('/') + fileName());
 
     if (!fp.exists()) {
         qWarning() << fp.fileName() << "doesn't exist!";
@@ -161,13 +161,15 @@
                 }
             }
 
-            QString emo = 
QStandardPaths::locate(QStandardPaths::GenericDataLocation, "emoticons/" + 
themeName() + '/' + de.attribute(QStringLiteral("file")));
+            QString emo = 
QStandardPaths::locate(QStandardPaths::GenericDataLocation, 
QStringLiteral("emoticons/") + themeName() + QLatin1Char('/') + 
de.attribute(QStringLiteral("file")));
 
             if (emo.isEmpty()) {
                 QList<QByteArray> ext = QImageReader::supportedImageFormats();
 
                 for (int j = 0; j < ext.size(); ++j) {
-                    emo = 
QStandardPaths::locate(QStandardPaths::GenericDataLocation, "emoticons/" + 
themeName() + '/' + de.attribute(QStringLiteral("file")) + '.' + ext.at(j));
+                    emo = 
QStandardPaths::locate(QStandardPaths::GenericDataLocation, 
QStringLiteral("emoticons/") +
+                                                 themeName() + 
QLatin1Char('/') + de.attribute(QStringLiteral("file"))
+                                                 + QLatin1Char('.') + 
QString::fromLatin1(ext.at(j)));
                     if (!emo.isEmpty()) {
                         break;
                     }
@@ -188,10 +190,10 @@
 
 void KdeEmoticons::newTheme()
 {
-    QString path = 
QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + 
"/emoticons/" + themeName();
+    QString path = 
QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + 
QStringLiteral("/emoticons/") + themeName();
     QDir().mkpath(path);
 
-    QFile fp(path + '/' + "emoticons.xml");
+    QFile fp(path + QLatin1Char('/') + QStringLiteral("emoticons.xml"));
 
     if (!fp.open(QIODevice::WriteOnly)) {
         qWarning() << fp.fileName() << "can't open WriteOnly!";
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kemoticons-5.40.0/src/providers/pidgin/CMakeLists.txt 
new/kemoticons-5.41.0/src/providers/pidgin/CMakeLists.txt
--- old/kemoticons-5.40.0/src/providers/pidgin/CMakeLists.txt   2017-11-04 
22:41:43.000000000 +0100
+++ new/kemoticons-5.41.0/src/providers/pidgin/CMakeLists.txt   2017-12-02 
11:12:45.000000000 +0100
@@ -2,7 +2,7 @@
 ########### next target ###############
 set(pidginemoticons_SRCS pidgin_emoticons.cpp)
 
-add_library(emoticonstheme_pidgin MODULE ${pidginemoticons_SRCS})
+kcoreaddons_add_plugin(emoticonstheme_pidgin INSTALL_NAMESPACE 
kf5/emoticonsthemes JSON emoticonstheme_pidgin.json SOURCES 
${pidginemoticons_SRCS})
 
 target_link_libraries(emoticonstheme_pidgin PRIVATE KF5::Emoticons)
 
@@ -11,11 +11,7 @@
 set_target_properties(emoticonstheme_pidgin PROPERTIES
     OUTPUT_NAME "pidgin"
 )
-set_target_properties(emoticonstheme_pidgin PROPERTIES 
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/kf5/emoticonsthemes")
-install(
-    TARGETS emoticonstheme_pidgin
-    DESTINATION ${KDE_INSTALL_PLUGINDIR}/kf5/emoticonsthemes
-)
+# KF6: remove
 install(
     FILES emoticonstheme_pidgin.desktop
     DESTINATION ${KDE_INSTALL_KSERVICES5DIR}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kemoticons-5.40.0/src/providers/pidgin/emoticonstheme_pidgin.json 
new/kemoticons-5.41.0/src/providers/pidgin/emoticonstheme_pidgin.json
--- old/kemoticons-5.40.0/src/providers/pidgin/emoticonstheme_pidgin.json       
1970-01-01 01:00:00.000000000 +0100
+++ new/kemoticons-5.41.0/src/providers/pidgin/emoticonstheme_pidgin.json       
2017-12-02 11:12:45.000000000 +0100
@@ -0,0 +1,8 @@
+{
+    "KPlugin": {
+        "ServiceTypes": [ "KEmoticons" ]
+    },
+    "X-KDE-Priority": 7,
+    "X-KDE-EmoticonsFileName": "theme"
+}
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kemoticons-5.40.0/src/providers/pidgin/pidgin_emoticons.cpp 
new/kemoticons-5.41.0/src/providers/pidgin/pidgin_emoticons.cpp
--- old/kemoticons-5.40.0/src/providers/pidgin/pidgin_emoticons.cpp     
2017-11-04 22:41:43.000000000 +0100
+++ new/kemoticons-5.41.0/src/providers/pidgin/pidgin_emoticons.cpp     
2017-12-02 11:12:45.000000000 +0100
@@ -27,7 +27,7 @@
 
 #include <kpluginfactory.h>
 
-K_PLUGIN_FACTORY(PidginEmoticonsFactory, registerPlugin<PidginEmoticons>();)
+K_PLUGIN_FACTORY_WITH_JSON(PidginEmoticonsFactory, 
"emoticonstheme_pidgin.json", registerPlugin<PidginEmoticons>();)
 
 PidginEmoticons::PidginEmoticons(QObject *parent, const QVariantList &args)
     : KEmoticonsProvider(parent)
@@ -37,17 +37,17 @@
 
 bool PidginEmoticons::removeEmoticon(const QString &emo)
 {
-    QString emoticon = QFileInfo(emoticonsMap().key(emo.split(' 
'))).fileName();
+    QString emoticon = QFileInfo(emoticonsMap().key(emo.split(QLatin1Char(' 
')))).fileName();
 
     bool start = false;
     for (int i = 0; i < m_text.size(); ++i) {
         QString line = m_text.at(i);
 
-        if (line.startsWith('#') || line.isEmpty()) {
+        if (line.startsWith(QLatin1Char('#')) || line.isEmpty()) {
             continue;
         }
 
-        QRegExp re("^\\[(.*)\\]$");
+        QRegExp re(QStringLiteral("^\\[(.*)\\]$"));
         int pos = re.indexIn(line.trimmed());
         if (pos > -1) {
             if (!re.cap(1).compare(QStringLiteral("default"), 
Qt::CaseInsensitive)) {
@@ -62,7 +62,7 @@
             continue;
         }
 
-        QStringList splitted = line.split(' ');
+        QStringList splitted = line.split(QLatin1Char(' '));
         QString emoName;
 
         if (splitted.at(0) == QLatin1String("!")) {
@@ -73,7 +73,7 @@
 
         if (emoName == emoticon) {
             m_text.removeAt(i);
-            removeIndexItem(emoticon, emo.split(' '));
+            removeIndexItem(emoticon, emo.split(QLatin1Char(' ')));
             return true;
         }
     }
@@ -91,14 +91,14 @@
         }
     }
 
-    const QStringList splitted = text.split(' ');
-    int i = m_text.indexOf(QRegExp("^\\[default\\]$", Qt::CaseInsensitive));
+    const QStringList splitted = text.split(QLatin1Char(' '));
+    int i = m_text.indexOf(QRegExp(QStringLiteral("^\\[default\\]$"), 
Qt::CaseInsensitive));
 
     if (i == -1) {
         return false;
     }
 
-    QString emoticon = QString("%1 %2").arg(QFileInfo(emo).fileName(),
+    QString emoticon = QStringLiteral("%1 %2").arg(QFileInfo(emo).fileName(),
                                             text);
     m_text.insert(i + 1, emoticon);
 
@@ -109,7 +109,7 @@
 
 void PidginEmoticons::saveTheme()
 {
-    QFile fp(themePath() + '/' + fileName());
+    QFile fp(themePath() + QLatin1Char('/') + fileName());
 
     if (!fp.exists()) {
         qWarning() << fp.fileName() << "doesn't exist!";
@@ -123,10 +123,10 @@
 
     QTextStream emoStream(&fp);
 
-    if (m_text.indexOf(QRegExp("^Icon=.*", Qt::CaseInsensitive)) == -1) {
-        int i = m_text.indexOf(QRegExp("^Description=.*", 
Qt::CaseInsensitive));
+    if (m_text.indexOf(QRegExp(QStringLiteral("^Icon=.*"), 
Qt::CaseInsensitive)) == -1) {
+        int i = m_text.indexOf(QRegExp(QStringLiteral("^Description=.*"), 
Qt::CaseInsensitive));
         QString file = QFileInfo(emoticonsMap().keys().value(0)).fileName();
-        m_text.insert(i + 1, "Icon=" + file);
+        m_text.insert(i + 1, QStringLiteral("Icon=") + file);
     }
 
     emoStream << m_text.join(QStringLiteral("\n"));
@@ -155,11 +155,11 @@
         QString line = str.readLine();
         m_text << line;
 
-        if (line.startsWith('#') || line.isEmpty()) {
+        if (line.startsWith(QLatin1Char('#')) || line.isEmpty()) {
             continue;
         }
 
-        QRegExp re("^\\[(.*)\\]$");
+        QRegExp re(QStringLiteral("^\\[(.*)\\]$"));
         int pos = re.indexIn(line.trimmed());
         if (pos > -1) {
             if (!re.cap(1).compare(QStringLiteral("default"), 
Qt::CaseInsensitive)) {
@@ -174,7 +174,7 @@
             continue;
         }
 
-        QStringList splitted = line.split(QRegExp("\\s+"));
+        QStringList splitted = line.split(QRegExp(QStringLiteral("\\s+")));
         QString emo;
         int i = 1;
         if (splitted.at(0) == QLatin1String("!")) {
@@ -183,7 +183,7 @@
         } else {
             emo = splitted.at(0);
         }
-        emo = QStandardPaths::locate(QStandardPaths::GenericDataLocation, 
"emoticons/" + themeName() + '/' + emo);
+        emo = QStandardPaths::locate(QStandardPaths::GenericDataLocation, 
QStringLiteral("emoticons/") + themeName() + QLatin1Char('/') + emo);
 
         QStringList sl;
         for (; i < splitted.size(); ++i) {
@@ -203,10 +203,10 @@
 
 void PidginEmoticons::newTheme()
 {
-    QString path = 
QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + 
"/emoticons/" + themeName();
+    QString path = 
QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + 
QStringLiteral("/emoticons/") + themeName();
     QDir().mkpath(path);
 
-    QFile fp(path + '/' + "theme");
+    QFile fp(path + QLatin1Char('/') + QStringLiteral("theme"));
 
     if (!fp.open(QIODevice::WriteOnly)) {
         qWarning() << fp.fileName() << "can't open WriteOnly!";
@@ -216,8 +216,8 @@
     QTextStream out(&fp);
     out.setCodec("UTF-8");
 
-    out << "Name=" + themeName() << endl;
-    out << "Description=" + themeName() << endl;
+    out << QStringLiteral("Name=") + themeName() << endl;
+    out << QStringLiteral("Description=") + themeName() << endl;
     out << "Author=" << endl;
     out << endl;
     out << "[default]" << endl;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kemoticons-5.40.0/src/providers/xmpp/CMakeLists.txt 
new/kemoticons-5.41.0/src/providers/xmpp/CMakeLists.txt
--- old/kemoticons-5.40.0/src/providers/xmpp/CMakeLists.txt     2017-11-04 
22:41:43.000000000 +0100
+++ new/kemoticons-5.41.0/src/providers/xmpp/CMakeLists.txt     2017-12-02 
11:12:45.000000000 +0100
@@ -2,7 +2,7 @@
 ########### next target ###############
 set(xmppemoticons_SRCS xmpp_emoticons.cpp)
 
-add_library(emoticonstheme_xmpp MODULE ${xmppemoticons_SRCS})
+kcoreaddons_add_plugin(emoticonstheme_xmpp INSTALL_NAMESPACE 
kf5/emoticonsthemes JSON emoticonstheme_xmpp.json SOURCES ${xmppemoticons_SRCS})
 
 find_package(Qt5Xml REQUIRED)
 target_link_libraries(emoticonstheme_xmpp
@@ -16,11 +16,8 @@
 set_target_properties(emoticonstheme_xmpp PROPERTIES
     OUTPUT_NAME "xmpp"
 )
-set_target_properties(emoticonstheme_xmpp PROPERTIES LIBRARY_OUTPUT_DIRECTORY 
"${CMAKE_BINARY_DIR}/bin/kf5/emoticonsthemes")
-install(
-    TARGETS emoticonstheme_xmpp
-    DESTINATION ${KDE_INSTALL_PLUGINDIR}/kf5/emoticonsthemes
-)
+
+# KF6: remove
 install(
     FILES emoticonstheme_xmpp.desktop
     DESTINATION ${KDE_INSTALL_KSERVICES5DIR}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kemoticons-5.40.0/src/providers/xmpp/emoticonstheme_xmpp.json 
new/kemoticons-5.41.0/src/providers/xmpp/emoticonstheme_xmpp.json
--- old/kemoticons-5.40.0/src/providers/xmpp/emoticonstheme_xmpp.json   
1970-01-01 01:00:00.000000000 +0100
+++ new/kemoticons-5.41.0/src/providers/xmpp/emoticonstheme_xmpp.json   
2017-12-02 11:12:45.000000000 +0100
@@ -0,0 +1,8 @@
+{
+    "KPlugin": {
+        "ServiceTypes": [ "KEmoticons" ]
+    },
+    "X-KDE-Priority": 9,
+    "X-KDE-EmoticonsFileName": "icondef.xml"
+}
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kemoticons-5.40.0/src/providers/xmpp/xmpp_emoticons.cpp 
new/kemoticons-5.41.0/src/providers/xmpp/xmpp_emoticons.cpp
--- old/kemoticons-5.40.0/src/providers/xmpp/xmpp_emoticons.cpp 2017-11-04 
22:41:43.000000000 +0100
+++ new/kemoticons-5.41.0/src/providers/xmpp/xmpp_emoticons.cpp 2017-12-02 
11:12:45.000000000 +0100
@@ -28,7 +28,7 @@
 
 #include <kpluginfactory.h>
 
-K_PLUGIN_FACTORY(XmppEmoticonsFactory, registerPlugin<XmppEmoticons>();)
+K_PLUGIN_FACTORY_WITH_JSON(XmppEmoticonsFactory, "emoticonstheme_xmpp.json", 
registerPlugin<XmppEmoticons>();)
 
 XmppEmoticons::XmppEmoticons(QObject *parent, const QVariantList &args)
     : KEmoticonsProvider(parent)
@@ -38,7 +38,7 @@
 
 bool XmppEmoticons::removeEmoticon(const QString &emo)
 {
-    QString emoticon = QFileInfo(emoticonsMap().key(emo.split(' 
'))).fileName();
+    QString emoticon = QFileInfo(emoticonsMap().key(emo.split(QLatin1Char(' 
')))).fileName();
     QDomElement fce = m_themeXml.firstChildElement(QStringLiteral("icondef"));
 
     if (fce.isNull()) {
@@ -58,8 +58,8 @@
 
                 if (!sde.isNull() && sde.tagName() == QLatin1String("object") 
&& sde.text() == emoticon) {
                     fce.removeChild(de);
-                    removeMapItem(emoticonsMap().key(emo.split(' ')));
-                    removeIndexItem(emoticon, emo.split(' '));
+                    removeMapItem(emoticonsMap().key(emo.split(QLatin1Char(' 
'))));
+                    removeIndexItem(emoticon, emo.split(QLatin1Char(' ')));
                     return true;
                 }
             }
@@ -78,7 +78,7 @@
         }
     }
 
-    const QStringList splitted = text.split(' ');
+    const QStringList splitted = text.split(QLatin1Char(' '));
     QDomElement fce = m_themeXml.firstChildElement(QStringLiteral("icondef"));
 
     if (fce.isNull()) {
@@ -112,7 +112,7 @@
 
 void XmppEmoticons::saveTheme()
 {
-    QFile fp(themePath() + '/' + fileName());
+    QFile fp(themePath() + QLatin1Char('/') + fileName());
 
     if (!fp.exists()) {
         qWarning() << fp.fileName() << "doesn't exist!";
@@ -186,7 +186,7 @@
                 }
             }
 
-            emo = QStandardPaths::locate(QStandardPaths::GenericDataLocation, 
"emoticons/" + themeName() + '/' + emo);
+            emo = QStandardPaths::locate(QStandardPaths::GenericDataLocation, 
QStringLiteral("emoticons/") + themeName() + QLatin1Char('/') + emo);
 
             if (emo.isEmpty()) {
                 continue;
@@ -202,10 +202,10 @@
 
 void XmppEmoticons::newTheme()
 {
-    QString path = 
QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + 
"/emoticons/" + themeName();
+    QString path = 
QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + 
QStringLiteral("/emoticons/") + themeName();
     QDir().mkpath(path);
 
-    QFile fp(path + '/' + "icondef.xml");
+    QFile fp(path + QLatin1Char('/') + QStringLiteral("icondef.xml"));
 
     if (!fp.open(QIODevice::WriteOnly)) {
         qWarning() << fp.fileName() << "can't open WriteOnly!";
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kemoticons-5.40.0/tests/main.cpp 
new/kemoticons-5.41.0/tests/main.cpp
--- old/kemoticons-5.40.0/tests/main.cpp        2017-11-04 22:41:43.000000000 
+0100
+++ new/kemoticons-5.41.0/tests/main.cpp        2017-12-02 11:12:45.000000000 
+0100
@@ -50,9 +50,9 @@
     lineEdit = new QLineEdit;
     label = new QLabel;
     QLabel *explanation = new QLabel;
-    explanation->setText("Please enter text with emoticons. They will be 
parsed, "
+    explanation->setText(QStringLiteral("Please enter text with emoticons. 
They will be parsed, "
                          "except <b>:-)</b> and <b>:)</b> which are excluded. "
-                         "Emoticon theme can be chosen from the combo box.");
+                         "Emoticon theme can be chosen from the combo box."));
     explanation->setWordWrap(true);
     comboBox = new QComboBox;
 


Reply via email to