Commit 9bcdd68d authored by flypig's avatar flypig

Merge branch 'jb45378' into 'master'

Update VpnModel to use libconnman-qt VPN API

See merge request !113
parents 19a8d7e8 7fdf237f
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
......@@ -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)
......@@ -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)
......
......@@ -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
......@@ -82,7 +83,7 @@ public:
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");
......
#ifndef QDBUSXML2CPP_DBUS_TYPES
#define QDBUSXML2CPP_DBUS_TYPES
#include <QPair>
#include <QList>
#include <QDBusMetaType>
typedef QPair<QDBusObjectPath, QVariantMap> PathProperties;
Q_DECLARE_METATYPE(PathProperties);
typedef QList<PathProperties> PathPropertiesArray;
Q_DECLARE_METATYPE(PathPropertiesArray);
#endif
This diff is collapsed.
......@@ -10,9 +10,6 @@ PKGCONFIG += profile mlite5 mce timed-qt5 libshadowutils blkid libcrypto nemomod
PKGCONFIG += ssu-sysinfo nemodbus packagekitqt5
system(qdbusxml2cpp -p mceiface.h:mceiface.cpp mce.xml)
system(qdbusxml2cpp -c ConnmanVpnProxy -p connmanvpnproxy ../dbus/net.connman.vpn.xml -i qdbusxml2cpp_dbus_types.h)
system(qdbusxml2cpp -c ConnmanVpnConnectionProxy -p connmanvpnconnectionproxy ../dbus/net.connman.vpn.Connection.xml -i qdbusxml2cpp_dbus_types.h)
system(qdbusxml2cpp -c ConnmanServiceProxy -p connmanserviceproxy ../dbus/net.connman.service.xml -i qdbusxml2cpp_dbus_types.h)
SOURCES += \
languagemodel.cpp \
......@@ -25,10 +22,6 @@ SOURCES += \
displaysettings.cpp \
aboutsettings.cpp \
certificatemodel.cpp \
vpnmodel.cpp \
connmanserviceproxy.cpp \
connmanvpnproxy.cpp \
connmanvpnconnectionproxy.cpp \
developermodesettings.cpp \
batterystatus.cpp \
diskusage.cpp \
......@@ -38,6 +31,7 @@ SOURCES += \
partitionmodel.cpp \
deviceinfo.cpp \
locationsettings.cpp \
settingsvpnmodel.cpp \
timezoneinfo.cpp \
udisks2block.cpp \
udisks2blockdevices.cpp \
......@@ -53,10 +47,7 @@ PUBLIC_HEADERS = \
displaysettings.h \
aboutsettings.h \
certificatemodel.h \
vpnmodel.h \
connmanserviceproxy.h \
connmanvpnproxy.h \
connmanvpnconnectionproxy.h \
settingsvpnmodel.h \
developermodesettings.h \
batterystatus.h \
udisks2block_p.h \
......@@ -72,7 +63,6 @@ PUBLIC_HEADERS = \
HEADERS += \
$$PUBLIC_HEADERS \
qdbusxml2cpp_dbus_types.h \
localeconfig.h \
batterystatus_p.h \
logging_p.h \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment