Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Rename VpnModel class to SettingsVpnModel and VpnCoreModel class to V…
…pnModel

To allow the base class in libconnman-qt to be more easily named as
VpnModel. The class has been renamed in libconnma-qt to align with the overall
libconnman-qt class naming approach.
  • Loading branch information
llewelld committed Oct 9, 2019
1 parent e1f125e commit 7fdf237
Show file tree
Hide file tree
Showing 5 changed files with 82 additions and 80 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

0 comments on commit 7fdf237

Please sign in to comment.