Skip to content
This repository has been archived by the owner on Sep 4, 2021. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
[statefs-qt] Rename contextkit QML module and package. Contributes to…
… JB#48573

Package contextkit-declarative-qt5 renamed to
contextkit-statefs-declarative-qt5.

Module org.freedesktop.contextkit renamed to Nemo.StateFs.

The org.freedesktop.contextkit package will now be provided elsewhere.
  • Loading branch information
Bea Lam committed Feb 9, 2020
1 parent a745bbf commit 0d6a51c
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 22 deletions.
16 changes: 7 additions & 9 deletions rpm/statefs-qt5.spec
Expand Up @@ -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
Expand Down Expand Up @@ -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,-)
Expand All @@ -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
8 changes: 4 additions & 4 deletions src/qml/CMakeLists.txt
Expand Up @@ -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})
4 changes: 2 additions & 2 deletions src/qml/contextkit-plugins.qmltypes
Expand Up @@ -4,15 +4,15 @@ 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"]
Component {
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" }
Expand Down
2 changes: 1 addition & 1 deletion src/qml/contextkit-qmldir
@@ -1,3 +1,3 @@
module org.freedesktop.contextkit
module Nemo.StateFs
plugin contextkit
typeinfo plugins.qmltypes
26 changes: 21 additions & 5 deletions 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"
Expand All @@ -12,5 +27,6 @@

void ContextkitPlugin::registerTypes(char const* uri)
{
Q_ASSERT(QLatin1String(uri) == QLatin1String("Nemo.StateFs"));
qmlRegisterType<ContextPropertyDeclarative>(uri, 1, 0, "ContextProperty");
}
24 changes: 23 additions & 1 deletion 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_

Expand All @@ -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);
};
Expand Down

0 comments on commit 0d6a51c

Please sign in to comment.