Hello community, here is the log from the commit of package kdeclarative for openSUSE:Factory checked in at 2014-06-10 14:37:19 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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-05-14 20:26:55.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.kdeclarative.new/kdeclarative.changes 2014-06-10 14:37:52.000000000 +0200 @@ -1,0 +2,11 @@ +Sun Jun 1 18:02:34 UTC 2014 - hrvoje.sen...@gmail.com + +- Update to 4.100.0 + * API improvements and cleanups + * Buildsystem fixes + * For more details please see: + http://www.kde.org/announcements/announce-frameworks5-beta3.php +- Add baselibs.conf +- Add af7c0f8194.patch, to improve QML translation API + +------------------------------------------------------------------- Old: ---- kdeclarative-4.99.0.tar.xz New: ---- af7c0f8194.patch baselibs.conf kdeclarative-4.100.0.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kdeclarative.spec ++++++ --- /var/tmp/diff_new_pack.NugLbd/_old 2014-06-10 14:37:52.000000000 +0200 +++ /var/tmp/diff_new_pack.NugLbd/_new 2014-06-10 14:37:52.000000000 +0200 @@ -18,10 +18,10 @@ %define lname libKF5Declarative5 Name: kdeclarative -Version: 4.99.0 +Version: 4.100.0 Release: 0 BuildRequires: cmake >= 2.8.12 -BuildRequires: extra-cmake-modules >= 0.0.13 +BuildRequires: extra-cmake-modules >= 0.0.14 BuildRequires: fdupes BuildRequires: kconfig-devel >= %{_kf5_version} BuildRequires: kcoreaddons-devel >= %{_kf5_version} @@ -42,7 +42,10 @@ License: LGPL-2.1+ Group: System/GUI/KDE Url: http://www.kde.org -Source0: kdeclarative-%{version}.tar.xz +Source: http://download.kde.org/unstable/frameworks/%{version}/%{name}-%{version}.tar.xz +Source1: baselibs.conf +# PATCH-FIX-UPSTREAM af7c0f8194.patch +Patch0: af7c0f8194.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -51,6 +54,7 @@ %package -n %lname Summary: Integration of QML and KDE workspaces Group: System/GUI/KDE +Recommends: %lname-lang = %{version} %description -n %lname KDeclarative provides integration of QML and KDE workspaces. @@ -66,8 +70,10 @@ KDeclarative provides integration of QML and KDE workspaces. Development files. +%lang_package -n %lname %prep %setup -q +%patch0 -p1 %build %cmake_kf5 -d build @@ -77,10 +83,14 @@ %kf5_makeinstall -C build %fdupes -s %{buildroot} + %find_lang %{name}5 + %post -n %lname -p /sbin/ldconfig %postun -n %lname -p /sbin/ldconfig +%files -n %lname-lang -f %{name}5.lang + %files -n %lname %defattr(-,root,root) %doc COPYING* README* ++++++ af7c0f8194.patch ++++++ diff --git a/src/kdeclarative/kdeclarative.cpp b/src/kdeclarative/kdeclarative.cpp index a35dac5..b3906e2 100644 --- a/src/kdeclarative/kdeclarative.cpp +++ b/src/kdeclarative/kdeclarative.cpp @@ -39,7 +39,8 @@ namespace KDeclarative { QStringList KDeclarativePrivate::s_runtimePlatform; KDeclarativePrivate::KDeclarativePrivate() - : initialized(false) + : initialized(false), + contextObj(0) { } @@ -86,8 +87,14 @@ void KDeclarative::setupBindings() /*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 @@ void KDeclarative::setupBindings() 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 --git a/src/kdeclarative/kdeclarative.h b/src/kdeclarative/kdeclarative.h index b4a274b..1d21964 100644 --- a/src/kdeclarative/kdeclarative.h +++ b/src/kdeclarative/kdeclarative.h @@ -54,6 +54,30 @@ public: 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 --git a/src/kdeclarative/private/kdeclarative_p.h b/src/kdeclarative/private/kdeclarative_p.h index 6b61d12..7ef9d0a 100644 --- a/src/kdeclarative/private/kdeclarative_p.h +++ b/src/kdeclarative/private/kdeclarative_p.h @@ -21,6 +21,7 @@ #define KDECLARATIVE_P_H #include "kdeclarative.h" +#include "rootcontext_p.h" #include <QtCore/QPointer> @@ -33,7 +34,9 @@ public: QPointer<QQmlEngine> declarativeEngine; bool initialized; + QString translationDomain; static QStringList s_runtimePlatform; + QPointer<RootContext> contextObj; }; } diff --git a/src/kdeclarative/private/rootcontext.cpp b/src/kdeclarative/private/rootcontext.cpp index 1230666..d88b566 100644 --- a/src/kdeclarative/private/rootcontext.cpp +++ b/src/kdeclarative/private/rootcontext.cpp @@ -44,7 +44,12 @@ QString RootContext::i18n(const QString &message, const QString ¶m1, const Q 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 @@ QString RootContext::i18nc(const QString &context, const QString &message, const 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 @@ QString RootContext::i18np(const QString &singular, const QString &plural, const 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 @@ QString RootContext::i18ncp(const QString &context, const QString &singular, con 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 --git a/src/kdeclarative/private/rootcontext_p.h b/src/kdeclarative/private/rootcontext_p.h index 16694b1..94df09f 100644 --- a/src/kdeclarative/private/rootcontext_p.h +++ b/src/kdeclarative/private/rootcontext_p.h @@ -27,6 +27,7 @@ namespace KDeclarative { class RootContext : public QObject { Q_OBJECT + Q_PROPERTY(QString translationDomain MEMBER m_translationDomain NOTIFY translationDomainChanged) public: RootContext(QObject *parent = 0); @@ -39,6 +40,20 @@ public: 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 --git a/src/kdeclarative/qmlobject.cpp b/src/kdeclarative/qmlobject.cpp index ca13097..029edaf 100644 --- a/src/kdeclarative/qmlobject.cpp +++ b/src/kdeclarative/qmlobject.cpp @@ -88,6 +88,7 @@ public: QmlObjectIncubator incubator; QQmlComponent *component; QTimer *executionEndTimer; + KDeclarative kdeclarative; bool delay : 1; }; @@ -117,12 +118,6 @@ void QmlObjectPrivate::execute(const QUrl &source) 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 @@ QmlObject::QmlObject(QObject *parent) 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 @@ QmlObject::QmlObject(QQmlEngine *engine, QObject *parent) 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 @@ QmlObject::~QmlObject() 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 --git a/src/kdeclarative/qmlobject.h b/src/kdeclarative/qmlobject.h index 2da6c9c..cd74829 100644 --- a/src/kdeclarative/qmlobject.h +++ b/src/kdeclarative/qmlobject.h @@ -55,6 +55,7 @@ class KDECLARATIVE_EXPORT QmlObject : public QObject 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 @@ public: ~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 --git a/src/qmlcontrols/kcoreaddons/kcoreaddonsplugin.cpp b/src/qmlcontrols/kcoreaddons/kcoreaddonsplugin.cpp index 65dd75f..3c1a96e 100644 --- a/src/qmlcontrols/kcoreaddons/kcoreaddonsplugin.cpp +++ b/src/qmlcontrols/kcoreaddons/kcoreaddonsplugin.cpp @@ -1,5 +1,6 @@ /* * Copyright 2014 Bhushan Shah <bhus...@gmail.com> + * Copyright 2014 David Edmundson <davidedmund...@kde.org> * * 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 ++++++ baselibs.conf ++++++ libKF5Declarative5 kdeclarative-devel requires "libKF5Declarative5-<targettype> = <version>" ++++++ kdeclarative-4.99.0.tar.xz -> kdeclarative-4.100.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdeclarative-4.99.0/CMakeLists.txt new/kdeclarative-4.100.0/CMakeLists.txt --- old/kdeclarative-4.99.0/CMakeLists.txt 2014-05-05 02:18:55.000000000 +0200 +++ new/kdeclarative-4.100.0/CMakeLists.txt 2014-06-01 14:12:52.000000000 +0200 @@ -3,12 +3,12 @@ project(KDeclarative) # Dependencies -find_package(ECM 0.0.13 REQUIRED NO_MODULE) +find_package(ECM 0.0.14 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.99.0") # handled by release scripts -set(KF5_DEP_VERSION "4.99.0") # handled by release scripts +set(KF5_VERSION "4.100.0") # handled by release scripts +set(KF5_DEP_VERSION "4.100.0") # handled by release scripts find_package(Qt5 ${REQUIRED_QT_VERSION} NO_MODULE REQUIRED Qml Quick Gui) include(KDEInstallDirs) @@ -60,6 +60,9 @@ # Subdirectories add_definitions(-DTRANSLATION_DOMAIN=\"kdeclarative5\") +if (IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/po") + ki18n_install(po) +endif() add_subdirectory(autotests) add_subdirectory(src) if(KF5Config_FOUND AND KF5I18n_FOUND AND KF5IconThemes_FOUND AND KF5KIO_FOUND) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdeclarative-4.99.0/autotests/CMakeLists.txt new/kdeclarative-4.100.0/autotests/CMakeLists.txt --- old/kdeclarative-4.99.0/autotests/CMakeLists.txt 2014-05-05 02:18:55.000000000 +0200 +++ new/kdeclarative-4.100.0/autotests/CMakeLists.txt 2014-06-01 14:12:52.000000000 +0200 @@ -1,18 +1,12 @@ INCLUDE_DIRECTORIES("${CMAKE_CURRENT_SOURCE_DIR}/..") -include(ECMMarkAsTest) +include(ECMAddTests) find_package(Qt5Test REQUIRED) -add_executable(fullmodelaccesstest - columnproxymodeltest.cpp +ecm_add_test(columnproxymodeltest.cpp ../src/qmlcontrols/kquickcontrolsaddons/columnproxymodel.cpp modeltest.cpp -) -target_link_libraries(fullmodelaccesstest - Qt5::Gui - Qt5::Test - ) + TEST_NAME fullmodelaccesstest + LINK_LIBRARIES Qt5::Gui Qt5::Test) -add_test(fullmodelaccesstest fullmodelaccesstest) -ecm_mark_as_test(fullmodelaccesstest) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdeclarative-4.99.0/po/gl/kdeclarative5.po new/kdeclarative-4.100.0/po/gl/kdeclarative5.po --- old/kdeclarative-4.99.0/po/gl/kdeclarative5.po 2014-05-05 02:18:55.000000000 +0200 +++ new/kdeclarative-4.100.0/po/gl/kdeclarative5.po 2014-06-01 14:12:52.000000000 +0200 @@ -14,9 +14,9 @@ "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-01-06 15:27+0100\n" +"PO-Revision-Date: 2014-05-12 23:24+0200\n" "Last-Translator: Marce Villarino <mvillar...@kde-espana.org>\n" -"Language-Team: Galician <proxe...@trasno.net>\n" +"Language-Team: Galician <kde-i18n-...@kde.org>\n" "Language: gl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -28,17 +28,12 @@ "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." msgstr "" -"Prema o botón indique despois o atallo que desexe ter no programa.\n" -"Exemplo para Ctrl+a: manteña premida a tecla Ctrl e prema a." +"Prema no botón, logo indique o atallo que desexe ter no programa.\n" +"Exemplo para Ctrl+A: manteña premida a tecla Ctrl e prema A." #: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:275 msgid "Reserved Shortcut" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdeclarative-4.99.0/po/nds/kdeclarative5.po new/kdeclarative-4.100.0/po/nds/kdeclarative5.po --- old/kdeclarative-4.99.0/po/nds/kdeclarative5.po 2014-05-05 02:18:55.000000000 +0200 +++ new/kdeclarative-4.100.0/po/nds/kdeclarative5.po 2014-06-01 14:12:52.000000000 +0200 @@ -9,7 +9,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-03-31 23:29+0200\n" +"PO-Revision-Date: 2014-05-11 00:55+0200\n" "Last-Translator: Sönke Dibbern <s_dibb...@web.de>\n" "Language-Team: Low Saxon <kde-i18n-...@kde.org>\n" "Language: nds\n" @@ -53,7 +53,7 @@ "some applications use.\n" "Do you really want to use it as a global shortcut as well?" msgstr "" -"De Kombinatschoon \"%1\" höört al de Standardakschoon \"%2\" to, de en Reeg " +"De Kombinatschoon „%1“ höört al de Standardakschoon „%2“ to, de en Reeg " "Programmen bruukt.\n" "Wullt Du ehr redig as en globaal Tastkombinatschoon bruken?" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdeclarative-4.99.0/po/sr/kdeclarative5.po new/kdeclarative-4.100.0/po/sr/kdeclarative5.po --- old/kdeclarative-4.99.0/po/sr/kdeclarative5.po 2014-05-05 02:18:55.000000000 +0200 +++ new/kdeclarative-4.100.0/po/sr/kdeclarative5.po 2014-06-01 14:12:52.000000000 +0200 @@ -36,8 +36,8 @@ #: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:276 msgid "" -"The F12 key is reserved on Windows, so cannot be used for a global " -"shortcut.\n" +"The F12 key is reserved on Windows, so cannot be used for a global shortcut." +"\n" "Please choose another one." msgstr "" "Тастер F12 је резервисан на Виндоузу, па се не може користити као глобална " diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdeclarative-4.99.0/po/sr@ijekavian/kdeclarative5.po new/kdeclarative-4.100.0/po/sr@ijekavian/kdeclarative5.po --- old/kdeclarative-4.99.0/po/sr@ijekavian/kdeclarative5.po 2014-05-05 02:18:55.000000000 +0200 +++ new/kdeclarative-4.100.0/po/sr@ijekavian/kdeclarative5.po 2014-06-01 14:12:52.000000000 +0200 @@ -35,8 +35,8 @@ #: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:276 msgid "" -"The F12 key is reserved on Windows, so cannot be used for a global " -"shortcut.\n" +"The F12 key is reserved on Windows, so cannot be used for a global shortcut." +"\n" "Please choose another one." msgstr "" "Тастер F12 је резервисан на Виндоузу, па се не може користити као глобална " diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdeclarative-4.99.0/po/sr@ijekavianlatin/kdeclarative5.po new/kdeclarative-4.100.0/po/sr@ijekavianlatin/kdeclarative5.po --- old/kdeclarative-4.99.0/po/sr@ijekavianlatin/kdeclarative5.po 2014-05-05 02:18:55.000000000 +0200 +++ new/kdeclarative-4.100.0/po/sr@ijekavianlatin/kdeclarative5.po 2014-06-01 14:12:52.000000000 +0200 @@ -35,8 +35,8 @@ #: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:276 msgid "" -"The F12 key is reserved on Windows, so cannot be used for a global " -"shortcut.\n" +"The F12 key is reserved on Windows, so cannot be used for a global shortcut." +"\n" "Please choose another one." msgstr "" "Taster F12 je rezervisan na Windowsu, pa se ne može koristiti kao globalna " diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdeclarative-4.99.0/po/sr@latin/kdeclarative5.po new/kdeclarative-4.100.0/po/sr@latin/kdeclarative5.po --- old/kdeclarative-4.99.0/po/sr@latin/kdeclarative5.po 2014-05-05 02:18:55.000000000 +0200 +++ new/kdeclarative-4.100.0/po/sr@latin/kdeclarative5.po 2014-06-01 14:12:52.000000000 +0200 @@ -35,8 +35,8 @@ #: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:276 msgid "" -"The F12 key is reserved on Windows, so cannot be used for a global " -"shortcut.\n" +"The F12 key is reserved on Windows, so cannot be used for a global shortcut." +"\n" "Please choose another one." msgstr "" "Taster F12 je rezervisan na Windowsu, pa se ne može koristiti kao globalna " diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdeclarative-4.99.0/po/uk/kdeclarative5.po new/kdeclarative-4.100.0/po/uk/kdeclarative5.po --- old/kdeclarative-4.99.0/po/uk/kdeclarative5.po 2014-05-05 02:18:55.000000000 +0200 +++ new/kdeclarative-4.100.0/po/uk/kdeclarative5.po 2014-06-01 14:12:52.000000000 +0200 @@ -349,7 +349,7 @@ #~ msgid "Password must be at least 1 character long" #~ msgid_plural "Password must be at least %1 characters long" -#~ msgstr[0] "Довжина пароля повинна бути щонайменше %1 символ" +#~ msgstr[0] "Довжина пароля повинна бути щонайменше один символ" #~ msgstr[1] "Довжина пароля повинна бути щонайменше %1 символи" #~ msgstr[2] "Довжина пароля повинна бути щонайменше %1 символів" #~ msgstr[3] "Довжина пароля повинна бути щонайменше один символ" @@ -4071,7 +4071,7 @@ #~ msgid "1 match found." #~ msgid_plural "%1 matches found." -#~ msgstr[0] "Знайдено %1 відповідний варіант." +#~ msgstr[0] "Знайдено 1 відповідний варіант." #~ msgstr[1] "Знайдено %1 відповідних варіанта." #~ msgstr[2] "Знайдено %1 відповідних варіантів." #~ msgstr[3] "Знайдено 1 відповідний варіант." @@ -4319,7 +4319,7 @@ #~ msgid "but your pattern only defines 1 capture." #~ msgid_plural "but your pattern only defines %1 captures." -#~ msgstr[0] "в той час, як взірець визначає тільки %1 захоплення." +#~ msgstr[0] "в той час, як взірець визначає тільки одне захоплення." #~ msgstr[1] "в той час, як взірець визначає тільки %1 захоплення." #~ msgstr[2] "в той час, як взірець визначає тільки %1 захоплень." #~ msgstr[3] "в той час, як взірець визначає тільки одне захоплення." @@ -6322,7 +6322,7 @@ #~ msgid_plural "" #~ "The shortcut '%2' conflicts with the following key combinations:\n" #~ msgstr[0] "" -#~ "Клавіатурне скорочення «%2» суперечить наступним комбінаціям клавіш:\n" +#~ "Клавіатурне скорочення «%2» суперечить наступній комбінації клавіш:\n" #~ msgstr[1] "" #~ "Клавіатурне скорочення «%2» суперечить наступним комбінаціям клавіш:\n" #~ msgstr[2] "" @@ -6333,7 +6333,7 @@ #~ msgctxt "%1 is the number of shortcuts with which there is a conflict" #~ msgid "Conflict with Registered Global Shortcut" #~ msgid_plural "Conflict with Registered Global Shortcuts" -#~ msgstr[0] "Конфлікт з зареєстрованими загальними скороченнями" +#~ msgstr[0] "Конфлікт з зареєстрованим загальним скороченням" #~ msgstr[1] "Конфлікт з зареєстрованими загальними скороченнями" #~ msgstr[2] "Конфлікт з зареєстрованими загальними скороченнями" #~ msgstr[3] "Конфлікт з зареєстрованим загальним скороченням" @@ -6341,7 +6341,7 @@ #~ msgctxt "%1 is the number of conflicts" #~ msgid "Shortcut Conflict" #~ msgid_plural "Shortcut Conflicts" -#~ msgstr[0] "Конфлікти скорочень" +#~ msgstr[0] "Конфлікт скорочень" #~ msgstr[1] "Конфлікти скорочень" #~ msgstr[2] "Конфлікти скорочень" #~ msgstr[3] "Конфлікт скорочень" @@ -6998,7 +6998,7 @@ #~ msgid "&Send File" #~ msgid_plural "&Send Files" -#~ msgstr[0] "&Надіслати файли" +#~ msgstr[0] "&Надіслати файл" #~ msgstr[1] "&Надіслати файли" #~ msgstr[2] "&Надіслати файли" #~ msgstr[3] "&Надіслати файл" @@ -7608,7 +7608,7 @@ #~ msgid "&Show Blocked Popup Window" #~ msgid_plural "&Show %1 Blocked Popup Windows" -#~ msgstr[0] "&Показати %1 заблокований вигульк" +#~ msgstr[0] "&Показати заблокований вигульк" #~ msgstr[1] "&Показати %1 заблоковані вигульки" #~ msgstr[2] "&Показати %1 заблокованих вигульків" #~ msgstr[3] "&Показати заблокований вигульк" @@ -8676,7 +8676,7 @@ #~ msgid "Loading one preview" #~ msgid_plural "Loading %1 previews" -#~ msgstr[0] "Завантаження %1 ескізу" +#~ msgstr[0] "Завантаження ескізу" #~ msgstr[1] "Завантаження %1 ескізів" #~ msgstr[2] "Завантаження %1 ескізів" #~ msgstr[3] "Завантаження ескізу" @@ -8799,14 +8799,14 @@ #~ msgctxt "fan as in supporter" #~ msgid "1 fan" #~ msgid_plural "%1 fans" -#~ msgstr[0] "%1 прихильник" +#~ msgstr[0] "1 прихильник" #~ msgstr[1] "%1 прихильники" #~ msgstr[2] "%1 прихильників" #~ msgstr[3] "1 прихильник" #~ msgid "1 download" #~ msgid_plural "%1 downloads" -#~ msgstr[0] "%1 звантаження" +#~ msgstr[0] "1 звантаження" #~ msgstr[1] "%1 звантаження" #~ msgstr[2] "%1 звантажень" #~ msgstr[3] "1 звантаження" @@ -8858,7 +8858,7 @@ #~ msgid_plural "" #~ "The server does not recognize any of the categories to which you are " #~ "trying to upload: %2" -#~ msgstr[0] "Серверу невідомі категорії вашого вивантаження: %2" +#~ msgstr[0] "Серверу невідома категорія вашого вивантаження: %2" #~ msgstr[1] "Серверу невідома категорія ваших вивантажень: %2" #~ msgstr[2] "Серверу невідома категорія ваших вивантажень: %2" #~ msgstr[3] "Серверу невідома категорія вашого вивантаження: %2" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdeclarative-4.99.0/po/x-test/kdeclarative5.po new/kdeclarative-4.100.0/po/x-test/kdeclarative5.po --- old/kdeclarative-4.99.0/po/x-test/kdeclarative5.po 2014-05-05 02:18:55.000000000 +0200 +++ new/kdeclarative-4.100.0/po/x-test/kdeclarative5.po 1970-01-01 01:00:00.000000000 +0100 @@ -1,79 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR This_file_is_part_of_KDE -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. -# -# -msgid "" -msgstr "" -"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-27 21:05+0000\n" -"Last-Translator: transxx.py program <n...@kde.org>\n" -"Language-Team: KDE Test Language <kde-i18n-...@kde.org>\n" -"Language: x-test\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=1; plural=0;\n" - -#: qmlcontrols/kquickcontrols/KeySequenceItem.qml:38 -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 "" -"xxClick 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.xx" - -#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:275 -msgid "Reserved Shortcut" -msgstr "xxReserved Shortcutxx" - -#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:276 -msgid "" -"The F12 key is reserved on Windows, so cannot be used for a global " -"shortcut.\n" -"Please choose another one." -msgstr "" -"xxThe F12 key is reserved on Windows, so cannot be used for a global " -"shortcut.\n" -"Please choose another one.xx" - -#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:332 -msgid "Conflict with Standard Application Shortcut" -msgstr "xxConflict with Standard Application Shortcutxx" - -#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:333 -#, kde-format -msgid "" -"The '%1' key combination is also used for the standard action \"%2\" that " -"some applications use.\n" -"Do you really want to use it as a global shortcut as well?" -msgstr "" -"xxThe '%1' key combination is also used for the standard action \"%2\" that " -"some applications use.\n" -"Do you really want to use it as a global shortcut as well?xx" - -#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:338 -msgid "Reassign" -msgstr "xxReassignxx" - -#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:378 -msgctxt "What the user inputs now will be taken as the new shortcut" -msgid "Input" -msgstr "xxInputxx" - -#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:385 -msgctxt "No shortcut defined" -msgid "None" -msgstr "xxNonexx" - -#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:406 -msgid "The key you just pressed is not supported by Qt." -msgstr "xxThe key you just pressed is not supported by Qt.xx" - -#: qmlcontrols/kquickcontrols/private/keysequencehelper.cpp:407 -msgid "Unsupported Key" -msgstr "xxUnsupported Keyxx" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdeclarative-4.99.0/src/kdeclarative/kdeclarative.cpp new/kdeclarative-4.100.0/src/kdeclarative/kdeclarative.cpp --- old/kdeclarative-4.99.0/src/kdeclarative/kdeclarative.cpp 2014-05-05 02:18:55.000000000 +0200 +++ new/kdeclarative-4.100.0/src/kdeclarative/kdeclarative.cpp 2014-06-01 14:12:52.000000000 +0200 @@ -36,6 +36,8 @@ namespace KDeclarative { +QStringList KDeclarativePrivate::s_runtimePlatform; + KDeclarativePrivate::KDeclarativePrivate() : initialized(false) { @@ -133,17 +135,21 @@ QStringList KDeclarative::runtimePlatform() { - static QStringList *runtimePlatform = 0; - if (!runtimePlatform) { + if (KDeclarativePrivate::s_runtimePlatform.isEmpty()) { const QString env = QString::fromLocal8Bit(getenv("PLASMA_PLATFORM")); - runtimePlatform = new QStringList(env.split(QLatin1Char(':'), QString::SkipEmptyParts)); - if (runtimePlatform->isEmpty()) { + KDeclarativePrivate::s_runtimePlatform = QStringList(env.split(QLatin1Char(':'), QString::SkipEmptyParts)); + if (KDeclarativePrivate::s_runtimePlatform.isEmpty()) { KConfigGroup cg(KSharedConfig::openConfig(), "General"); - *runtimePlatform = cg.readEntry(QStringLiteral("runtimePlatform"), *runtimePlatform); + KDeclarativePrivate::s_runtimePlatform = cg.readEntry(QStringLiteral("runtimePlatform"), KDeclarativePrivate::s_runtimePlatform); } } - return *runtimePlatform; + return KDeclarativePrivate::s_runtimePlatform; +} + +void KDeclarative::setRuntimePlatform(const QStringList &platform) +{ + KDeclarativePrivate::s_runtimePlatform = platform; } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdeclarative-4.99.0/src/kdeclarative/kdeclarative.h new/kdeclarative-4.100.0/src/kdeclarative/kdeclarative.h --- old/kdeclarative-4.99.0/src/kdeclarative/kdeclarative.h 2014-05-05 02:18:55.000000000 +0200 +++ new/kdeclarative-4.100.0/src/kdeclarative/kdeclarative.h 2014-06-01 14:12:52.000000000 +0200 @@ -70,6 +70,12 @@ static QStringList runtimePlatform(); /** + * Sets the runtime platform from now on, globally to the process. + * Already loaded QML components won't be affected + */ + static void setRuntimePlatform(const QStringList &platform); + + /** * @return the QML components target, based on the runtime platform. e.g. touch or desktop * @since 4.10 */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdeclarative-4.99.0/src/kdeclarative/private/kdeclarative_p.h new/kdeclarative-4.100.0/src/kdeclarative/private/kdeclarative_p.h --- old/kdeclarative-4.99.0/src/kdeclarative/private/kdeclarative_p.h 2014-05-05 02:18:55.000000000 +0200 +++ new/kdeclarative-4.100.0/src/kdeclarative/private/kdeclarative_p.h 2014-06-01 14:12:52.000000000 +0200 @@ -33,6 +33,7 @@ QPointer<QQmlEngine> declarativeEngine; bool initialized; + static QStringList s_runtimePlatform; }; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdeclarative-4.99.0/src/kdeclarative/qmlobject.cpp new/kdeclarative-4.100.0/src/kdeclarative/qmlobject.cpp --- old/kdeclarative-4.99.0/src/kdeclarative/qmlobject.cpp 2014-05-05 02:18:55.000000000 +0200 +++ new/kdeclarative-4.100.0/src/kdeclarative/qmlobject.cpp 2014-06-01 14:12:52.000000000 +0200 @@ -68,7 +68,7 @@ ~QmlObjectPrivate() { - delete root.data(); + delete incubator.object(); } void errorPrint(QQmlComponent *component); @@ -87,7 +87,6 @@ QQmlEngine *engine; QmlObjectIncubator incubator; QQmlComponent *component; - QPointer<QObject> root; QTimer *executionEndTimer; bool delay : 1; }; @@ -116,7 +115,7 @@ delete component; component = new QQmlComponent(engine, q); - delete root.data(); + delete incubator.object(); KDeclarative kdeclarative; kdeclarative.setDeclarativeEngine(engine); @@ -172,7 +171,6 @@ void QmlObject::setSource(const QUrl &source) { - qDebug() << "Opening" << source; d->source = source; d->execute(source); } @@ -199,7 +197,7 @@ QObject *QmlObject::rootObject() const { - return d->root.data(); + return d->incubator.object(); } QQmlComponent *QmlObject::mainComponent() const @@ -210,7 +208,7 @@ void QmlObject::completeInitialization(const QVariantHash &initialProperties) { d->executionEndTimer->stop(); - if (d->root) { + if (d->incubator.object()) { return; } if (d->component->status() != QQmlComponent::Ready || d->component->isError()) { @@ -222,20 +220,13 @@ d->component->create(d->incubator); while (!d->incubator.isReady() && d->incubator.status() != QQmlIncubator::Error) { - QCoreApplication::processEvents(QEventLoop::AllEvents, 50); + QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents, 50); } - d->root = d->incubator.object(); - //d->root = d->component->create(); - - if (!d->root) { + if (!d->incubator.object()) { d->errorPrint(d->component); } -#ifndef NDEBUG - qDebug() << "Execution of QML done!"; -#endif - emit finished(); } @@ -249,27 +240,30 @@ QObject *QmlObject::createObjectFromComponent(QQmlComponent *component, QQmlContext *context, const QVariantHash &initialProperties) { - d->incubator.m_initialProperties = initialProperties; - component->create(d->incubator, context ? context : d->engine->rootContext()); - while (!d->incubator.isReady() && d->incubator.status() != QQmlIncubator::Error) { - QCoreApplication::processEvents(QEventLoop::AllEvents, 50); + QmlObjectIncubator incubator; + incubator.m_initialProperties = initialProperties; + component->create(incubator, context ? context : d->engine->rootContext()); + while (!incubator.isReady() && incubator.status() != QQmlIncubator::Error) { + QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents, 50); } - QObject *object = d->incubator.object(); + QObject *object = incubator.object(); if (!component->isError() && object) { //memory management component->setParent(object); - if (qobject_cast<QQuickItem *>(d->root.data())) { - object->setProperty("parent", QVariant::fromValue(d->root.data())); - } else { - object->setParent(d->root.data()); + //reparent to root object if wasn't specified otherwise by initialProperties + if (!initialProperties.contains("parent")) { + if (qobject_cast<QQuickItem *>(rootObject())) { + object->setProperty("parent", QVariant::fromValue(rootObject())); + } else { + object->setParent(rootObject()); + } } return object; } else { d->errorPrint(component); - delete component; delete object; return 0; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdeclarative-4.99.0/src/qmlcontrols/kquickcontrols/private/keysequencehelper.cpp new/kdeclarative-4.100.0/src/qmlcontrols/kquickcontrols/private/keysequencehelper.cpp --- old/kdeclarative-4.99.0/src/qmlcontrols/kquickcontrols/private/keysequencehelper.cpp 2014-05-05 02:18:55.000000000 +0200 +++ new/kdeclarative-4.100.0/src/qmlcontrols/kquickcontrols/private/keysequencehelper.cpp 2014-06-01 14:12:52.000000000 +0200 @@ -276,7 +276,7 @@ QString message = i18n("The F12 key is reserved on Windows, so cannot be used for a global shortcut.\n" "Please choose another one."); - KMessageBox::sorry(q, message, title); + KMessageBox::sorry(0, message, title); return false; } #endif -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org