diff --git a/rpm/statefs-qt5.spec b/rpm/statefs-qt5.spec index c62eef6..16d1f4b 100644 --- a/rpm/statefs-qt5.spec +++ b/rpm/statefs-qt5.spec @@ -61,13 +61,11 @@ Requires: statefs-contextkit-subscriber = %{version}-%{release} %description -n statefs-declarative-qt5 %{summary} -%package -n contextkit-declarative-qt5 -Summary: Contextkit QML plugin +%package -n contextkit-statefs-declarative-qt5 +Summary: Contextkit QML plugin implemented with StateFS backend Group: System Environment/Libraries Requires: statefs-contextkit-subscriber = %{version}-%{release} -Obsoletes: nemo-qml-plugin-contextkit-qt5 <= 1.1.8 -Provides: nemo-qml-plugin-contextkit-qt5 = 1.1.9 -%description -n contextkit-declarative-qt5 +%description -n contextkit-statefs-declarative-qt5 %{summary} %package tests @@ -120,9 +118,9 @@ make doc %defattr(-,root,root,-) %{_libdir}/qt5/qml/Mer/State/* -%files -n contextkit-declarative-qt5 +%files -n contextkit-statefs-declarative-qt5 %defattr(-,root,root,-) -%{_libdir}/qt5/qml/org/freedesktop/contextkit/* +%{_libdir}/qt5/qml/Nemo/StateFs/* %files tests %defattr(-,root,root,-) @@ -137,5 +135,5 @@ make doc %post -n statefs-declarative-qt5 -p /sbin/ldconfig %postun -n statefs-declarative-qt5 -p /sbin/ldconfig -%post -n contextkit-declarative-qt5 -p /sbin/ldconfig -%postun -n contextkit-declarative-qt5 -p /sbin/ldconfig +%post -n contextkit-statefs-declarative-qt5 -p /sbin/ldconfig +%postun -n contextkit-statefs-declarative-qt5 -p /sbin/ldconfig diff --git a/src/qml/CMakeLists.txt b/src/qml/CMakeLists.txt index 0dcd6dd..c247641 100644 --- a/src/qml/CMakeLists.txt +++ b/src/qml/CMakeLists.txt @@ -30,15 +30,15 @@ target_link_libraries(contextkit contextkit-statefs-qt5 ) -install(TARGETS contextkit DESTINATION ${DST_LIB}/qt5/qml/org/freedesktop/contextkit) +install(TARGETS contextkit DESTINATION ${DST_LIB}/qt5/qml/Nemo/StateFs) install(FILES contextkit-qmldir - DESTINATION ${DST_LIB}/qt5/qml/org/freedesktop/contextkit + DESTINATION ${DST_LIB}/qt5/qml/Nemo/StateFs RENAME qmldir) install(FILES contextkit-plugins.qmltypes - DESTINATION ${DST_LIB}/qt5/qml/org/freedesktop/contextkit + DESTINATION ${DST_LIB}/qt5/qml/Nemo/StateFs RENAME plugins.qmltypes) add_custom_target(qmltypes COMMAND qmlplugindump -nonrelocatable Mer.State 1.1 > plugins.qmltypes - COMMAND qmlplugindump -nonrelocatable org.freedesktop.contextkit 1.0 > contextkit-plugins.qmltypes + COMMAND qmlplugindump -nonrelocatable Nemo.StateFs 1.0 > contextkit-plugins.qmltypes WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/src/qml/contextkit-plugins.qmltypes b/src/qml/contextkit-plugins.qmltypes index 4b4d503..29f56fe 100644 --- a/src/qml/contextkit-plugins.qmltypes +++ b/src/qml/contextkit-plugins.qmltypes @@ -4,7 +4,7 @@ import QtQuick.tooling 1.2 // It is used for QML tooling purposes only. // // This file was auto-generated by: -// 'qmlplugindump -nonrelocatable org.freedesktop.contextkit 1.0' +// 'qmlplugindump -nonrelocatable Nemo.StateFs 1.0' Module { dependencies: ["QtQuick 2.0"] @@ -12,7 +12,7 @@ Module { name: "ContextPropertyDeclarative" defaultProperty: "value" prototype: "QObject" - exports: ["org.freedesktop.contextkit/ContextProperty 1.0"] + exports: ["Nemo.StateFs/ContextProperty 1.0"] exportMetaObjectRevisions: [0] Property { name: "key"; type: "string" } Property { name: "value"; type: "QVariant" } diff --git a/src/qml/contextkit-qmldir b/src/qml/contextkit-qmldir index 261ff41..43eba07 100644 --- a/src/qml/contextkit-qmldir +++ b/src/qml/contextkit-qmldir @@ -1,3 +1,3 @@ -module org.freedesktop.contextkit +module Nemo.StateFs plugin contextkit typeinfo plugins.qmltypes diff --git a/src/qml/contextkit_plugin.cpp b/src/qml/contextkit_plugin.cpp index 1099ad0..1d83423 100644 --- a/src/qml/contextkit_plugin.cpp +++ b/src/qml/contextkit_plugin.cpp @@ -1,8 +1,23 @@ -/** - * @file client.hpp - * @brief Statefs QML plugin - * @copyright (C) 2013-2014 Jolla Ltd. - * @par License: LGPL 2.1 http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html +/* + * Copyright (c) 2013 - 2020 Jolla Ltd. + * Copyright (c) 2020 Open Mobile Platform LLC. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA + * + * http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html */ #include "contextkit_plugin.hpp" @@ -12,5 +27,6 @@ void ContextkitPlugin::registerTypes(char const* uri) { + Q_ASSERT(QLatin1String(uri) == QLatin1String("Nemo.StateFs")); qmlRegisterType(uri, 1, 0, "ContextProperty"); } diff --git a/src/qml/contextkit_plugin.hpp b/src/qml/contextkit_plugin.hpp index a211de2..182a1c3 100644 --- a/src/qml/contextkit_plugin.hpp +++ b/src/qml/contextkit_plugin.hpp @@ -1,3 +1,25 @@ +/* + * Copyright (c) 2013 - 2020 Jolla Ltd. + * Copyright (c) 2020 Open Mobile Platform LLC. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA + * + * http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html + */ + #ifndef _STATEFS_QML_PLUGIN_QT5_HPP_ #define _STATEFS_QML_PLUGIN_QT5_HPP_ @@ -6,7 +28,7 @@ class ContextkitPlugin : public QQmlExtensionPlugin { Q_OBJECT - Q_PLUGIN_METADATA(IID "org.freedesktop.contextkit") + Q_PLUGIN_METADATA(IID "Nemo.StateFs") public: void registerTypes(char const* uri); };