diffstat for kdeclarative-5.16.0 kdeclarative-5.18.0 CMakeLists.txt | 6 debian/changelog | 94 +++ debian/control | 32 - debian/libkf5calendarevents5.install | 1 debian/libkf5declarative-dev.install | 1 debian/libkf5quickaddons5.symbols | 3 debian/tests/control | 3 po/ast/kdeclarative5.po | 4 po/lt/kdeclarative5.po | 9 po/nb/kdeclarative5.po | 2 po/se/kdeclarative5.po | 2 src/CMakeLists.txt | 3 src/calendarevents/CMakeLists.txt | 33 + src/calendarevents/CalendarEventsConfig.cmake.in | 5 src/calendarevents/calendareventsplugin.cpp | 35 + src/calendarevents/calendareventsplugin.h | 233 +++++++++ src/calendarevents/eventdata_p.cpp | 170 +++++++ src/kdeclarative/CMakeLists.txt | 1 src/kdeclarative/kdeclarative.cpp | 16 src/kdeclarative/private/kdeclarative_p.h | 5 src/kdeclarative/private/rootcontext.cpp | 430 ------------------ src/kdeclarative/private/rootcontext_p.h | 61 -- src/kdeclarative/qmlobjectsharedengine.cpp | 3 src/qmlcontrols/draganddrop/DeclarativeDragArea.cpp | 14 src/qmlcontrols/draganddrop/DeclarativeDragArea.h | 11 src/qmlcontrols/kquickcontrolsaddons/mimedatabase.cpp | 1 tests/helloworld/metadata.desktop | 2 tests/helloworldnowindow/metadata.desktop | 2 28 files changed, 650 insertions(+), 532 deletions(-) diff -Nru kdeclarative-5.16.0/CMakeLists.txt kdeclarative-5.18.0/CMakeLists.txt --- kdeclarative-5.16.0/CMakeLists.txt 2015-11-08 12:15:14.000000000 +0000 +++ kdeclarative-5.18.0/CMakeLists.txt 2016-01-02 16:29:11.000000000 +0000 @@ -4,15 +4,15 @@ # Dependencies include(FeatureSummary) -find_package(ECM 5.16.0 NO_MODULE) +find_package(ECM 5.18.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) set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR}) set(REQUIRED_QT_VERSION "5.3.0") -set(KF5_VERSION "5.16.0") # handled by release scripts -set(KF5_DEP_VERSION "5.16.0") # handled by release scripts +set(KF5_VERSION "5.18.0") # handled by release scripts +set(KF5_DEP_VERSION "5.18.0") # handled by release scripts find_package(Qt5 ${REQUIRED_QT_VERSION} NO_MODULE REQUIRED Qml Quick Gui) include(KDEInstallDirs) diff -Nru kdeclarative-5.16.0/debian/changelog kdeclarative-5.18.0/debian/changelog --- kdeclarative-5.16.0/debian/changelog 2015-11-30 11:12:48.000000000 +0000 +++ kdeclarative-5.18.0/debian/changelog 2016-03-07 22:19:35.000000000 +0000 @@ -1,3 +1,14 @@ +kdeclarative (5.18.0-0ubuntu1) xenial; urgency=medium + + [ Scarlett Clark ] + * New upstream release Xenial + + [ Philip Muškovac ] + * New upstream release + * Add a new symbol to libkf5quickaddons5.symbols + + -- Philip Muškovac Mon, 07 Mar 2016 23:19:35 +0100 + kdeclarative (5.16.0-1) unstable; urgency=medium * New upstream release (5.16.0). @@ -12,6 +23,32 @@ -- Maximiliano Curia Fri, 09 Oct 2015 19:16:04 +0200 +kdeclarative (5.15.0-0ubuntu3) UNRELEASED; urgency=medium + + [ Clive Johnston ] + * New upstream release + + [ Jonathan Riddell ] + * Add libkf5calendarevents5 + + -- Jonathan Riddell Fri, 20 Nov 2015 15:43:36 +0000 + +kdeclarative (5.15.0-0ubuntu2) xenial; urgency=medium + + * Fix autopackagetests by adding allow-stderr to the requirements. + + -- Philip Muškovac Tue, 03 Nov 2015 15:34:35 +0100 + +kdeclarative (5.15.0-0ubuntu1) wily; urgency=medium + + [ Scarlett Clark ] + * Vivid backport + + [ Jonathan Riddell ] + * new upstream release + + -- Jonathan Riddell Wed, 07 Oct 2015 13:45:49 +0100 + kdeclarative (5.14.0-1) unstable; urgency=medium * New upstream release (5.14.0). @@ -19,6 +56,12 @@ -- Maximiliano Curia Tue, 15 Sep 2015 13:48:17 +0200 +kdeclarative (5.14.0-0ubuntu1) wily; urgency=medium + + * new upstream release + + -- Clive Johnston Thu, 17 Sep 2015 13:12:28 +0100 + kdeclarative (5.13.0-1) unstable; urgency=medium * New upstream release (5.13.0). @@ -26,6 +69,30 @@ -- Maximiliano Curia Tue, 01 Sep 2015 00:17:24 +0200 +kdeclarative (5.13.0-0ubuntu4) wily; urgency=medium + + * Add qml-module-qtquick2 to test-deps as one of our tests requires QtQuick. + + -- Iain Lane Thu, 13 Aug 2015 17:19:04 +0100 + +kdeclarative (5.13.0-0ubuntu3) wily; urgency=medium + + * Oh noes, I typoed "c++11", sorry. + + -- Iain Lane Thu, 13 Aug 2015 14:58:05 +0100 + +kdeclarative (5.13.0-0ubuntu2) wily; urgency=medium + + * acc test: Pass -std=c++11 to avoid failure relating to std::unique_ptr. + + -- Iain Lane Thu, 13 Aug 2015 13:10:06 +0100 + +kdeclarative (5.13.0-0ubuntu1) wily; urgency=medium + + * new upstream release + + -- Jonathan Riddell Mon, 10 Aug 2015 12:55:27 +0200 + kdeclarative (5.12.0-2) unstable; urgency=medium * Team upload. @@ -41,6 +108,23 @@ -- Maximiliano Curia Thu, 09 Jul 2015 12:43:09 +0200 +kdeclarative (5.12.0-0ubuntu1) wily; urgency=medium + + [ Scarlett Clark ] + * New upstream release + * Fix merge, remove unused broken backport. + + [ José Manuel Santamaría Lema ] + * Update symbols file: + - Mark as optional the symbols gone after building with GCC 5 + - Add new symbols, mark as optional those sho doesn't show up + after rebuilding with GCC 4 + + [ Scarlett Clark ] + * Vivid backport + + -- Scarlett Clark Mon, 03 Aug 2015 14:27:13 +0200 + kdeclarative (5.11.0-1) unstable; urgency=medium * New upstream release (5.10.0). @@ -49,6 +133,16 @@ -- Maximiliano Curia Mon, 29 Jun 2015 10:13:38 +0200 +kdeclarative (5.10.0-0ubuntu1) wily; urgency=medium + + [ Maximiliano Curia ] + * New upstream release (5.10.0). + + [ Jonathan Riddell ] + * New upstream release + + -- Jonathan Riddell Wed, 03 Jun 2015 21:02:52 +0200 + kdeclarative (5.9.0-1) experimental; urgency=medium * New upstream release (5.9.0). diff -Nru kdeclarative-5.16.0/debian/control kdeclarative-5.18.0/debian/control --- kdeclarative-5.16.0/debian/control 2015-11-30 11:12:48.000000000 +0000 +++ kdeclarative-5.18.0/debian/control 2016-03-07 22:19:35.000000000 +0000 @@ -5,18 +5,18 @@ Uploaders: Maximiliano Curia Build-Depends: cmake (>= 2.8.12), debhelper (>= 9), - extra-cmake-modules (>= 5.16.0~), - kio-dev (>= 5.16.0~), + extra-cmake-modules (>= 5.18.0~), + kio-dev (>= 5.18.0~), libepoxy-dev, - libkf5config-dev (>= 5.16.0~), - libkf5globalaccel-dev (>= 5.16.0~), - libkf5guiaddons-dev (>= 5.16.0~), - libkf5i18n-dev (>= 5.16.0~), - libkf5iconthemes-dev (>= 5.16.0~), - libkf5itemviews-dev (>= 5.7.0), - libkf5package-dev (>= 5.16.0~), - libkf5widgetsaddons-dev (>= 5.16.0~), - libkf5windowsystem-dev (>= 5.16.0~), + libkf5config-dev (>= 5.18.0~), + libkf5globalaccel-dev (>= 5.18.0~), + libkf5guiaddons-dev (>= 5.18.0~), + libkf5i18n-dev (>= 5.18.0~), + libkf5iconthemes-dev (>= 5.18.0~), + libkf5itemviews-dev (>= 5.18.0~), + libkf5package-dev (>= 5.18.0~), + libkf5widgetsaddons-dev (>= 5.18.0~), + libkf5windowsystem-dev (>= 5.18.0~), pkg-config, pkg-kde-tools (>= 0.15.15ubuntu1~), qtbase5-dev (>= 5.4), @@ -37,6 +37,7 @@ Section: libdevel Architecture: any Depends: kio-dev (>= 5.16.0~), + libkf5calendarevents5 (= ${binary:Version}), libkf5declarative5 (= ${binary:Version}), libkf5package-dev (>= 5.16.0~), libkf5quickaddons5 (= ${binary:Version}), @@ -124,6 +125,7 @@ Multi-arch: same Depends: libkf5declarative5 (>= ${source:Version}), qml-module-qtquick-controls, + qml-module-qtquick-dialogs, qml-module-qtquick-layouts, qml-module-qtquick2, ${misc:Depends}, @@ -186,3 +188,11 @@ Multi-Arch: same Description: provides integration of QML and KDE frameworks Framework providing optimized image texture caching. + +Package: libkf5calendarevents5 +Architecture: any +Depends: ${misc:Depends}, ${shlibs:Depends} +Multi-Arch: same +Description: provides integration of QML and KDE frameworks + Framework providing integration of QML and other KDE frameworks such + as making i18n available and using kio. diff -Nru kdeclarative-5.16.0/debian/libkf5calendarevents5.install kdeclarative-5.18.0/debian/libkf5calendarevents5.install --- kdeclarative-5.16.0/debian/libkf5calendarevents5.install 1970-01-01 00:00:00.000000000 +0000 +++ kdeclarative-5.18.0/debian/libkf5calendarevents5.install 2016-03-07 22:19:35.000000000 +0000 @@ -0,0 +1 @@ +usr/lib/*/libKF5CalendarEvents.so.5* diff -Nru kdeclarative-5.16.0/debian/libkf5declarative-dev.install kdeclarative-5.18.0/debian/libkf5declarative-dev.install --- kdeclarative-5.16.0/debian/libkf5declarative-dev.install 2015-11-30 11:12:48.000000000 +0000 +++ kdeclarative-5.18.0/debian/libkf5declarative-dev.install 2016-03-07 22:19:35.000000000 +0000 @@ -1,6 +1,7 @@ usr/include/KF5/KDeclarative/ usr/include/KF5/kdeclarative_version.h usr/lib/*/cmake/KF5Declarative/ +usr/lib/*/libKF5CalendarEvents.so usr/lib/*/libKF5Declarative.so usr/lib/*/libKF5QuickAddons.so usr/lib/*/qt5/mkspecs/modules/qt_KDeclarative.pri diff -Nru kdeclarative-5.16.0/debian/libkf5quickaddons5.symbols kdeclarative-5.18.0/debian/libkf5quickaddons5.symbols --- kdeclarative-5.16.0/debian/libkf5quickaddons5.symbols 2015-11-30 11:12:48.000000000 +0000 +++ kdeclarative-5.18.0/debian/libkf5quickaddons5.symbols 2016-03-07 22:19:35.000000000 +0000 @@ -1,4 +1,4 @@ -# SymbolsHelper-Confirmed: 5.14.0 amd64 arm64 armel armhf hppa i386 kfreebsd-amd64 kfreebsd-i386 mips mips64el mipsel powerpc ppc64 ppc64el s390x x32 +# SymbolsHelper-Confirmed: 5.18.0 amd64 i386 libKF5QuickAddons.so.5 libkf5quickaddons5 #MINVER# _ZN12KQuickAddons12ConfigModule10setButtonsE6QFlagsINS0_6ButtonEE@Base 5.8.0+git20150324.0130+15.04 _ZN12KQuickAddons12ConfigModule11qt_metacallEN11QMetaObject4CallEiPPv@Base 5.8.0+git20150324.0130+15.04 @@ -84,4 +84,5 @@ _ZTV18ManagedTextureNode@Base 5.3.0+git20141016.0334 _ZTVN12KQuickAddons12ConfigModuleE@Base 5.8.0+git20150324.0130+15.04 _ZTVN12KQuickAddons21QuickViewSharedEngineE@Base 5.12.0 + _ZZZN10KAboutDataC4ERK7QStringS2_S2_S2_N13KAboutLicense10LicenseKeyES2_S2_S2_S2_Ed_NKUlvE_clEvE15qstring_literal@Base 5.18.0 (c++)"non-virtual thunk to KQuickAddons::QuickViewSharedEngine::~QuickViewSharedEngine()@Base" 5.12.0 diff -Nru kdeclarative-5.16.0/debian/tests/control kdeclarative-5.18.0/debian/tests/control --- kdeclarative-5.16.0/debian/tests/control 2015-11-30 11:12:48.000000000 +0000 +++ kdeclarative-5.18.0/debian/tests/control 2016-03-07 22:19:35.000000000 +0000 @@ -1,6 +1,7 @@ Tests: testsuite Depends: @, @builddeps@, build-essential, - xvfb, xauth, dbus-x11, openbox + xvfb, xauth, dbus-x11, openbox, + qml-module-qtquick2 Restrictions: build-needed Tests: acc diff -Nru kdeclarative-5.16.0/po/ast/kdeclarative5.po kdeclarative-5.18.0/po/ast/kdeclarative5.po --- kdeclarative-5.16.0/po/ast/kdeclarative5.po 2015-11-08 12:15:14.000000000 +0000 +++ kdeclarative-5.18.0/po/ast/kdeclarative5.po 2016-01-02 16:29:11.000000000 +0000 @@ -7,9 +7,9 @@ "Project-Id-Version: kdelibs4-1\n" "Report-Msgid-Bugs-To: http://bugs.kde.org\n" "POT-Creation-Date: 2015-07-22 08:34+0000\n" -"PO-Revision-Date: 2015-07-11 16:22+0100\n" +"PO-Revision-Date: 2015-11-16 00:29+0100\n" "Last-Translator: enolp \n" -"Language-Team: Asturian \n" +"Language-Team: Asturian \n" "Language: ast\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" diff -Nru kdeclarative-5.16.0/po/lt/kdeclarative5.po kdeclarative-5.18.0/po/lt/kdeclarative5.po --- kdeclarative-5.16.0/po/lt/kdeclarative5.po 2015-11-08 12:15:14.000000000 +0000 +++ kdeclarative-5.18.0/po/lt/kdeclarative5.po 2016-01-02 16:29:11.000000000 +0000 @@ -7,14 +7,15 @@ # Remigijus Jarmalavičius , 2011. # Liudas Ališauskas , 2011, 2012, 2013, 2014. # Liudas Alisauskas , 2013, 2015. +# Mindaugas Baranauskas , 2015. msgid "" msgstr "" "Project-Id-Version: kdelibs4\n" "Report-Msgid-Bugs-To: http://bugs.kde.org\n" "POT-Creation-Date: 2015-07-22 08:34+0000\n" -"PO-Revision-Date: 2015-01-28 10:24+0200\n" -"Last-Translator: Liudas Ališauskas \n" -"Language-Team: Lithuanian \n" +"PO-Revision-Date: 2015-12-30 18:08+0200\n" +"Last-Translator: Mindaugas Baranauskas \n" +"Language-Team: lt \n" "Language: lt\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -46,7 +47,7 @@ msgstr "" "Spauskite mygtuką, tada įveskite klavišų derinį taip, tarsi būtumėte " "programoje.\n" -"Pavyzdžiui kombinacijai Ctrl+A: laikykite Ctrl ir spauskite A." +"Pavyzdžiui kombinacijai Vald+A: laikykite Vald ir spauskite A." #: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:275 msgid "Reserved Shortcut" diff -Nru kdeclarative-5.16.0/po/nb/kdeclarative5.po kdeclarative-5.18.0/po/nb/kdeclarative5.po --- kdeclarative-5.16.0/po/nb/kdeclarative5.po 2015-11-08 12:15:14.000000000 +0000 +++ kdeclarative-5.18.0/po/nb/kdeclarative5.po 2016-01-02 16:29:11.000000000 +0000 @@ -1,3 +1,5 @@ +# Translation of kdeclarative5 to Norwegian Bokmål +# # Knut Yrvin , 2002, 2003, 2004, 2005. # Bjørn Steensrud , 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015. # Eskild Hustvedt , 2004, 2005. diff -Nru kdeclarative-5.16.0/po/se/kdeclarative5.po kdeclarative-5.18.0/po/se/kdeclarative5.po --- kdeclarative-5.16.0/po/se/kdeclarative5.po 2015-11-08 12:15:14.000000000 +0000 +++ kdeclarative-5.18.0/po/se/kdeclarative5.po 2016-01-02 16:29:11.000000000 +0000 @@ -1,3 +1,5 @@ +# Translation of kdeclarative5 to Northern Sami +# # Børre Gaup , 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012. msgid "" msgstr "" diff -Nru kdeclarative-5.16.0/src/CMakeLists.txt kdeclarative-5.18.0/src/CMakeLists.txt --- kdeclarative-5.16.0/src/CMakeLists.txt 2015-11-08 12:15:14.000000000 +0000 +++ kdeclarative-5.18.0/src/CMakeLists.txt 2016-01-02 16:29:11.000000000 +0000 @@ -4,4 +4,5 @@ add_subdirectory(quickaddons) add_subdirectory(qmlcontrols) -add_subdirectory(kpackagelauncherqml) \ No newline at end of file +add_subdirectory(kpackagelauncherqml) +add_subdirectory(calendarevents) diff -Nru kdeclarative-5.16.0/src/calendarevents/CMakeLists.txt kdeclarative-5.18.0/src/calendarevents/CMakeLists.txt --- kdeclarative-5.16.0/src/calendarevents/CMakeLists.txt 1970-01-01 00:00:00.000000000 +0000 +++ kdeclarative-5.18.0/src/calendarevents/CMakeLists.txt 2016-01-02 16:29:11.000000000 +0000 @@ -0,0 +1,33 @@ +set(calendar-integration_SRCS + calendareventsplugin.cpp + eventdata_p.cpp +) + +add_library(KF5CalendarEvents SHARED ${calendar-integration_SRCS}) +generate_export_header(KF5CalendarEvents BASE_NAME CalendarEvents) +add_library(KF5::CalendarEvents ALIAS KF5CalendarEvents) + +target_link_libraries(KF5CalendarEvents PUBLIC Qt5::Core) + +target_include_directories(KF5CalendarEvents INTERFACE "$") +set_target_properties(KF5CalendarEvents PROPERTIES VERSION ${KDECLARATIVE_VERSION_STRING} + SOVERSION ${KDECLARATIVE_SOVERSION} + EXPORT_NAME CalendarEvents +) + +install(TARGETS KF5CalendarEvents EXPORT KF5DeclarativeTargets ${KF5_INSTALL_TARGETS_DEFAULT_ARGS}) + +ecm_generate_headers(CalendarEvents_CamelCase_HEADERS + HEADER_NAMES + CalendarEventsPlugin + + PREFIX CalendarEvents + REQUIRED_HEADERS calendareventsplugin.h +) +install(FILES ${CalendarEvents_CamelCase_HEADERS} DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/KDeclarative/CalendarEvents COMPONENT Devel) + +install (FILES + calendareventsplugin.h + ${CMAKE_CURRENT_BINARY_DIR}/calendarevents_export.h + DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/KDeclarative/calendarevents COMPONENT Devel +) diff -Nru kdeclarative-5.16.0/src/calendarevents/CalendarEventsConfig.cmake.in kdeclarative-5.18.0/src/calendarevents/CalendarEventsConfig.cmake.in --- kdeclarative-5.16.0/src/calendarevents/CalendarEventsConfig.cmake.in 1970-01-01 00:00:00.000000000 +0000 +++ kdeclarative-5.18.0/src/calendarevents/CalendarEventsConfig.cmake.in 2016-01-02 16:29:11.000000000 +0000 @@ -0,0 +1,5 @@ +@PACKAGE_INIT@ + +find_dependency(Qt5Core @REQUIRED_QT_VERSION@) + +include("${CMAKE_CURRENT_LIST_DIR}/CalendarEventsTargets.cmake") diff -Nru kdeclarative-5.16.0/src/calendarevents/calendareventsplugin.cpp kdeclarative-5.18.0/src/calendarevents/calendareventsplugin.cpp --- kdeclarative-5.16.0/src/calendarevents/calendareventsplugin.cpp 1970-01-01 00:00:00.000000000 +0000 +++ kdeclarative-5.18.0/src/calendarevents/calendareventsplugin.cpp 2016-01-02 16:29:11.000000000 +0000 @@ -0,0 +1,35 @@ +/* + Copyright (C) 2015 Martin Klapetek + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program 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 General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +*/ + +#include "calendareventsplugin.h" + +namespace CalendarEvents { + +CalendarEventsPlugin::CalendarEventsPlugin(QObject *parent) + : QObject(parent) +{ + +} + +CalendarEventsPlugin::~CalendarEventsPlugin() +{ + +} + +} diff -Nru kdeclarative-5.16.0/src/calendarevents/calendareventsplugin.h kdeclarative-5.18.0/src/calendarevents/calendareventsplugin.h --- kdeclarative-5.16.0/src/calendarevents/calendareventsplugin.h 1970-01-01 00:00:00.000000000 +0000 +++ kdeclarative-5.18.0/src/calendarevents/calendareventsplugin.h 2016-01-02 16:29:11.000000000 +0000 @@ -0,0 +1,233 @@ +/* + Copyright (C) 2015 Martin Klapetek + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program 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 General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +*/ + +#ifndef CALENDAREVENTSPLUGIN_H +#define CALENDAREVENTSPLUGIN_H + +#include +#include +#include +#include + +#include "calendarevents_export.h" + +namespace CalendarEvents { + +class CALENDAREVENTS_EXPORT EventData +{ +public: + enum EventType { + Holiday, // Any holiday + Event, // General event + Todo // A Todo item + }; + + EventData(); + EventData(const EventData &other); + ~EventData(); + + EventData &operator=(const EventData &other); + + /** + * The start date and time of this event + */ + QDateTime startDateTime() const; + + /** + * Set the start date-time of this event + * + * @param startDateTime the date-time of when the event is starting + */ + void setStartDateTime(const QDateTime &startDateTime); + + /** + * The end date and time of this event + */ + QDateTime endDateTime() const; + + /** + * Set the end date-time of this event + * + * @param endDateTime the date-time of when the event is ending + */ + void setEndDateTime(const QDateTime &endDateTime); + + /** + * If true, this event goes on the whole day (eg. a holiday) + */ + bool isAllDay() const; + + /** + * If set to true, it will be displayed in the Calendar agenda + * without any time besides it, marked as "going on all day" + * + * This is useful for single-day events only, for multiple-day + * events, leave to false (default) + * + * @param isAllDay set to true if the event takes all day, false otherwise + * (defaults to false) + */ + void setIsAllDay(bool isAllDay); + + /** + * If true, this event won't mark the day in the calendar grid + * The main purpose for this flag is to support + * namedays, where in some countries the calendars have + * different name in them every day. This is just a minor holiday + * and as such should not mark the calendar grid, otherwise + * the whole grid would be in a different color. + */ + bool isMinor() const; + + /** + * If set to true, it won't be marked in the calendar grid + * + * @param isMinor true if it's a minor event (like a nameday holiday), + * false otherwise (defaults to false) + */ + void setIsMinor(bool isMinor); + + /** + * Event title + */ + QString title() const; + + /** + * Sets the title of the event + * + * @param title The event title + */ + void setTitle(const QString &title); + + /** + * Event description, can provide more details about the event + */ + QString description() const; + + /** + * Sets the event description, which allows to add more details + * about this event + * + * @param description The description + */ + void setDescription(const QString &description); + + /** + * Type of the current event, eg. a holiday, an event or a todo item + */ + EventType type() const; + + /** + * Sets the event type, eg. a holiday, an event or a todo item + * + * @param type The event type, + */ + void setEventType(EventType type); + + /** + * The color that should be used to mark this event with + * It comes in the HTML hex format, eg. #AARRGGBB or #RRGGBB + */ + QString eventColor() const; + + /** + * This is to support various calendar colors the user might + * have configured elsewhere + * + * @param color The color for this event in the HTML hex format + * eg. #AARRGGBB or #RRGGBB (this is passed directly + * to QML) + */ + void setEventColor(const QString &color); + + /** + * Unique ID of the event + */ + QString uid() const; + + /** + * Sets the uid of the event + * + * This is a mandatory field only if you want to use + * the eventModified/eventRemoved signals, otherwise + * setting it is optional + * + * @param uid A unique id, recommended is to use the plugin name as prefix (to keep it unique) + */ + void setUid(const QString &uid); + +private: + class Private; + QSharedDataPointer d; +}; + +class CALENDAREVENTS_EXPORT CalendarEventsPlugin : public QObject +{ + Q_OBJECT + +public: + explicit CalendarEventsPlugin(QObject *parent = Q_NULLPTR); + virtual ~CalendarEventsPlugin(); + + /** + * When this is called, the plugin should load all events data + * between those two date ranges. Once the data are ready, it should + * just emit the dataReady() signal. The range is usually one month + * + * @param startDate the start of the range + * @param endDate the end of the range + */ + virtual void loadEventsForDateRange(const QDate &startDate, const QDate &endDate) = 0; + +Q_SIGNALS: + /** + * Emitted when the plugin has loaded the events data + * + * @param data A hash containing a QDate key for the event + * in the value, CalendarEvents::EventData, which holds all + * the details for the given event + * It's a multihash as there can be multiple events + * in the same day + * For multi-day events, insert just one with the key + * being the startdate of the event + */ + void dataReady(const QMultiHash &data); + + /** + * Should be emitted when there is a modification of an event + * that was previously returned via the dataReady() signal + * + * @param event The modified event data + */ + void eventModified(const CalendarEvents::EventData &modifiedEvent); + + /** + * Should be emitted when the plugin removes some event + * from its collection + * + * @param uid The uid of the event that was removed + */ + void eventRemoved(const QString &uid); +}; + +} + +Q_DECLARE_INTERFACE(CalendarEvents::CalendarEventsPlugin, "org.kde.CalendarEventsPlugin") + +#endif diff -Nru kdeclarative-5.16.0/src/calendarevents/eventdata_p.cpp kdeclarative-5.18.0/src/calendarevents/eventdata_p.cpp --- kdeclarative-5.16.0/src/calendarevents/eventdata_p.cpp 1970-01-01 00:00:00.000000000 +0000 +++ kdeclarative-5.18.0/src/calendarevents/eventdata_p.cpp 2016-01-02 16:29:11.000000000 +0000 @@ -0,0 +1,170 @@ +/* + Copyright (C) 2015 Martin Klapetek + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program 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 General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +*/ + +#include "calendareventsplugin.h" + +#include + +class CalendarEvents::EventData::Private : public QSharedData { +public: + Private() : isAllDay(false), isMinor(false) {}; + Private(const Private &other) + : QSharedData(other) + { + startDateTime = other.startDateTime; + endDateTime = other.endDateTime; + title = other.title; + description = other.description; + uid = other.uid; + eventColor = other.eventColor; + type = other.type; + isAllDay = other.isAllDay; + isMinor = other.isMinor; + }; + ~Private() {}; + QDateTime startDateTime; // Start of the event + QDateTime endDateTime; // End of the event + QString title; // Title of the event + QString description; // Additional info of the event + QString uid; // An internal event id, useful mostly just for the eventModified/Removed signals + QString eventColor; // Optional color of the event in the HTML hex format, eg. #AARRGGBB or #RRGGBB + EventType type; // Type of the event + bool isAllDay; // True if the event takes all day, then it won't be displayed with any time + bool isMinor; // A minor holiday that will not create a colored entry in the calendar +}; + +//--------------------------------------------------- + +namespace CalendarEvents { + +EventData::EventData() + : d(new Private()) +{ +} + +EventData::EventData(const EventData &other) + : d(other.d) +{ +} + +EventData::~EventData() +{ +} + +EventData& EventData::operator=(const EventData &other) +{ + if (this == &other) { + return *this; + } + + d = other.d; + return *this; +} + +QDateTime EventData::startDateTime() const +{ + return d->startDateTime; +} + +void EventData::setStartDateTime(const QDateTime &startDateTime) +{ + d->startDateTime = startDateTime; +} + +QDateTime EventData::endDateTime() const +{ + return d->endDateTime; +} + +void EventData::setEndDateTime(const QDateTime &endDateTime) +{ + d->endDateTime = endDateTime; +} + +bool EventData::isAllDay() const +{ + return d->isAllDay; +} + +void EventData::setIsAllDay(bool isAllDay) +{ + d->isAllDay = isAllDay; +} + +bool EventData::isMinor() const +{ + return d->isMinor; +} + +void EventData::setIsMinor(bool isMinor) +{ + d->isMinor = isMinor; +} + +QString EventData::title() const +{ + return d->title; +} + +void EventData::setTitle(const QString &title) +{ + d->title = title; +} + +QString EventData::description() const +{ + return d->description; +} + +void EventData::setDescription(const QString &description) +{ + d->description = description; +} + +QString EventData::uid() const +{ + return d->uid; +} + +void EventData::setUid(const QString &uid) +{ + d->uid = uid; +} + +EventData::EventType EventData::type() const +{ + return d->type; +} + +void EventData::setEventType(EventData::EventType type) +{ + d->type = type; +} + +QString EventData::eventColor() const +{ + return d->eventColor; +} + +void EventData::setEventColor(const QString &color) +{ + d->eventColor = color; +} + +} diff -Nru kdeclarative-5.16.0/src/kdeclarative/CMakeLists.txt kdeclarative-5.18.0/src/kdeclarative/CMakeLists.txt --- kdeclarative-5.16.0/src/kdeclarative/CMakeLists.txt 2015-11-08 12:15:14.000000000 +0000 +++ kdeclarative-5.18.0/src/kdeclarative/CMakeLists.txt 2016-01-02 16:29:11.000000000 +0000 @@ -4,7 +4,6 @@ qmlobject.cpp qmlobjectsharedengine.cpp kdeclarative.cpp - private/rootcontext.cpp private/kiconprovider.cpp private/kioaccessmanagerfactory.cpp private/qmlobject_p.h diff -Nru kdeclarative-5.16.0/src/kdeclarative/kdeclarative.cpp kdeclarative-5.18.0/src/kdeclarative/kdeclarative.cpp --- kdeclarative-5.16.0/src/kdeclarative/kdeclarative.cpp 2015-11-08 12:15:14.000000000 +0000 +++ kdeclarative-5.18.0/src/kdeclarative/kdeclarative.cpp 2016-01-02 16:29:11.000000000 +0000 @@ -19,7 +19,6 @@ #include "kdeclarative.h" #include "private/kdeclarative_p.h" -#include "private/rootcontext_p.h" #include "private/kiconprovider_p.h" #include "private/kioaccessmanagerfactory_p.h" #include "qmlobject.h" @@ -40,8 +39,7 @@ QStringList KDeclarativePrivate::s_runtimePlatform; KDeclarativePrivate::KDeclarativePrivate() - : initialized(false), - contextObj(0) + : contextObj(0) { } @@ -60,7 +58,6 @@ if (d->declarativeEngine.data() == engine) { return; } - d->initialized = false; d->declarativeEngine = engine; } @@ -72,9 +69,6 @@ #ifndef KDECLARATIVE_NO_DEPRECATED void KDeclarative::initialize() { - //FIXME: remove this or find a similar hack for qml2 - - d->initialized = true; } #endif @@ -89,7 +83,7 @@ /*Create a context object for the root qml context. in this way we can register global functions, in this case the i18n() family*/ if (!d->contextObj) { - d->contextObj = new RootContext(d->declarativeEngine.data()); + d->contextObj = new KLocalizedContext(d->declarativeEngine.data()); } //If the engine is in a qmlObject take the qmlObject rootContext instead of the engine one. @@ -100,7 +94,7 @@ } if (!d->translationDomain.isNull()) { - d->contextObj->setProperty("translationDomain", d->translationDomain); + d->contextObj->setTranslationDomain(d->translationDomain); } /* Tell the engine to search for platform-specific imports first @@ -122,14 +116,14 @@ } // setup ImageProvider for KDE icons - d->declarativeEngine.data()->addImageProvider(QString(QStringLiteral("icon")), new KIconProvider); + d->declarativeEngine.data()->addImageProvider(QStringLiteral("icon"), new KIconProvider); } void KDeclarative::setTranslationDomain(const QString &translationDomain) { d->translationDomain = translationDomain; if (d->contextObj) { - d->contextObj->setProperty("translationDomain", d->translationDomain); + d->contextObj->setTranslationDomain(d->translationDomain); } } diff -Nru kdeclarative-5.16.0/src/kdeclarative/private/kdeclarative_p.h kdeclarative-5.18.0/src/kdeclarative/private/kdeclarative_p.h --- kdeclarative-5.16.0/src/kdeclarative/private/kdeclarative_p.h 2015-11-08 12:15:14.000000000 +0000 +++ kdeclarative-5.18.0/src/kdeclarative/private/kdeclarative_p.h 2016-01-02 16:29:11.000000000 +0000 @@ -21,10 +21,10 @@ #define KDECLARATIVE_P_H #include "kdeclarative.h" -#include "rootcontext_p.h" #include "qmlobject.h" #include +#include namespace KDeclarative { @@ -34,10 +34,9 @@ KDeclarativePrivate(); QPointer declarativeEngine; - bool initialized; QString translationDomain; static QStringList s_runtimePlatform; - QPointer contextObj; + QPointer contextObj; QPointer qmlObj; }; diff -Nru kdeclarative-5.16.0/src/kdeclarative/private/rootcontext.cpp kdeclarative-5.18.0/src/kdeclarative/private/rootcontext.cpp --- kdeclarative-5.16.0/src/kdeclarative/private/rootcontext.cpp 2015-11-08 12:15:14.000000000 +0000 +++ kdeclarative-5.18.0/src/kdeclarative/private/rootcontext.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,430 +0,0 @@ -/* - * Copyright 2013 Marco Martin - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Library General Public License as - * published by the Free Software Foundation; either version 2, or - * (at your option) any later version. - * - * This program 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 General Public License for more details - * - * You should have received a copy of the GNU Library General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -// Undefine this because we don't want our i18n*() method names to be turned into i18nd*() -#undef TRANSLATION_DOMAIN - -#include "rootcontext_p.h" - -#include - -#include - -namespace KDeclarative { - -RootContext::RootContext(QObject *parent) - : QObject(parent) -{ -} - -RootContext::~RootContext() -{ -} - -QString RootContext::i18n(const QString &message, const QString ¶m1, const QString ¶m2, const QString ¶m3, const QString ¶m4, const QString ¶m5, const QString ¶m6, const QString ¶m7, const QString ¶m8, const QString ¶m9, const QString ¶m10) const -{ - if (message.isNull()) { - qWarning() << "i18n() needs at least one parameter"; - return QString(); - } - - KLocalizedString trMessage; - if (!m_translationDomain.isNull()) { - trMessage = ki18nd(m_translationDomain.toUtf8().constData(), message.toUtf8().constData()); - } else { - trMessage = ki18n(message.toUtf8().constData()); - } - - if (!param1.isNull()) { - trMessage = trMessage.subs(param1); - } - if (!param2.isNull()) { - trMessage = trMessage.subs(param2); - } - if (!param3.isNull()) { - trMessage = trMessage.subs(param3); - } - if (!param4.isNull()) { - trMessage = trMessage.subs(param4); - } - if (!param5.isNull()) { - trMessage = trMessage.subs(param5); - } - if (!param6.isNull()) { - trMessage = trMessage.subs(param6); - } - if (!param7.isNull()) { - trMessage = trMessage.subs(param7); - } - if (!param8.isNull()) { - trMessage = trMessage.subs(param8); - } - if (!param9.isNull()) { - trMessage = trMessage.subs(param9); - } - if (!param10.isNull()) { - trMessage = trMessage.subs(param10); - } - - return trMessage.toString(); -} - -QString RootContext::i18nc(const QString &context, const QString &message, const QString ¶m1, const QString ¶m2, const QString ¶m3, const QString ¶m4, const QString ¶m5, const QString ¶m6, const QString ¶m7, const QString ¶m8, const QString ¶m9, const QString ¶m10) const -{ - if (context.isNull() || message.isNull()) { - qWarning() << "i18nc() needs at least two arguments"; - return QString(); - } - - KLocalizedString trMessage; - if (!m_translationDomain.isNull()) { - trMessage = ki18ndc(m_translationDomain.toUtf8().constData(), context.toUtf8().constData(), message.toUtf8().constData()); - } else { - trMessage = ki18nc(context.toUtf8().constData(), message.toUtf8().constData()); - } - - if (!param1.isNull()) { - trMessage = trMessage.subs(param1); - } - if (!param2.isNull()) { - trMessage = trMessage.subs(param2); - } - if (!param3.isNull()) { - trMessage = trMessage.subs(param3); - } - if (!param4.isNull()) { - trMessage = trMessage.subs(param4); - } - if (!param5.isNull()) { - trMessage = trMessage.subs(param5); - } - if (!param6.isNull()) { - trMessage = trMessage.subs(param6); - } - if (!param7.isNull()) { - trMessage = trMessage.subs(param7); - } - if (!param8.isNull()) { - trMessage = trMessage.subs(param8); - } - if (!param9.isNull()) { - trMessage = trMessage.subs(param9); - } - if (!param10.isNull()) { - trMessage = trMessage.subs(param10); - } - - return trMessage.toString(); -} - -QString RootContext::i18np(const QString &singular, const QString &plural, const QString ¶m1, const QString ¶m2, const QString ¶m3, const QString ¶m4, const QString ¶m5, const QString ¶m6, const QString ¶m7, const QString ¶m8, const QString ¶m9, const QString ¶m10) const -{ - if (singular.isNull() || plural.isNull()) { - qWarning() << "i18np() needs at least two arguments"; - return QString(); - } - - KLocalizedString trMessage; - if (!m_translationDomain.isNull()) { - trMessage = ki18ndp(m_translationDomain.toUtf8().constData(), singular.toUtf8().constData(), plural.toUtf8().constData()); - } else { - trMessage = ki18np(singular.toUtf8().constData(), plural.toUtf8().constData()); - } - - if (!param1.isNull()) { - bool ok; - int num = param1.toInt(&ok); - if (ok) { - trMessage = trMessage.subs(num); - } else { - trMessage = trMessage.subs(param1); - } - } - if (!param2.isNull()) { - trMessage = trMessage.subs(param2); - } - if (!param3.isNull()) { - trMessage = trMessage.subs(param3); - } - if (!param4.isNull()) { - trMessage = trMessage.subs(param4); - } - if (!param5.isNull()) { - trMessage = trMessage.subs(param5); - } - if (!param6.isNull()) { - trMessage = trMessage.subs(param6); - } - if (!param7.isNull()) { - trMessage = trMessage.subs(param7); - } - if (!param8.isNull()) { - trMessage = trMessage.subs(param8); - } - if (!param9.isNull()) { - trMessage = trMessage.subs(param9); - } - if (!param10.isNull()) { - trMessage = trMessage.subs(param10); - } - - return trMessage.toString(); -} - -QString RootContext::i18ncp(const QString &context, const QString &singular, const QString &plural, const QString ¶m1, const QString ¶m2, const QString ¶m3, const QString ¶m4, const QString ¶m5, const QString ¶m6, const QString ¶m7, const QString ¶m8, const QString ¶m9, const QString ¶m10) const -{ - if (context.isNull() || singular.isNull() || plural.isNull()) { - qWarning() << "i18ncp() needs at least three arguments"; - return QString(); - } - - KLocalizedString trMessage; - if (!m_translationDomain.isNull()) { - trMessage = ki18ndcp(m_translationDomain.toUtf8().constData(), context.toUtf8().constData(), singular.toUtf8().constData(), plural.toUtf8().constData()); - } else { - trMessage = ki18ncp(context.toUtf8().constData(), singular.toUtf8().constData(), plural.toUtf8().constData()); - } - - if (!param1.isNull()) { - bool ok; - int num = param1.toInt(&ok); - if (ok) { - trMessage = trMessage.subs(num); - } else { - trMessage = trMessage.subs(param1); - } - } - if (!param2.isNull()) { - trMessage = trMessage.subs(param2); - } - if (!param3.isNull()) { - trMessage = trMessage.subs(param3); - } - if (!param4.isNull()) { - trMessage = trMessage.subs(param4); - } - if (!param5.isNull()) { - trMessage = trMessage.subs(param5); - } - if (!param6.isNull()) { - trMessage = trMessage.subs(param6); - } - if (!param7.isNull()) { - trMessage = trMessage.subs(param7); - } - if (!param8.isNull()) { - trMessage = trMessage.subs(param8); - } - if (!param9.isNull()) { - trMessage = trMessage.subs(param9); - } - if (!param10.isNull()) { - trMessage = trMessage.subs(param10); - } - - return trMessage.toString(); -} - -QString RootContext::i18nd(const QString &domain, const QString &message, const QString ¶m1, const QString ¶m2, const QString ¶m3, const QString ¶m4, const QString ¶m5, const QString ¶m6, const QString ¶m7, const QString ¶m8, const QString ¶m9, const QString ¶m10) const -{ - if (domain.isNull() || message.isNull()) { - qWarning() << "i18nd() needs at least two parameters"; - return QString(); - } - - KLocalizedString trMessage = ki18nd(domain.toUtf8().constData(), message.toUtf8().constData()); - - if (!param1.isNull()) { - trMessage = trMessage.subs(param1); - } - if (!param2.isNull()) { - trMessage = trMessage.subs(param2); - } - if (!param3.isNull()) { - trMessage = trMessage.subs(param3); - } - if (!param4.isNull()) { - trMessage = trMessage.subs(param4); - } - if (!param5.isNull()) { - trMessage = trMessage.subs(param5); - } - if (!param6.isNull()) { - trMessage = trMessage.subs(param6); - } - if (!param7.isNull()) { - trMessage = trMessage.subs(param7); - } - if (!param8.isNull()) { - trMessage = trMessage.subs(param8); - } - if (!param9.isNull()) { - trMessage = trMessage.subs(param9); - } - if (!param10.isNull()) { - trMessage = trMessage.subs(param10); - } - - return trMessage.toString(); -} - -QString RootContext::i18ndc(const QString &domain, const QString &context, const QString &message, const QString ¶m1, const QString ¶m2, const QString ¶m3, const QString ¶m4, const QString ¶m5, const QString ¶m6, const QString ¶m7, const QString ¶m8, const QString ¶m9, const QString ¶m10) const -{ - if (domain.isNull() || context.isNull() || message.isNull()) { - qWarning() << "i18ndc() needs at least three arguments"; - return QString(); - } - - KLocalizedString trMessage = ki18ndc(domain.toUtf8().constData(), context.toUtf8().constData(), message.toUtf8().constData()); - - if (!param1.isNull()) { - trMessage = trMessage.subs(param1); - } - if (!param2.isNull()) { - trMessage = trMessage.subs(param2); - } - if (!param3.isNull()) { - trMessage = trMessage.subs(param3); - } - if (!param4.isNull()) { - trMessage = trMessage.subs(param4); - } - if (!param5.isNull()) { - trMessage = trMessage.subs(param5); - } - if (!param6.isNull()) { - trMessage = trMessage.subs(param6); - } - if (!param7.isNull()) { - trMessage = trMessage.subs(param7); - } - if (!param8.isNull()) { - trMessage = trMessage.subs(param8); - } - if (!param9.isNull()) { - trMessage = trMessage.subs(param9); - } - if (!param10.isNull()) { - trMessage = trMessage.subs(param10); - } - - return trMessage.toString(); -} - -QString RootContext::i18ndp(const QString &domain, const QString &singular, const QString &plural, const QString ¶m1, const QString ¶m2, const QString ¶m3, const QString ¶m4, const QString ¶m5, const QString ¶m6, const QString ¶m7, const QString ¶m8, const QString ¶m9, const QString ¶m10) const -{ - if (domain.isNull() || singular.isNull() || plural.isNull()) { - qWarning() << "i18ndp() needs at least three arguments"; - return QString(); - } - - KLocalizedString trMessage = ki18ndp(domain.toUtf8().constData(), singular.toUtf8().constData(), plural.toUtf8().constData()); - - if (!param1.isNull()) { - bool ok; - int num = param1.toInt(&ok); - if (ok) { - trMessage = trMessage.subs(num); - } else { - trMessage = trMessage.subs(param1); - } - } - if (!param2.isNull()) { - trMessage = trMessage.subs(param2); - } - if (!param3.isNull()) { - trMessage = trMessage.subs(param3); - } - if (!param4.isNull()) { - trMessage = trMessage.subs(param4); - } - if (!param5.isNull()) { - trMessage = trMessage.subs(param5); - } - if (!param6.isNull()) { - trMessage = trMessage.subs(param6); - } - if (!param7.isNull()) { - trMessage = trMessage.subs(param7); - } - if (!param8.isNull()) { - trMessage = trMessage.subs(param8); - } - if (!param9.isNull()) { - trMessage = trMessage.subs(param9); - } - if (!param10.isNull()) { - trMessage = trMessage.subs(param10); - } - - return trMessage.toString(); -} - -QString RootContext::i18ndcp(const QString &domain, const QString &context, const QString &singular, const QString &plural, const QString ¶m1, const QString ¶m2, const QString ¶m3, const QString ¶m4, const QString ¶m5, const QString ¶m6, const QString ¶m7, const QString ¶m8, const QString ¶m9, const QString ¶m10) const -{ - if (domain.isNull() || context.isNull() || singular.isNull() || plural.isNull()) { - qWarning() << "i18ndcp() needs at least four arguments"; - return QString(); - } - - KLocalizedString trMessage = ki18ndcp(domain.toUtf8().constData(), context.toUtf8().constData(), singular.toUtf8().constData(), plural.toUtf8().constData()); - - if (!param1.isNull()) { - bool ok; - int num = param1.toInt(&ok); - if (ok) { - trMessage = trMessage.subs(num); - } else { - trMessage = trMessage.subs(param1); - } - } - if (!param2.isNull()) { - trMessage = trMessage.subs(param2); - } - if (!param3.isNull()) { - trMessage = trMessage.subs(param3); - } - if (!param4.isNull()) { - trMessage = trMessage.subs(param4); - } - if (!param5.isNull()) { - trMessage = trMessage.subs(param5); - } - if (!param6.isNull()) { - trMessage = trMessage.subs(param6); - } - if (!param7.isNull()) { - trMessage = trMessage.subs(param7); - } - if (!param8.isNull()) { - trMessage = trMessage.subs(param8); - } - if (!param9.isNull()) { - trMessage = trMessage.subs(param9); - } - if (!param10.isNull()) { - trMessage = trMessage.subs(param10); - } - - return trMessage.toString(); -} - -} - -#include diff -Nru kdeclarative-5.16.0/src/kdeclarative/private/rootcontext_p.h kdeclarative-5.18.0/src/kdeclarative/private/rootcontext_p.h --- kdeclarative-5.16.0/src/kdeclarative/private/rootcontext_p.h 2015-11-08 12:15:14.000000000 +0000 +++ kdeclarative-5.18.0/src/kdeclarative/private/rootcontext_p.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,61 +0,0 @@ -/* - * Copyright 2011 Marco Martin - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Library General Public License as - * published by the Free Software Foundation; either version 2, or - * (at your option) any later version. - * - * This program 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 General Public License for more details - * - * You should have received a copy of the GNU Library General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#ifndef ROOTCONTEXT_H -#define ROOTCONTEXT_H - -#include - -namespace KDeclarative { - -class RootContext : public QObject -{ - Q_OBJECT - Q_PROPERTY(QString translationDomain MEMBER m_translationDomain NOTIFY translationDomainChanged) - -public: - RootContext(QObject *parent = 0); - ~RootContext(); - - Q_INVOKABLE QString i18n(const QString &message, const QString ¶m1 = QString(), const QString ¶m2 = QString(), const QString ¶m3 = QString(), const QString ¶m4 = QString(), const QString ¶m5 = QString(), const QString ¶m6 = QString(), const QString ¶m7 = QString(), const QString ¶m8 = QString(), const QString ¶m9 = QString(), const QString ¶m10 = QString()) const; - - Q_INVOKABLE QString i18nc(const QString &context, const QString &message, const QString ¶m1 = QString(), const QString ¶m2 = QString(), const QString ¶m3 = QString(), const QString ¶m4 = QString(), const QString ¶m5 = QString(), const QString ¶m6 = QString(), const QString ¶m7 = QString(), const QString ¶m8 = QString(), const QString ¶m9 = QString(), const QString ¶m10 = QString()) const; - - Q_INVOKABLE QString i18np(const QString &singular, const QString &plural, const QString ¶m1 = QString(), const QString ¶m2 = QString(), const QString ¶m3 = QString(), const QString ¶m4 = QString(), const QString ¶m5 = QString(), const QString ¶m6 = QString(), const QString ¶m7 = QString(), const QString ¶m8 = QString(), const QString ¶m9 = QString(), const QString ¶m10 = QString()) const; - - Q_INVOKABLE QString i18ncp(const QString &context, const QString &singular, const QString &plural, const QString ¶m1 = QString(), const QString ¶m2 = QString(), const QString ¶m3 = QString(), const QString ¶m4 = QString(), const QString ¶m5 = QString(), const QString ¶m6 = QString(), const QString ¶m7 = QString(), const QString ¶m8 = QString(), const QString ¶m9 = QString(), const QString ¶m10 = QString()) const; - - Q_INVOKABLE QString i18nd(const QString &domain, const QString &message, const QString ¶m1 = QString(), const QString ¶m2 = QString(), const QString ¶m3 = QString(), const QString ¶m4 = QString(), const QString ¶m5 = QString(), const QString ¶m6 = QString(), const QString ¶m7 = QString(), const QString ¶m8 = QString(), const QString ¶m9 = QString(), const QString ¶m10 = QString()) const; - - Q_INVOKABLE QString i18ndc(const QString &domain, const QString &context, const QString &message, const QString ¶m1 = QString(), const QString ¶m2 = QString(), const QString ¶m3 = QString(), const QString ¶m4 = QString(), const QString ¶m5 = QString(), const QString ¶m6 = QString(), const QString ¶m7 = QString(), const QString ¶m8 = QString(), const QString ¶m9 = QString(), const QString ¶m10 = QString()) const; - - Q_INVOKABLE QString i18ndp(const QString &domain, const QString &singular, const QString &plural, const QString ¶m1 = QString(), const QString ¶m2 = QString(), const QString ¶m3 = QString(), const QString ¶m4 = QString(), const QString ¶m5 = QString(), const QString ¶m6 = QString(), const QString ¶m7 = QString(), const QString ¶m8 = QString(), const QString ¶m9 = QString(), const QString ¶m10 = QString()) const; - - Q_INVOKABLE QString i18ndcp(const QString &domain, const QString &context, const QString &singular, const QString &plural, const QString ¶m1 = QString(), const QString ¶m2 = QString(), const QString ¶m3 = QString(), const QString ¶m4 = QString(), const QString ¶m5 = QString(), const QString ¶m6 = QString(), const QString ¶m7 = QString(), const QString ¶m8 = QString(), const QString ¶m9 = QString(), const QString ¶m10 = QString()) const; - -Q_SIGNALS: - void translationDomainChanged(const QString&); - -private: - QString m_translationDomain; -}; - -} - -#endif diff -Nru kdeclarative-5.16.0/src/kdeclarative/qmlobjectsharedengine.cpp kdeclarative-5.18.0/src/kdeclarative/qmlobjectsharedengine.cpp --- kdeclarative-5.16.0/src/kdeclarative/qmlobjectsharedengine.cpp 2015-11-08 12:15:14.000000000 +0000 +++ kdeclarative-5.18.0/src/kdeclarative/qmlobjectsharedengine.cpp 2016-01-02 16:29:11.000000000 +0000 @@ -27,9 +27,6 @@ #include #include -#include - - namespace KDeclarative { diff -Nru kdeclarative-5.16.0/src/qmlcontrols/draganddrop/DeclarativeDragArea.cpp kdeclarative-5.18.0/src/qmlcontrols/draganddrop/DeclarativeDragArea.cpp --- kdeclarative-5.16.0/src/qmlcontrols/draganddrop/DeclarativeDragArea.cpp 2015-11-08 12:15:14.000000000 +0000 +++ kdeclarative-5.18.0/src/qmlcontrols/draganddrop/DeclarativeDragArea.cpp 2016-01-02 16:29:11.000000000 +0000 @@ -47,6 +47,7 @@ m_target(0), m_enabled(true), m_draggingJustStarted(false), + m_dragActive(false), m_supportedActions(Qt::MoveAction), m_defaultAction(Qt::MoveAction), m_data(new DeclarativeMimeData()) // m_data is owned by us, and we shouldn't pass it to Qt directly as it will automatically delete it after the drag and drop. @@ -110,6 +111,11 @@ setSource(0); } +bool DeclarativeDragArea::dragActive() const +{ + return m_dragActive; +} + // target QQuickItem* DeclarativeDragArea::target() const { @@ -153,6 +159,8 @@ if (image.canConvert()) { m_delegateImage = image.value(); + } else if (image.canConvert()) { + m_delegateImage = QIcon::fromTheme(image.value()).pixmap(QSize(48, 48)).toImage(); } else { m_delegateImage = image.value().pixmap(QSize(48, 48)).toImage(); } @@ -302,11 +310,17 @@ //drag->setHotSpot(QPoint(drag->pixmap().width()/2, drag->pixmap().height()/2)); // TODO: Make a property for that //setCursor(Qt::OpenHandCursor); //TODO? Make a property for the cursor + m_dragActive = true; + emit dragActiveChanged(); emit dragStarted(); Qt::DropAction action = drag->exec(m_supportedActions, m_defaultAction); setKeepMouseGrab(false); + + m_dragActive = false; + emit dragActiveChanged(); emit drop(action); + ungrabMouse(); } } diff -Nru kdeclarative-5.16.0/src/qmlcontrols/draganddrop/DeclarativeDragArea.h kdeclarative-5.18.0/src/qmlcontrols/draganddrop/DeclarativeDragArea.h --- kdeclarative-5.16.0/src/qmlcontrols/draganddrop/DeclarativeDragArea.h 2015-11-08 12:15:14.000000000 +0000 +++ kdeclarative-5.18.0/src/qmlcontrols/draganddrop/DeclarativeDragArea.h 2016-01-02 16:29:11.000000000 +0000 @@ -86,6 +86,13 @@ */ Q_PROPERTY(QVariant delegateImage READ delegateImage WRITE setDelegateImage NOTIFY delegateImageChanged) + /** + * Whether a drag currently originates from this drag area. + * + * @since 5.19 + */ + Q_PROPERTY(bool dragActive READ dragActive NOTIFY dragActiveChanged) + public: DeclarativeDragArea(QQuickItem *parent=0); ~DeclarativeDragArea(); @@ -101,6 +108,8 @@ void setSource(QQuickItem* source); void resetSource(); + bool dragActive() const; + bool isEnabled() const; void setEnabled(bool enabled); @@ -120,6 +129,7 @@ Q_SIGNALS: void dragStarted(); void delegateChanged(); + void dragActiveChanged(); void sourceChanged(); void targetChanged(); void dataChanged(); @@ -142,6 +152,7 @@ QQuickItem* m_target; bool m_enabled; bool m_draggingJustStarted; + bool m_dragActive; Qt::DropActions m_supportedActions; Qt::DropAction m_defaultAction; DeclarativeMimeData* const m_data; diff -Nru kdeclarative-5.16.0/src/qmlcontrols/kquickcontrolsaddons/mimedatabase.cpp kdeclarative-5.18.0/src/qmlcontrols/kquickcontrolsaddons/mimedatabase.cpp --- kdeclarative-5.16.0/src/qmlcontrols/kquickcontrolsaddons/mimedatabase.cpp 2015-11-08 12:15:14.000000000 +0000 +++ kdeclarative-5.18.0/src/qmlcontrols/kquickcontrolsaddons/mimedatabase.cpp 2016-01-02 16:29:11.000000000 +0000 @@ -30,6 +30,7 @@ QJsonObject ret; ret["name"] = type.name(); ret["iconName"] = type.iconName(); + ret["comment"] = type.comment(); return ret; } diff -Nru kdeclarative-5.16.0/tests/helloworld/metadata.desktop kdeclarative-5.18.0/tests/helloworld/metadata.desktop --- kdeclarative-5.16.0/tests/helloworld/metadata.desktop 2015-11-08 12:15:14.000000000 +0000 +++ kdeclarative-5.18.0/tests/helloworld/metadata.desktop 2016-01-02 16:29:11.000000000 +0000 @@ -3,9 +3,11 @@ Encoding=UTF-8 Keywords= Name=hello world +Name[ast]=hola mundiu Name[ca]=hola món Name[ca@valencia]=hola món Name[cs]=hello world +Name[da]=Hej verden Name[de]=Hallo Welt Name[el]=hello world Name[en_GB]=hello world diff -Nru kdeclarative-5.16.0/tests/helloworldnowindow/metadata.desktop kdeclarative-5.18.0/tests/helloworldnowindow/metadata.desktop --- kdeclarative-5.16.0/tests/helloworldnowindow/metadata.desktop 2015-11-08 12:15:14.000000000 +0000 +++ kdeclarative-5.18.0/tests/helloworldnowindow/metadata.desktop 2016-01-02 16:29:11.000000000 +0000 @@ -3,9 +3,11 @@ Encoding=UTF-8 Keywords= Name=hello world +Name[ast]=hola mundiu Name[ca]=hola món Name[ca@valencia]=hola món Name[cs]=hello world +Name[da]=Hej verden Name[de]=Hallo Welt Name[el]=hello world Name[en_GB]=hello world