Skip to content

Commit

Permalink
Merge branch 'jb45378' into 'master'
Browse files Browse the repository at this point in the history
Update VpnModel to use libconnman-qt VPN API

See merge request mer-core/nemo-qml-plugin-systemsettings!113
  • Loading branch information
llewelld committed Oct 9, 2019
2 parents 19a8d7e + 7fdf237 commit 9bcdd68
Show file tree
Hide file tree
Showing 8 changed files with 995 additions and 1,527 deletions.
5 changes: 3 additions & 2 deletions rpm/nemo-qml-plugin-systemsettings.spec
@@ -1,6 +1,6 @@
Name: nemo-qml-plugin-systemsettings
Summary: System settings plugin for Nemo Mobile
Version: 0.5.6
Version: 0.5.27
Release: 1
Group: System/Libraries
License: BSD
Expand All @@ -11,6 +11,7 @@ Requires(postun): /sbin/ldconfig
Requires: connman
Requires: mce >= 1.83.0
Requires: libsailfishkeyprovider >= 0.0.14
Requires: connman-qt5 >= 1.2.21
BuildRequires: pkgconfig(Qt5Qml)
BuildRequires: pkgconfig(Qt5SystemInfo)
BuildRequires: pkgconfig(Qt5Test)
Expand All @@ -25,7 +26,7 @@ BuildRequires: pkgconfig(libcrypto)
BuildRequires: pkgconfig(nemodbus) >= 2.1.16
BuildRequires: pkgconfig(nemomodels-qt5)
BuildRequires: pkgconfig(libsailfishkeyprovider) >= 0.0.14
BuildRequires: pkgconfig(connman-qt5) >= 1.2.7
BuildRequires: pkgconfig(connman-qt5) >= 1.2.21
BuildRequires: pkgconfig(ssu-sysinfo) >= 1.1.0
BuildRequires: pkgconfig(packagekitqt5)
BuildRequires: pkgconfig(glib-2.0)
Expand Down
9 changes: 5 additions & 4 deletions src/plugin/plugin.cpp
Expand Up @@ -47,13 +47,14 @@
#include "diskusage.h"
#include "partitionmodel.h"
#include "certificatemodel.h"
#include "vpnmodel.h"
#include "settingsvpnmodel.h"
#include "locationsettings.h"
#include "deviceinfo.h"

static QObject *vpnmodel_api_factory(QQmlEngine *, QJSEngine *)
template<class T>
static QObject *api_factory(QQmlEngine *, QJSEngine *)
{
return new VpnModel;
return new T;
}

class SystemSettingsPlugin : public QQmlExtensionPlugin
Expand Down Expand Up @@ -82,7 +83,7 @@ class SystemSettingsPlugin : public QQmlExtensionPlugin
qRegisterMetaType<Partition>("Partition");
qmlRegisterType<DeveloperModeSettings>(uri, 1, 0, "DeveloperModeSettings");
qmlRegisterType<CertificateModel>(uri, 1, 0, "CertificateModel");
qmlRegisterSingletonType<VpnModel>(uri, 1, 0, "VpnModel", vpnmodel_api_factory);
qmlRegisterSingletonType<SettingsVpnModel>(uri, 1, 0, "SettingsVpnModel", api_factory<SettingsVpnModel>);
qRegisterMetaType<DeveloperModeSettings::Status>("DeveloperModeSettings::Status");
qmlRegisterType<BatteryStatus>(uri, 1, 0, "BatteryStatus");
qmlRegisterType<DiskUsage>(uri, 1, 0, "DiskUsage");
Expand Down
14 changes: 0 additions & 14 deletions src/qdbusxml2cpp_dbus_types.h

This file was deleted.

0 comments on commit 9bcdd68

Please sign in to comment.