Hello community, here is the log from the commit of package kdeclarative for openSUSE:Factory checked in at 2014-07-18 14:03:47 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kdeclarative (Old) and /work/SRC/openSUSE:Factory/.kdeclarative.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kdeclarative" Changes: -------- --- /work/SRC/openSUSE:Factory/kdeclarative/kdeclarative.changes 2014-06-10 14:37:52.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.kdeclarative.new/kdeclarative.changes 2014-07-18 14:03:56.000000000 +0200 @@ -1,0 +2,16 @@ +Fri Jul 11 09:48:39 UTC 2014 - [email protected] + +- Define kf5_version within package + +------------------------------------------------------------------- +Tue Jul 1 21:36:03 UTC 2014 - [email protected] + +- Update to 5.0.0 + * Final release of KDE Frameworks 5 + * API improvements and cleanups + * Buildsystem fixes + * For more details please see: + http://www.kde.org/announcements/kde-frameworks-5.0.php +- Drop af7c0f8194.patch, merged upstream + +------------------------------------------------------------------- Old: ---- af7c0f8194.patch kdeclarative-4.100.0.tar.xz New: ---- kdeclarative-5.0.0.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kdeclarative.spec ++++++ --- /var/tmp/diff_new_pack.JZS2y0/_old 2014-07-18 14:03:57.000000000 +0200 +++ /var/tmp/diff_new_pack.JZS2y0/_new 2014-07-18 14:03:57.000000000 +0200 @@ -18,21 +18,22 @@ %define lname libKF5Declarative5 Name: kdeclarative -Version: 4.100.0 +Version: 5.0.0 Release: 0 +%define kf5_version %{version} BuildRequires: cmake >= 2.8.12 -BuildRequires: extra-cmake-modules >= 0.0.14 +BuildRequires: extra-cmake-modules >= 1.0.0 BuildRequires: fdupes -BuildRequires: kconfig-devel >= %{_kf5_version} -BuildRequires: kcoreaddons-devel >= %{_kf5_version} +BuildRequires: kconfig-devel >= %{kf5_version} +BuildRequires: kcoreaddons-devel >= %{kf5_version} BuildRequires: kf5-filesystem -BuildRequires: kglobalaccel-devel >= %{_kf5_version} -BuildRequires: kguiaddons-devel >= %{_kf5_version} -BuildRequires: ki18n-devel >= %{_kf5_version} -BuildRequires: kiconthemes-devel >= %{_kf5_version} -BuildRequires: kio-devel >= %{_kf5_version} -BuildRequires: kwidgetsaddons-devel >= %{_kf5_version} -BuildRequires: kwindowsystem-devel >= %{_kf5_version} +BuildRequires: kglobalaccel-devel >= %{kf5_version} +BuildRequires: kguiaddons-devel >= %{kf5_version} +BuildRequires: ki18n-devel >= %{kf5_version} +BuildRequires: kiconthemes-devel >= %{kf5_version} +BuildRequires: kio-devel >= %{kf5_version} +BuildRequires: kwidgetsaddons-devel >= %{kf5_version} +BuildRequires: kwindowsystem-devel >= %{kf5_version} BuildRequires: pkgconfig(Qt5Core) >= 5.2.0 BuildRequires: pkgconfig(Qt5Gui) >= 5.2.0 BuildRequires: pkgconfig(Qt5Qml) >= 5.2.0 @@ -42,10 +43,8 @@ License: LGPL-2.1+ Group: System/GUI/KDE Url: http://www.kde.org -Source: http://download.kde.org/unstable/frameworks/%{version}/%{name}-%{version}.tar.xz +Source: http://download.kde.org/stable/frameworks/%{version}/%{name}-%{version}.tar.xz Source1: baselibs.conf -# PATCH-FIX-UPSTREAM af7c0f8194.patch -Patch0: af7c0f8194.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -64,7 +63,7 @@ Group: Development/Libraries/KDE Requires: %lname = %{version} Requires: extra-cmake-modules -Requires: kio-devel >= %{_kf5_version} +Requires: kio-devel >= %{kf5_version} %description devel KDeclarative provides integration of QML and KDE workspaces. @@ -73,7 +72,6 @@ %lang_package -n %lname %prep %setup -q -%patch0 -p1 %build %cmake_kf5 -d build ++++++ kdeclarative-4.100.0.tar.xz -> kdeclarative-5.0.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdeclarative-4.100.0/CMakeLists.txt new/kdeclarative-5.0.0/CMakeLists.txt --- old/kdeclarative-4.100.0/CMakeLists.txt 2014-06-01 14:12:52.000000000 +0200 +++ new/kdeclarative-5.0.0/CMakeLists.txt 2014-07-01 20:28:44.000000000 +0200 @@ -3,12 +3,12 @@ project(KDeclarative) # Dependencies -find_package(ECM 0.0.14 REQUIRED NO_MODULE) +find_package(ECM 1.0.0 REQUIRED NO_MODULE) set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR}) set(REQUIRED_QT_VERSION "5.2.0") -set(KF5_VERSION "4.100.0") # handled by release scripts -set(KF5_DEP_VERSION "4.100.0") # handled by release scripts +set(KF5_VERSION "5.0.0") # handled by release scripts +set(KF5_DEP_VERSION "5.0.0") # handled by release scripts find_package(Qt5 ${REQUIRED_QT_VERSION} NO_MODULE REQUIRED Qml Quick Gui) include(KDEInstallDirs) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdeclarative-4.100.0/po/ca/kdeclarative5.po new/kdeclarative-5.0.0/po/ca/kdeclarative5.po --- old/kdeclarative-4.100.0/po/ca/kdeclarative5.po 2014-06-01 14:12:52.000000000 +0200 +++ new/kdeclarative-5.0.0/po/ca/kdeclarative5.po 2014-07-01 20:28:44.000000000 +0200 @@ -1,12 +1,11 @@ # Translation of kdeclarative5.po to Catalan -# Copyright (C) 1998-2014 This_file_is_part_of_KDE +# Copyright (C) 2014 This_file_is_part_of_KDE # This file is distributed under the license LGPL version 2.1 or # version 3 or later versions approved by the membership of KDE e.V. # -# Sebastià Pla i Sanz <[email protected]>, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006. -# Antoni Bella Pérez <[email protected]>, 2003, 2006, 2011, 2012, 2013. +# Sebastià Pla i Sanz <[email protected]>, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007. +# Antoni Bella Pérez <[email protected]>, 2003, 2006, 2011, 2012, 2013, 2014. # Albert Astals Cid <[email protected]>, 2004, 2005, 2007. -# Sebastia Pla Sanz <[email protected]>, 2006, 2007. # Josep Ma. Ferrer <[email protected]>, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014. # Robert Millan <[email protected]>, 2009. # Orestes Mas <[email protected]>, 2010. @@ -15,14 +14,14 @@ "Project-Id-Version: kdeclarative5\n" "Report-Msgid-Bugs-To: http://bugs.kde.org\n" "POT-Creation-Date: 2014-04-27 20:57+0000\n" -"PO-Revision-Date: 2014-04-06 11:33+0200\n" -"Last-Translator: Josep Ma. Ferrer <[email protected]>\n" +"PO-Revision-Date: 2014-06-25 10:33+0200\n" +"Last-Translator: Antoni Bella Pérez <[email protected]>\n" "Language-Team: Catalan <[email protected]>\n" "Language: ca\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Lokalize 1.4\n" +"X-Generator: Lokalize 1.5\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" "X-Accelerator-Marker: &\n" @@ -51,7 +50,7 @@ #: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:332 msgid "Conflict with Standard Application Shortcut" -msgstr "Conflicte amb la drecera aplicació estàndard" +msgstr "Conflicte amb la drecera estàndard de l'aplicació" #: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:333 #, kde-format @@ -80,7 +79,7 @@ #: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:406 msgid "The key you just pressed is not supported by Qt." -msgstr "La tecla que heu premut no està implementada a les Qt." +msgstr "La tecla que heu premut no està implementada per Qt." #: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:407 msgid "Unsupported Key" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdeclarative-4.100.0/po/en_GB/kdeclarative5.po new/kdeclarative-5.0.0/po/en_GB/kdeclarative5.po --- old/kdeclarative-4.100.0/po/en_GB/kdeclarative5.po 2014-06-01 14:12:52.000000000 +0200 +++ new/kdeclarative-5.0.0/po/en_GB/kdeclarative5.po 2014-07-01 20:28:44.000000000 +0200 @@ -2,33 +2,29 @@ # Malcolm Hunter <[email protected]>, 2002,2003,2004, 2005, 2006, 2007, 2008, 2009. # Jonathan Riddell <[email protected]>, 2003. # Andrew Coles <[email protected]>, 2004, 2005, 2009, 2010. +# Steve Allewell <[email protected]>, 2014. msgid "" msgstr "" "Project-Id-Version: kdelibs4\n" "Report-Msgid-Bugs-To: http://bugs.kde.org\n" "POT-Creation-Date: 2014-04-27 20:57+0000\n" -"PO-Revision-Date: 2010-12-14 12:18+0000\n" -"Last-Translator: Andrew Coles <[email protected]>\n" -"Language-Team: British English <[email protected]>\n" -"Language: \n" +"PO-Revision-Date: 2014-06-28 11:59+0100\n" +"Last-Translator: Steve Allewell <[email protected]>\n" +"Language-Team: British English <[email protected]>\n" +"Language: en_GB\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Lokalize 1.1\n" +"X-Generator: Lokalize 1.5\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" #: qmlcontrols/kquickcontrols/KeySequenceItem.qml:38 -#, fuzzy -#| msgid "" -#| "Click on the button, then enter the shortcut like you would in the " -#| "program.\n" -#| "Example for Ctrl+a: hold the Ctrl key and press a." msgid "" "Click on the button, then enter the shortcut like you would in the program.\n" "Example for Ctrl+A: hold the Ctrl key and press A." msgstr "" "Click on the button, then enter the shortcut like you would in the program.\n" -"Example for Ctrl+a: hold the Ctrl key and press a." +"Example for Ctrl+A: hold the Ctrl key and press A." #: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:275 msgid "Reserved Shortcut" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdeclarative-4.100.0/po/id/kdeclarative5.po new/kdeclarative-5.0.0/po/id/kdeclarative5.po --- old/kdeclarative-4.100.0/po/id/kdeclarative5.po 2014-06-01 14:12:52.000000000 +0200 +++ new/kdeclarative-5.0.0/po/id/kdeclarative5.po 2014-07-01 20:28:44.000000000 +0200 @@ -8,7 +8,7 @@ "Project-Id-Version: kdelibs4\n" "Report-Msgid-Bugs-To: http://bugs.kde.org\n" "POT-Creation-Date: 2014-04-27 20:57+0000\n" -"PO-Revision-Date: 2014-02-04 20:08+0700\n" +"PO-Revision-Date: 2014-06-23 21:09+0700\n" "Last-Translator: Andhika Padmawan <[email protected]>\n" "Language-Team: Indonesian <[email protected]>\n" "Language: id\n" @@ -18,18 +18,13 @@ "Plural-Forms: nplurals=1; plural=0;\n" #: qmlcontrols/kquickcontrols/KeySequenceItem.qml:38 -#, fuzzy -#| msgid "" -#| "Click on the button, then enter the shortcut like you would in the " -#| "program.\n" -#| "Example for Ctrl+a: hold the Ctrl key and press a." msgid "" "Click on the button, then enter the shortcut like you would in the program.\n" "Example for Ctrl+A: hold the Ctrl key and press A." msgstr "" "Klik pada tombol, lalu masukkan jalan pintas seperti yang anda inginkan di " "program.\n" -"Misalnya untuk Ctrl+a: tahan tombol Ctrl lalu tekan a." +"Misalnya untuk Ctrl+A: tahan tombol Ctrl lalu tekan A." #: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:275 msgid "Reserved Shortcut" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdeclarative-4.100.0/po/nds/kdeclarative5.po new/kdeclarative-5.0.0/po/nds/kdeclarative5.po --- old/kdeclarative-4.100.0/po/nds/kdeclarative5.po 2014-06-01 14:12:52.000000000 +0200 +++ new/kdeclarative-5.0.0/po/nds/kdeclarative5.po 2014-07-01 20:28:44.000000000 +0200 @@ -16,7 +16,7 @@ "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Lokalize 1.4\n" +"X-Generator: Lokalize 1.5\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" #: qmlcontrols/kquickcontrols/KeySequenceItem.qml:38 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdeclarative-4.100.0/po/ru/kdeclarative5.po new/kdeclarative-5.0.0/po/ru/kdeclarative5.po --- old/kdeclarative-4.100.0/po/ru/kdeclarative5.po 2014-06-01 14:12:52.000000000 +0200 +++ new/kdeclarative-5.0.0/po/ru/kdeclarative5.po 2014-07-01 20:28:44.000000000 +0200 @@ -19,7 +19,7 @@ "Project-Id-Version: kdelibs4\n" "Report-Msgid-Bugs-To: http://bugs.kde.org\n" "POT-Creation-Date: 2014-04-27 20:57+0000\n" -"PO-Revision-Date: 2014-02-05 03:50+0400\n" +"PO-Revision-Date: 2014-06-30 00:01+0400\n" "Last-Translator: Alexander Potashev <[email protected]>\n" "Language-Team: Russian <[email protected]>\n" "Language: ru\n" @@ -34,11 +34,6 @@ "X-Text-Markup: kde4\n" #: qmlcontrols/kquickcontrols/KeySequenceItem.qml:38 -#, fuzzy -#| msgid "" -#| "Click on the button, then enter the shortcut like you would in the " -#| "program.\n" -#| "Example for Ctrl+a: hold the Ctrl key and press a." msgid "" "Click on the button, then enter the shortcut like you would in the program.\n" "Example for Ctrl+A: hold the Ctrl key and press A." diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdeclarative-4.100.0/po/sl/kdeclarative5.po new/kdeclarative-5.0.0/po/sl/kdeclarative5.po --- old/kdeclarative-4.100.0/po/sl/kdeclarative5.po 2014-06-01 14:12:52.000000000 +0200 +++ new/kdeclarative-5.0.0/po/sl/kdeclarative5.po 2014-07-01 20:28:44.000000000 +0200 @@ -11,13 +11,13 @@ # Andrej Vernekar <[email protected]>, 2005, 2007, 2008, 2009, 2010. # Jure Repinc <[email protected]>, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013. # Andrej Vernekar <[email protected]>, 2008, 2011, 2012. -# Andrej Mernik <[email protected]>, 2012, 2013. +# Andrej Mernik <[email protected]>, 2012, 2013, 2014. msgid "" msgstr "" "Project-Id-Version: kdelibs4\n" "Report-Msgid-Bugs-To: http://bugs.kde.org\n" "POT-Creation-Date: 2014-04-27 20:57+0000\n" -"PO-Revision-Date: 2013-11-26 18:31+0100\n" +"PO-Revision-Date: 2014-06-12 14:27+0200\n" "Last-Translator: Andrej Mernik <[email protected]>\n" "Language-Team: Slovenian <[email protected]>\n" "Language: sl\n" @@ -29,11 +29,6 @@ "%100==4 ? 3 : 0);\n" #: qmlcontrols/kquickcontrols/KeySequenceItem.qml:38 -#, fuzzy -#| msgid "" -#| "Click on the button, then enter the shortcut like you would in the " -#| "program.\n" -#| "Example for Ctrl+a: hold the Ctrl key and press a." msgid "" "Click on the button, then enter the shortcut like you would in the program.\n" "Example for Ctrl+A: hold the Ctrl key and press A." diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdeclarative-4.100.0/po/uk/kdeclarative5.po new/kdeclarative-5.0.0/po/uk/kdeclarative5.po --- old/kdeclarative-4.100.0/po/uk/kdeclarative5.po 2014-06-01 14:12:52.000000000 +0200 +++ new/kdeclarative-5.0.0/po/uk/kdeclarative5.po 2014-07-01 20:28:44.000000000 +0200 @@ -1,5 +1,7 @@ -# translation of kdelibs4.po to Ukrainian -# Translation of kdelibs4.po to Ukrainian +# Translation of kdeclarative5.po to Ukrainian +# Copyright (C) 2014 This_file_is_part_of_KDE +# This file is distributed under the license LGPL version 2.1 or +# version 3 or later versions approved by the membership of KDE e.V. # # Eugene Onischenko <[email protected]>, 2002, 2003, 2004, 2005, 2006. # Andriy Rysin <[email protected]>, 2002, 2003, 2006, 2007. @@ -7,7 +9,7 @@ # Yuri Chornoivan <[email protected]>, 2008, 2009, 2010, 2011, 2012, 2013, 2014. msgid "" msgstr "" -"Project-Id-Version: kdelibs4\n" +"Project-Id-Version: kdeclarative5\n" "Report-Msgid-Bugs-To: http://bugs.kde.org\n" "POT-Creation-Date: 2014-04-27 20:57+0000\n" "PO-Revision-Date: 2014-04-03 08:08+0300\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdeclarative-4.100.0/src/kdeclarative/kdeclarative.cpp new/kdeclarative-5.0.0/src/kdeclarative/kdeclarative.cpp --- old/kdeclarative-4.100.0/src/kdeclarative/kdeclarative.cpp 2014-06-01 14:12:52.000000000 +0200 +++ new/kdeclarative-5.0.0/src/kdeclarative/kdeclarative.cpp 2014-07-01 20:28:44.000000000 +0200 @@ -39,7 +39,8 @@ QStringList KDeclarativePrivate::s_runtimePlatform; KDeclarativePrivate::KDeclarativePrivate() - : initialized(false) + : initialized(false), + contextObj(0) { } @@ -86,8 +87,14 @@ /*Create a context object for the root qml context. in this way we can register global functions, in this case the i18n() family*/ - RootContext *contextObj = new RootContext(d->declarativeEngine.data()); - d->declarativeEngine.data()->rootContext()->setContextObject(contextObj); + if (!d->contextObj) { + d->contextObj = new RootContext(d->declarativeEngine.data()); + } + d->declarativeEngine.data()->rootContext()->setContextObject(d->contextObj); + + if (!d->translationDomain.isNull()) { + d->contextObj->setProperty("translationDomain", d->translationDomain); + } /* Tell the engine to search for platform-specific imports first (so it will "win" in import name resolution). @@ -111,6 +118,19 @@ d->declarativeEngine.data()->addImageProvider(QString(QStringLiteral("icon")), new KIconProvider); } +void KDeclarative::setTranslationDomain(const QString &translationDomain) +{ + d->translationDomain = translationDomain; + if (d->contextObj) { + d->contextObj->setProperty("translationDomain", d->translationDomain); + } +} + +QString KDeclarative::translationDomain() const +{ + return d->translationDomain; +} + void KDeclarative::setupQmlJsDebugger() { if (QCoreApplication::arguments().contains(QLatin1String("-qmljsdebugger"))) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdeclarative-4.100.0/src/kdeclarative/kdeclarative.h new/kdeclarative-5.0.0/src/kdeclarative/kdeclarative.h --- old/kdeclarative-4.100.0/src/kdeclarative/kdeclarative.h 2014-06-01 14:12:52.000000000 +0200 +++ new/kdeclarative-5.0.0/src/kdeclarative/kdeclarative.h 2014-07-01 20:28:44.000000000 +0200 @@ -54,6 +54,30 @@ QQmlEngine *declarativeEngine() const; /** + * Call this method before calling setupBindings to install a translation domain for all + * i18n global functions. If a translation domain is set all i18n calls delegate to the + * matching i18nd calls with the provided translation domain. + * + * The translationDomain affects all i18n calls including those from imports. Because of + * that modules intended to be used as imports should prefer the i18nd variants and set + * the translation domain explicitly in each call. + * + * This method is only required if your declarative usage is inside a library. If it's + * in an application there is no need to set the translation domain as the application's + * domain can be used. + * + * @param translationDomain The translation domain to be used for i18n calls. + * @since 5.0 + */ + void setTranslationDomain(const QString &translationDomain); + + /** + * @return the translation domain for the i18n calls done in this QML engine + * @since 5.0 + */ + QString translationDomain() const; + + /** * This method must be called very early at startup time to ensure the * QQuickDebugger is enabled. Ideally it should be called in main(), * after command-line options are defined. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdeclarative-4.100.0/src/kdeclarative/private/kdeclarative_p.h new/kdeclarative-5.0.0/src/kdeclarative/private/kdeclarative_p.h --- old/kdeclarative-4.100.0/src/kdeclarative/private/kdeclarative_p.h 2014-06-01 14:12:52.000000000 +0200 +++ new/kdeclarative-5.0.0/src/kdeclarative/private/kdeclarative_p.h 2014-07-01 20:28:44.000000000 +0200 @@ -21,6 +21,7 @@ #define KDECLARATIVE_P_H #include "kdeclarative.h" +#include "rootcontext_p.h" #include <QtCore/QPointer> @@ -33,7 +34,9 @@ QPointer<QQmlEngine> declarativeEngine; bool initialized; + QString translationDomain; static QStringList s_runtimePlatform; + QPointer<RootContext> contextObj; }; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdeclarative-4.100.0/src/kdeclarative/private/rootcontext.cpp new/kdeclarative-5.0.0/src/kdeclarative/private/rootcontext.cpp --- old/kdeclarative-4.100.0/src/kdeclarative/private/rootcontext.cpp 2014-06-01 14:12:52.000000000 +0200 +++ new/kdeclarative-5.0.0/src/kdeclarative/private/rootcontext.cpp 2014-07-01 20:28:44.000000000 +0200 @@ -44,7 +44,12 @@ return QString(); } - KLocalizedString trMessage = ki18n(message.toUtf8().constData()); + 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); @@ -87,7 +92,12 @@ return QString(); } - KLocalizedString trMessage = ki18nc(context.toUtf8().constData(), message.toUtf8().constData()); + 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); @@ -130,7 +140,12 @@ return QString(); } - KLocalizedString trMessage = ki18np(singular.toUtf8().constData(), plural.toUtf8().constData()); + 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; @@ -179,7 +194,196 @@ return QString(); } - KLocalizedString trMessage = ki18ncp(context.toUtf8().constData(), singular.toUtf8().constData(), plural.toUtf8().constData()); + 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; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdeclarative-4.100.0/src/kdeclarative/private/rootcontext_p.h new/kdeclarative-5.0.0/src/kdeclarative/private/rootcontext_p.h --- old/kdeclarative-4.100.0/src/kdeclarative/private/rootcontext_p.h 2014-06-01 14:12:52.000000000 +0200 +++ new/kdeclarative-5.0.0/src/kdeclarative/private/rootcontext_p.h 2014-07-01 20:28:44.000000000 +0200 @@ -27,6 +27,7 @@ class RootContext : public QObject { Q_OBJECT + Q_PROPERTY(QString translationDomain MEMBER m_translationDomain NOTIFY translationDomainChanged) public: RootContext(QObject *parent = 0); @@ -39,6 +40,20 @@ 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; }; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdeclarative-4.100.0/src/kdeclarative/qmlobject.cpp new/kdeclarative-5.0.0/src/kdeclarative/qmlobject.cpp --- old/kdeclarative-4.100.0/src/kdeclarative/qmlobject.cpp 2014-06-01 14:12:52.000000000 +0200 +++ new/kdeclarative-5.0.0/src/kdeclarative/qmlobject.cpp 2014-07-01 20:28:44.000000000 +0200 @@ -88,6 +88,7 @@ QmlObjectIncubator incubator; QQmlComponent *component; QTimer *executionEndTimer; + KDeclarative kdeclarative; bool delay : 1; }; @@ -117,12 +118,6 @@ component = new QQmlComponent(engine, q); delete incubator.object(); - KDeclarative kdeclarative; - kdeclarative.setDeclarativeEngine(engine); - - //binds things like kconfig and icons - kdeclarative.setupBindings(); - component->loadUrl(source); if (delay) { @@ -146,6 +141,9 @@ d(new QmlObjectPrivate(this)) { d->engine = new QQmlEngine(this); + d->kdeclarative.setDeclarativeEngine(d->engine); + //binds things like kconfig and icons + d->kdeclarative.setupBindings(); d->engine->setIncubationController(new QmlObjectIncubationController(0)); } @@ -159,6 +157,9 @@ d->engine = new QQmlEngine(this); d->engine->setIncubationController(new QmlObjectIncubationController(0)); } + d->kdeclarative.setDeclarativeEngine(d->engine); + //binds things like kconfig and icons + d->kdeclarative.setupBindings(); } QmlObject::~QmlObject() @@ -169,6 +170,16 @@ delete d; } +void QmlObject::setTranslationDomain(const QString &translationDomain) +{ + d->kdeclarative.setTranslationDomain(translationDomain); +} + +QString QmlObject::translationDomain() const +{ + return d->kdeclarative.translationDomain(); +} + void QmlObject::setSource(const QUrl &source) { d->source = source; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdeclarative-4.100.0/src/kdeclarative/qmlobject.h new/kdeclarative-5.0.0/src/kdeclarative/qmlobject.h --- old/kdeclarative-4.100.0/src/kdeclarative/qmlobject.h 2014-06-01 14:12:52.000000000 +0200 +++ new/kdeclarative-5.0.0/src/kdeclarative/qmlobject.h 2014-07-01 20:28:44.000000000 +0200 @@ -55,6 +55,7 @@ Q_OBJECT Q_PROPERTY(QUrl source READ source WRITE setSource) + Q_PROPERTY(QString translationDomain READ translationDomain WRITE setTranslationDomain) Q_PROPERTY(bool initializationDelayed READ isInitializationDelayed WRITE setInitializationDelayed) Q_PROPERTY(QObject *rootObject READ rootObject) @@ -77,6 +78,30 @@ ~QmlObject(); /** + * Call this method before calling setupBindings to install a translation domain for all + * i18n global functions. If a translation domain is set all i18n calls delegate to the + * matching i18nd calls with the provided translation domain. + * + * The translationDomain affects all i18n calls including those from imports. Because of + * that modules intended to be used as imports should prefer the i18nd variants and set + * the translation domain explicitly in each call. + * + * This method is only required if your declarative usage is inside a library. If it's + * in an application there is no need to set the translation domain as the application's + * domain can be used. + * + * @param translationDomain The translation domain to be used for i18n calls. + * @since 5.0 + */ + void setTranslationDomain(const QString &translationDomain); + + /** + * @return the translation domain for the i18n calls done in this QML engine + * @since 5.0 + */ + QString translationDomain() const; + + /** * Sets the path of the QML file to parse and execute * * @param path the absolute path of a QML file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdeclarative-4.100.0/src/qmlcontrols/draganddrop/DeclarativeDragArea.cpp new/kdeclarative-5.0.0/src/qmlcontrols/draganddrop/DeclarativeDragArea.cpp --- old/kdeclarative-4.100.0/src/qmlcontrols/draganddrop/DeclarativeDragArea.cpp 2014-06-01 14:12:52.000000000 +0200 +++ new/kdeclarative-5.0.0/src/qmlcontrols/draganddrop/DeclarativeDragArea.cpp 2014-07-01 20:28:44.000000000 +0200 @@ -203,11 +203,14 @@ { m_buttonDownPos = event->screenPos(); m_draggingJustStarted = true; + setKeepMouseGrab(true); } void DeclarativeDragArea::mouseReleaseEvent(QMouseEvent* event) { m_draggingJustStarted = false; + setKeepMouseGrab(false); + ungrabMouse(); } void DeclarativeDragArea::mouseMoveEvent(QMouseEvent *event) @@ -219,6 +222,7 @@ } if (m_draggingJustStarted) { + grabMouse(); m_draggingJustStarted = false; //qDebug() << "************ DDDD new QDrag" << objectName(); QDrag *drag = new QDrag(parent()); @@ -300,7 +304,9 @@ emit dragStarted(); Qt::DropAction action = drag->exec(m_supportedActions, m_defaultAction); + setKeepMouseGrab(false); emit drop(action); + ungrabMouse(); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdeclarative-4.100.0/src/qmlcontrols/kcoreaddons/kcoreaddonsplugin.cpp new/kdeclarative-5.0.0/src/qmlcontrols/kcoreaddons/kcoreaddonsplugin.cpp --- old/kdeclarative-4.100.0/src/qmlcontrols/kcoreaddons/kcoreaddonsplugin.cpp 2014-06-01 14:12:52.000000000 +0200 +++ new/kdeclarative-5.0.0/src/qmlcontrols/kcoreaddons/kcoreaddonsplugin.cpp 2014-07-01 20:28:44.000000000 +0200 @@ -1,5 +1,6 @@ /* * Copyright 2014 Bhushan Shah <[email protected]> + * Copyright 2014 David Edmundson <[email protected]> * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -24,10 +25,18 @@ #include "formats.h" +static QObject *formats_singletontype_provider(QQmlEngine *engine, QJSEngine *scriptEngine) +{ + Q_UNUSED(engine) + Q_UNUSED(scriptEngine) + + return new Formats(); +} + void KCoreAddonsPlugin::registerTypes(const char *uri) { Q_ASSERT(uri == QLatin1String("org.kde.kcoreaddons")); - qmlRegisterType<Formats>(uri, 1, 0, "Formats"); + qmlRegisterSingletonType<Formats>(uri, 1, 0, "Format", formats_singletontype_provider); qRegisterMetaType<QLocale::FormatType>(); } \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdeclarative-4.100.0/src/qmlcontrols/kquickcontrols/private/keysequencehelper.cpp new/kdeclarative-5.0.0/src/qmlcontrols/kquickcontrols/private/keysequencehelper.cpp --- old/kdeclarative-4.100.0/src/qmlcontrols/kquickcontrols/private/keysequencehelper.cpp 2014-06-01 14:12:52.000000000 +0200 +++ new/kdeclarative-5.0.0/src/qmlcontrols/kquickcontrols/private/keysequencehelper.cpp 2014-07-01 20:28:44.000000000 +0200 @@ -426,6 +426,8 @@ case Qt::Key_Control: case Qt::Key_Alt: case Qt::Key_Meta: + case Qt::Key_Super_L: + case Qt::Key_Super_R: case Qt::Key_Menu: //unused (yes, but why?) d->controlModifierlessTimout(); d->updateShortcutDisplay(); @@ -486,6 +488,10 @@ //static QKeySequence KeySequenceHelperPrivate::appendToSequence(const QKeySequence &seq, int keyQt) { + if (seq.matches(keyQt) != QKeySequence::NoMatch) { + return seq; + } + switch (seq.count()) { case 0: return QKeySequence(keyQt); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdeclarative-4.100.0/src/qmlcontrols/kquickcontrolsaddons/qimageitem.cpp new/kdeclarative-5.0.0/src/qmlcontrols/kquickcontrolsaddons/qimageitem.cpp --- old/kdeclarative-4.100.0/src/qmlcontrols/kquickcontrolsaddons/qimageitem.cpp 2014-06-01 14:12:52.000000000 +0200 +++ new/kdeclarative-5.0.0/src/qmlcontrols/kquickcontrolsaddons/qimageitem.cpp 2014-07-01 20:28:44.000000000 +0200 @@ -53,6 +53,11 @@ return m_image; } +void QImageItem::resetImage() +{ + setImage(QImage()); +} + void QImageItem::setSmooth(const bool smooth) { if (smooth == m_smooth) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdeclarative-4.100.0/src/qmlcontrols/kquickcontrolsaddons/qimageitem.h new/kdeclarative-5.0.0/src/qmlcontrols/kquickcontrolsaddons/qimageitem.h --- old/kdeclarative-4.100.0/src/qmlcontrols/kquickcontrolsaddons/qimageitem.h 2014-06-01 14:12:52.000000000 +0200 +++ new/kdeclarative-5.0.0/src/qmlcontrols/kquickcontrolsaddons/qimageitem.h 2014-07-01 20:28:44.000000000 +0200 @@ -26,7 +26,7 @@ { Q_OBJECT - Q_PROPERTY(QImage image READ image WRITE setImage NOTIFY imageChanged) + Q_PROPERTY(QImage image READ image WRITE setImage NOTIFY imageChanged RESET resetImage) Q_PROPERTY(bool smooth READ smooth WRITE setSmooth) Q_PROPERTY(int nativeWidth READ nativeWidth NOTIFY nativeWidthChanged) Q_PROPERTY(int nativeHeight READ nativeHeight NOTIFY nativeHeightChanged) @@ -49,6 +49,7 @@ void setImage(const QImage &image); QImage image() const; + void resetImage(); void setSmooth(const bool smooth); bool smooth() const; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdeclarative-4.100.0/src/qmlcontrols/kquickcontrolsaddons/qpixmapitem.cpp new/kdeclarative-5.0.0/src/qmlcontrols/kquickcontrolsaddons/qpixmapitem.cpp --- old/kdeclarative-4.100.0/src/qmlcontrols/kquickcontrolsaddons/qpixmapitem.cpp 2014-06-01 14:12:52.000000000 +0200 +++ new/kdeclarative-5.0.0/src/qmlcontrols/kquickcontrolsaddons/qpixmapitem.cpp 2014-07-01 20:28:44.000000000 +0200 @@ -53,6 +53,11 @@ return m_pixmap; } +void QPixmapItem::resetPixmap() +{ + setPixmap(QPixmap()); +} + void QPixmapItem::setSmooth(const bool smooth) { if (smooth == m_smooth) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdeclarative-4.100.0/src/qmlcontrols/kquickcontrolsaddons/qpixmapitem.h new/kdeclarative-5.0.0/src/qmlcontrols/kquickcontrolsaddons/qpixmapitem.h --- old/kdeclarative-4.100.0/src/qmlcontrols/kquickcontrolsaddons/qpixmapitem.h 2014-06-01 14:12:52.000000000 +0200 +++ new/kdeclarative-5.0.0/src/qmlcontrols/kquickcontrolsaddons/qpixmapitem.h 2014-07-01 20:28:44.000000000 +0200 @@ -26,7 +26,7 @@ { Q_OBJECT - Q_PROPERTY(QPixmap pixmap READ pixmap WRITE setPixmap NOTIFY pixmapChanged) + Q_PROPERTY(QPixmap pixmap READ pixmap WRITE setPixmap NOTIFY pixmapChanged RESET resetPixmap) Q_PROPERTY(bool smooth READ smooth WRITE setSmooth) Q_PROPERTY(int nativeWidth READ nativeWidth NOTIFY nativeWidthChanged) Q_PROPERTY(int nativeHeight READ nativeHeight NOTIFY nativeHeightChanged) @@ -49,6 +49,7 @@ void setPixmap(const QPixmap &pixmap); QPixmap pixmap() const; + void resetPixmap(); void setSmooth(const bool smooth); bool smooth() const; -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
