Hello community, here is the log from the commit of package kemoticons for openSUSE:Factory checked in at 2014-12-21 11:58:38 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kemoticons (Old) and /work/SRC/openSUSE:Factory/.kemoticons.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kemoticons" Changes: -------- --- /work/SRC/openSUSE:Factory/kemoticons/kemoticons.changes 2014-11-11 01:09:37.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.kemoticons.new/kemoticons.changes 2014-12-21 11:58:20.000000000 +0100 @@ -1,0 +2,8 @@ +Sat Dec 6 12:53:42 UTC 2014 - [email protected] + +- Update to 5.5.0 + * Add KEmoticonsIntegrationPlugin for KTextToHTML from KCoreAddons + * For more details please see: + https://www.kde.org/announcements/kde-frameworks-5.5.0.php + +------------------------------------------------------------------- Old: ---- kemoticons-5.4.0.tar.xz New: ---- kemoticons-5.5.0.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kemoticons.spec ++++++ --- /var/tmp/diff_new_pack.omLM5x/_old 2014-12-21 11:58:23.000000000 +0100 +++ /var/tmp/diff_new_pack.omLM5x/_new 2014-12-21 11:58:23.000000000 +0100 @@ -18,11 +18,11 @@ %define lname libKF5Emoticons5 Name: kemoticons -Version: 5.4.0 +Version: 5.5.0 Release: 0 %define kf5_version %{version} BuildRequires: cmake >= 2.8.12 -BuildRequires: extra-cmake-modules >= 1.4.0 +BuildRequires: extra-cmake-modules >= 1.5.0 BuildRequires: fdupes BuildRequires: karchive-devel >= %{kf5_version} BuildRequires: kconfig-devel >= %{kf5_version} @@ -35,7 +35,7 @@ License: LGPL-2.1+ Group: System/GUI/KDE Url: http://www.kde.org -Source: http://download.kde.org/stable/frameworks/5.4/%{name}-%{version}.tar.xz +Source: http://download.kde.org/stable/frameworks/5.5/%{name}-%{version}.tar.xz Source1: baselibs.conf BuildRoot: %{_tmppath}/%{name}-%{version}-build ++++++ kemoticons-5.4.0.tar.xz -> kemoticons-5.5.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kemoticons-5.4.0/CMakeLists.txt new/kemoticons-5.5.0/CMakeLists.txt --- old/kemoticons-5.4.0/CMakeLists.txt 2014-10-31 21:17:03.000000000 +0100 +++ new/kemoticons-5.5.0/CMakeLists.txt 2014-12-04 11:14:03.000000000 +0100 @@ -2,7 +2,7 @@ project(KEmoticons) -find_package(ECM 1.4.0 REQUIRED NO_MODULE) +find_package(ECM 1.5.0 REQUIRED NO_MODULE) set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/cmake) @@ -19,8 +19,8 @@ include(ECMGenerateHeaders) include(ECMPackageConfigHelpers) -set(KF5_VERSION "5.4.0") # handled by release scripts -set(KF5_DEP_VERSION "5.4.0") # handled by release scripts +set(KF5_VERSION "5.5.0") # handled by release scripts +set(KF5_DEP_VERSION "5.5.0") # handled by release scripts ecm_setup_version(${KF5_VERSION} VARIABLE_PREFIX KEMOTICONS VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/kemoticons_version.h" @@ -30,6 +30,7 @@ find_package(KF5Archive ${KF5_DEP_VERSION} REQUIRED) find_package(KF5Config ${KF5_DEP_VERSION} REQUIRED) find_package(KF5Service ${KF5_DEP_VERSION} REQUIRED) +find_package(KF5CoreAddons ${KF5_DEP_VERSION} REQUIRED) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/kemoticons_version.h DESTINATION ${KF5_INCLUDE_INSTALL_DIR} COMPONENT Devel ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kemoticons-5.4.0/autotests/CMakeLists.txt new/kemoticons-5.5.0/autotests/CMakeLists.txt --- old/kemoticons-5.4.0/autotests/CMakeLists.txt 2014-10-31 21:17:03.000000000 +0100 +++ new/kemoticons-5.5.0/autotests/CMakeLists.txt 2014-12-04 11:14:03.000000000 +0100 @@ -1,13 +1,13 @@ include(ECMAddTests) find_package(Qt5Test REQUIRED) -macro(kemoticons_unit_tests) - foreach(_testname ${ARGN}) - ecm_add_test(${_testname}.cpp TEST_NAME kemoticons-${_testname} LINK_LIBRARIES Qt5::Test KF5::Emoticons) - endforeach() +macro(kemoticons_unit_test) + set(_testname ${ARGV0}) + ecm_add_test(${_testname}.cpp ${ARGV1} TEST_NAME kemoticons-${_testname} LINK_LIBRARIES Qt5::Test KF5::Emoticons) endmacro() -kemoticons_unit_tests(kemoticontest) +kemoticons_unit_test(kemoticontest) +kemoticons_unit_test(ktexttohtmlplugintest ../src/integrationplugin/ktexttohtml.cpp) target_compile_definitions(kemoticons-kemoticontest PRIVATE LOCAL_THEMES_DIR="${KEmoticons_SOURCE_DIR}/themes") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kemoticons-5.4.0/autotests/ktexttohtmlplugintest.cpp new/kemoticons-5.5.0/autotests/ktexttohtmlplugintest.cpp --- old/kemoticons-5.4.0/autotests/ktexttohtmlplugintest.cpp 1970-01-01 01:00:00.000000000 +0100 +++ new/kemoticons-5.5.0/autotests/ktexttohtmlplugintest.cpp 2014-12-04 11:14:03.000000000 +0100 @@ -0,0 +1,118 @@ +/* + * Copyright (C) 2014 Daniel Vrátil <[email protected]> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#include <QObject> +#include <QTest> +#include <QStandardPaths> + +#include "../src/integrationplugin/ktexttohtml.h" +#include <kemoticons.h> + +class KTextToHTMLPluginTest : public QObject +{ + Q_OBJECT + +private: + QString htmlForSmiley(const QString &emoticon, const QString &name) const; + +private Q_SLOTS: + void initTestCase(); + void parseEmoticonsTest_data(); + void parseEmoticonsTest(); + +private: + QString mEmoticonsThemePath; +}; + +QTEST_MAIN(KTextToHTMLPluginTest) + +void KTextToHTMLPluginTest::initTestCase() +{ + mEmoticonsThemePath = QStandardPaths::locate(QStandardPaths::GenericDataLocation, "emoticons/Glass", QStandardPaths::LocateDirectory); + QVERIFY(!mEmoticonsThemePath.isEmpty()); +} + +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\" />") + .arg(emoticon) + .arg(mEmoticonsThemePath) + .arg(name); +} + + +void KTextToHTMLPluginTest::parseEmoticonsTest_data() +{ + + QTest::addColumn<QString>("input"); + QTest::addColumn<bool>("strict"); + QTest::addColumn<QStringList>("exclude"); + QTest::addColumn<QString>("expected"); + + QTest::newRow("simple") + << "Hello :-)" + << false << QStringList() + << QString("Hello %1").arg(htmlForSmiley(":-)", "smile")); + + QTest::newRow("between strings") + << "Hello :-) How are you?" + << false << QStringList() + << QString("Hello %1 How are you?").arg(htmlForSmiley(":-)", "smile")); + + QTest::newRow("excluded") + << "Bye :-(" + << false << (QStringList() << ":-(") + << "Bye :-("; + + QTest::newRow("don't mix in HTML") + << "<b>:(</b>" + << false << QStringList() + << QString("<b>%1</b>").arg(htmlForSmiley(":(", "sad")); + + QTest::newRow("strict parsing of smileys without space") + << "Very happy! :-):-)" + << true << QStringList() + << "Very happy! :-):-)"; + + QTest::newRow("nonstrict parsing of smileys without space") + << "Very happy! :-):-)" + << false << QStringList() + << QString("Very happy! %1%1").arg(htmlForSmiley(":-)", "smile")); + + QTest::newRow("smiley in HTML") + << "<img src=\"...\" title=\":-)\" />" + << false << QStringList() + << "<img src=\"...\" title=\":-)\" />"; +} + + +void KTextToHTMLPluginTest::parseEmoticonsTest() +{ + QFETCH(QString, input); + QFETCH(bool, strict); + QFETCH(QStringList, exclude); + QFETCH(QString, expected); + + KTextToHTMLEmoticons emoticons; + const QString actual = emoticons.parseEmoticons(input, strict, exclude); + + QCOMPARE(actual, expected); +} + +#include "ktexttohtmlplugintest.moc" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kemoticons-5.4.0/src/CMakeLists.txt new/kemoticons-5.5.0/src/CMakeLists.txt --- old/kemoticons-5.4.0/src/CMakeLists.txt 2014-10-31 21:17:03.000000000 +0100 +++ new/kemoticons-5.5.0/src/CMakeLists.txt 2014-12-04 11:14:03.000000000 +0100 @@ -1,3 +1,4 @@ add_subdirectory(core) add_subdirectory(providers) +add_subdirectory(integrationplugin) \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kemoticons-5.4.0/src/integrationplugin/CMakeLists.txt new/kemoticons-5.5.0/src/integrationplugin/CMakeLists.txt --- old/kemoticons-5.4.0/src/integrationplugin/CMakeLists.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/kemoticons-5.5.0/src/integrationplugin/CMakeLists.txt 2014-12-04 11:14:03.000000000 +0100 @@ -0,0 +1,15 @@ +set(KEmoticonsIntegrationPlugin_SRCS + kemoticonsintegrationplugin.cpp + ktexttohtml.cpp +) + +add_library(KEmoticonsIntegrationPlugin MODULE ${KEmoticonsIntegrationPlugin_SRCS}) + +target_link_libraries(KEmoticonsIntegrationPlugin + PRIVATE + KF5::CoreAddons + KF5::Emoticons +) + +install(TARGETS KEmoticonsIntegrationPlugin + DESTINATION ${PLUGIN_INSTALL_DIR}/kf5) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kemoticons-5.4.0/src/integrationplugin/kemoticonsintegrationplugin.cpp new/kemoticons-5.5.0/src/integrationplugin/kemoticonsintegrationplugin.cpp --- old/kemoticons-5.4.0/src/integrationplugin/kemoticonsintegrationplugin.cpp 1970-01-01 01:00:00.000000000 +0100 +++ new/kemoticons-5.5.0/src/integrationplugin/kemoticonsintegrationplugin.cpp 2014-12-04 11:14:03.000000000 +0100 @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2014 Daniel Vrátil <[email protected]> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#include "kemoticonsintegrationplugin.h" + +#include <QVariant> + +KEmoticonsIntegrationPlugin::KEmoticonsIntegrationPlugin() + : QObject() +{ + setProperty(KTEXTTOHTMLEMOTICONS_PROPERTY, QVariant::fromValue<KTextToHTMLEmoticonsInterface *>(&mTextToHTMLEmoticons)); +} + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kemoticons-5.4.0/src/integrationplugin/kemoticonsintegrationplugin.h new/kemoticons-5.5.0/src/integrationplugin/kemoticonsintegrationplugin.h --- old/kemoticons-5.4.0/src/integrationplugin/kemoticonsintegrationplugin.h 1970-01-01 01:00:00.000000000 +0100 +++ new/kemoticons-5.5.0/src/integrationplugin/kemoticonsintegrationplugin.h 2014-12-04 11:14:03.000000000 +0100 @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2014 Daniel Vrátil <[email protected]> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#ifndef KEMOTICONSINTEGRATIONPLUGIN_H +#define KEMOTICONSINTEGRATIONPLUGIN_H + +#include <QObject> + +#include "ktexttohtml.h" + +class KEmoticonsIntegrationPlugin : public QObject +{ + Q_PLUGIN_METADATA(IID "org.kde.KEmoticonsIntegrationPlugin") + Q_OBJECT + +public: + KEmoticonsIntegrationPlugin(); + +private: + KTextToHTMLEmoticons mTextToHTMLEmoticons; +}; + +#endif // KEMOTICONSINTEGRATIONPLUGIN_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kemoticons-5.4.0/src/integrationplugin/ktexttohtml.cpp new/kemoticons-5.5.0/src/integrationplugin/ktexttohtml.cpp --- old/kemoticons-5.4.0/src/integrationplugin/ktexttohtml.cpp 1970-01-01 01:00:00.000000000 +0100 +++ new/kemoticons-5.5.0/src/integrationplugin/ktexttohtml.cpp 2014-12-04 11:14:03.000000000 +0100 @@ -0,0 +1,40 @@ +/* This file is part of the KDE libraries + * Copyright 2014 Daniel Vrátil <[email protected]> + * + * This library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2 of the License or ( at + * your option ) version 3 or, at the discretion of KDE e.V. ( which shall + * act as a proxy as in section 14 of the GPLv3 ), any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#include "ktexttohtml.h" + +#include <kemoticons.h> +#include <kemoticonstheme.h> + +KTextToHTMLEmoticons::KTextToHTMLEmoticons() +{ +} + +QString KTextToHTMLEmoticons::parseEmoticons(const QString &text, + bool strictParse, + const QStringList &exclude) +{ + KEmoticonsTheme theme = KEmoticons().theme(); + KEmoticonsTheme::ParseMode mode = KEmoticonsTheme::DefaultParse; + if (strictParse) { + mode = KEmoticonsTheme::StrictParse; + } + return theme.parseEmoticons(text, mode, exclude); +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kemoticons-5.4.0/src/integrationplugin/ktexttohtml.h new/kemoticons-5.5.0/src/integrationplugin/ktexttohtml.h --- old/kemoticons-5.4.0/src/integrationplugin/ktexttohtml.h 1970-01-01 01:00:00.000000000 +0100 +++ new/kemoticons-5.5.0/src/integrationplugin/ktexttohtml.h 2014-12-04 11:14:03.000000000 +0100 @@ -0,0 +1,38 @@ +/* This file is part of the KDE libraries + * Copyright 2014 Daniel Vrátil <[email protected]> + * + * This library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2 of the License or ( at + * your option ) version 3 or, at the discretion of KDE e.V. ( which shall + * act as a proxy as in section 14 of the GPLv3 ), any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ +#ifndef KTEXTTOHTML_INTEGRATION_H +#define KTEXTTOHTML_INTEGRATION_H + +#include <QObject> + +#include <ktexttohtmlemoticonsinterface.h> + +class KTextToHTMLEmoticons : public KTextToHTMLEmoticonsInterface +{ +public: + KTextToHTMLEmoticons(); + ~KTextToHTMLEmoticons() {} + + virtual QString parseEmoticons(const QString &text, + bool strictParse = false, + const QStringList &exclude = QStringList()) Q_DECL_OVERRIDE; +}; + +#endif -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
