Skip to content

Commit

Permalink
Merge branch 'jb46120' into 'master'
Browse files Browse the repository at this point in the history
Set multiple VPN properties with one D-Bus call using SetProperty.

See merge request mer-core/libconnman-qt!39
  • Loading branch information
LaakkonenJussi committed Dec 10, 2019
2 parents 9459693 + f852d98 commit 183f4e6
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
4 changes: 4 additions & 0 deletions libconnman-qt/connman_vpn_connection.xml
Expand Up @@ -6,6 +6,10 @@
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QVariantMap"/>
<arg name="properties" type="a{sv}" direction="out"/>
</method>
<method name="SetProperties">
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QVariantMap"/>
<arg name="properties" type="a{sv}" direction="in"/>
</method>
<method name="SetProperty">
<arg name="name" type="s" direction="in"/>
<arg name="value" type="v" direction="in"/>
Expand Down
2 changes: 1 addition & 1 deletion libconnman-qt/libconnman-qt.pro
Expand Up @@ -4,7 +4,7 @@ QT -= gui
CONFIG += qt create_pc create_prl link_pkgconfig

isEmpty(VERSION) {
VERSION = 1.2.23
VERSION = 1.2.24
message("VERSION is unset, assuming $$VERSION")
}

Expand Down
5 changes: 1 addition & 4 deletions libconnman-qt/vpnconnection.cpp
Expand Up @@ -155,10 +155,7 @@ void VpnConnection::modifyConnection(const QVariantMap &properties)
updatedProperties.remove(QString("immutable"));
updatedProperties.remove(QString("storeCredentials"));

QVariantMap dbusProps = MarshalUtils::propertiesToDBus(updatedProperties);
for (QMap<QString, QVariant>::const_iterator i = dbusProps.constBegin(); i != dbusProps.constEnd(); ++i) {
d->m_connectionProxy.SetProperty(i.key(), QDBusVariant(i.value()));
}
d->m_connectionProxy.SetProperties(MarshalUtils::propertiesToDBus(updatedProperties));
}

void VpnConnection::activate()
Expand Down
4 changes: 2 additions & 2 deletions rpm/connman-qt5.spec
@@ -1,12 +1,12 @@
Name: connman-qt5
Summary: Qt bindings for connman
Version: 1.2.23
Version: 1.2.24
Release: 1
Group: System/GUI/Other
License: ASL 2.0
URL: https://git.sailfishos.org/mer-core/libconnman-qt
Source0: %{name}-%{version}.tar.bz2
Requires: connman >= 1.31+git20
Requires: connman >= 1.32+git104
Requires: libdbusaccess >= 1.0.4
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
Expand Down

0 comments on commit 183f4e6

Please sign in to comment.