KDE Frameworks 5.19.0

epel9
Daniel Vrátil 9 years ago
parent 3ab9625e46
commit 5d400333c7

1
.gitignore vendored

@ -1 +1,2 @@
/networkmanager-qt-5.18.0.tar.xz
/networkmanager-qt-5.19.0.tar.xz

@ -1,8 +1,8 @@
%global framework networkmanager-qt
Name: kf5-%{framework}
Version: 5.18.0
Release: 4%{?dist}
Version: 5.19.0
Release: 1%{?dist}
Summary: A Tier 1 KDE Frameworks 5 module that wraps NetworkManager DBus API
Group: System Environment/Libraries
@ -18,9 +18,6 @@ URL: https://projects.kde.org/networkmanager-qt
%endif
Source0: http://download.kde.org/%{stable}/frameworks/%{versiondir}/%{framework}-%{version}.tar.xz
# https://bugs.kde.org/show_bug.cgi?id=352326
Patch0: nm-qt-active-connections.patch
BuildRequires: extra-cmake-modules >= %{version}
BuildRequires: kf5-rpm-macros >= %{version}
BuildRequires: qt5-qtbase-devel
@ -66,8 +63,6 @@ that use NetworkManager.
%prep
%setup -qn %{framework}-%{version}
%patch0 -p1 -b .nm-qt-active-connections
%build
mkdir %{_target_platform}
@ -99,6 +94,9 @@ make install/fast DESTDIR=%{buildroot} -C %{_target_platform}
%changelog
* Thu Feb 11 2016 Daniel Vrátil <dvratil@fedoraproject.org> - 5.19.0-1
- KDE Frameworks 5.19.0
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 5.18.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

@ -1,166 +0,0 @@
diff --git a/src/activeconnection.cpp b/src/activeconnection.cpp
index f29ca67..cbfb909 100644
--- a/src/activeconnection.cpp
+++ b/src/activeconnection.cpp
@@ -108,36 +108,66 @@ NetworkManager::ActiveConnection::ActiveConnection(const QString &path, QObject
* Workaround: Re-check connection state before we watch changes in case it gets changed too quickly
* BUG:352326
*/
+ QStringList properties;
+ const QDBusObjectPath ip4ConfigObjectPath = d->iface.ip4Config();
+ const QDBusObjectPath ip6ConfigObjectPath = d->iface.ip6Config();
+ const QDBusObjectPath dhcp4ConfigObjectPath = d->iface.dhcp4Config();
+ const QDBusObjectPath dhcp6ConfigObjectPath = d->iface.dhcp6Config();
+
if (d->state != NetworkManager::ActiveConnectionPrivate::convertActiveConnectionState(d->iface.state())) {
- d->state = NetworkManager::ActiveConnectionPrivate::convertActiveConnectionState(d->iface.state());
- Q_EMIT stateChanged(d->state);
+ properties << QLatin1String("State");
}
#if NM_CHECK_VERSION(0, 9, 10)
- QDBusObjectPath ip4ConfigObjectPath = d->iface.ip4Config();
if (!ip4ConfigObjectPath.path().isNull() && ip4ConfigObjectPath.path() != d->ipV4ConfigPath) {
- d->ipV4ConfigPath = ip4ConfigObjectPath.path();
- Q_EMIT ipV4ConfigChanged();
+ properties << QLatin1String("Ip4Config");
}
- QDBusObjectPath ip6ConfigObjectPath = d->iface.ip6Config();
if (!ip6ConfigObjectPath.path().isNull() && ip6ConfigObjectPath.path() != d->ipV6ConfigPath) {
- d->ipV6ConfigPath = ip6ConfigObjectPath.path();
- Q_EMIT ipV6ConfigChanged();
+ properties << QLatin1String("Ip6Config");
}
- QDBusObjectPath dhcp4ConfigObjectPath = d->iface.dhcp4Config();
if (!dhcp4ConfigObjectPath.path().isNull() && dhcp4ConfigObjectPath.path() != d->dhcp4ConfigPath) {
- d->dhcp4ConfigPath = dhcp4ConfigObjectPath.path();
- Q_EMIT dhcp4ConfigChanged();
+ properties << QLatin1String("Dhcp4Config");
}
- QDBusObjectPath dhcp6ConfigObjectPath = d->iface.dhcp6Config();
if (!dhcp6ConfigObjectPath.path().isNull() && dhcp6ConfigObjectPath.path() != d->dhcp6ConfigPath) {
- d->dhcp6ConfigPath = dhcp6ConfigObjectPath.path();
- Q_EMIT dhcp6ConfigChanged();
+ properties << QLatin1String("Dhcp6Config");
}
#endif
+
+ Q_FOREACH (const QString &property, properties) {
+ QDBusMessage message = QDBusMessage::createMethodCall(NetworkManager::NetworkManagerPrivate::DBUS_SERVICE,
+ NetworkManager::NetworkManagerPrivate::DBUS_DAEMON_PATH,
+ NetworkManager::NetworkManagerPrivate::FDO_DBUS_PROPERTIES,
+ QLatin1String("Get"));
+ message << d->iface.staticInterfaceName() << property;
+
+ QDBusPendingCall pendingCall = QDBusConnection::systemBus().asyncCall(message);
+ QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(pendingCall, this);
+
+ connect(watcher, &QDBusPendingCallWatcher::finished, [d, this, property] () {
+ if (property == QLatin1String("State")) {
+ d->state = NetworkManager::ActiveConnectionPrivate::convertActiveConnectionState(d->iface.state());
+ Q_EMIT stateChanged(d->state);
+ }
+#if NM_CHECK_VERSION(0, 9, 10)
+ if (property == QLatin1String("Ip4Config")) {
+ d->ipV4ConfigPath = d->iface.ip4Config().path();
+ Q_EMIT ipV4ConfigChanged();
+ } else if (property == QLatin1String("Ip6Config")) {
+ d->ipV6ConfigPath = d->iface.ip6Config().path();
+ Q_EMIT ipV6ConfigChanged();
+ } else if (property == QLatin1String("Dhcp4Config")) {
+ d->dhcp4ConfigPath = d->iface.dhcp4Config().path();
+ Q_EMIT dhcp4ConfigChanged();
+ } else if (property == QLatin1String("Dhcp6Config")) {
+ d->dhcp6ConfigPath = d->iface.dhcp6Config().path();
+ Q_EMIT dhcp6ConfigChanged();
+ }
+#endif
+ });
+ }
}
NetworkManager::ActiveConnection::ActiveConnection(ActiveConnectionPrivate &dd, QObject *parent)
@@ -151,36 +181,66 @@ NetworkManager::ActiveConnection::ActiveConnection(ActiveConnectionPrivate &dd,
* Workaround: Re-check connection state before we watch changes in case it gets changed too quickly
* BUG:352326
*/
+ QStringList properties;
+ const QDBusObjectPath ip4ConfigObjectPath = d->iface.ip4Config();
+ const QDBusObjectPath ip6ConfigObjectPath = d->iface.ip6Config();
+ const QDBusObjectPath dhcp4ConfigObjectPath = d->iface.dhcp4Config();
+ const QDBusObjectPath dhcp6ConfigObjectPath = d->iface.dhcp6Config();
+
if (d->state != NetworkManager::ActiveConnectionPrivate::convertActiveConnectionState(d->iface.state())) {
- d->state = NetworkManager::ActiveConnectionPrivate::convertActiveConnectionState(d->iface.state());
- Q_EMIT stateChanged(d->state);
+ properties << QLatin1String("State");
}
#if NM_CHECK_VERSION(0, 9, 10)
- QDBusObjectPath ip4ConfigObjectPath = d->iface.ip4Config();
if (!ip4ConfigObjectPath.path().isNull() && ip4ConfigObjectPath.path() != d->ipV4ConfigPath) {
- d->ipV4ConfigPath = ip4ConfigObjectPath.path();
- Q_EMIT ipV4ConfigChanged();
+ properties << QLatin1String("Ip4Config");
}
- QDBusObjectPath ip6ConfigObjectPath = d->iface.ip6Config();
if (!ip6ConfigObjectPath.path().isNull() && ip6ConfigObjectPath.path() != d->ipV6ConfigPath) {
- d->ipV6ConfigPath = ip6ConfigObjectPath.path();
- Q_EMIT ipV6ConfigChanged();
+ properties << QLatin1String("Ip6Config");
}
- QDBusObjectPath dhcp4ConfigObjectPath = d->iface.dhcp4Config();
if (!dhcp4ConfigObjectPath.path().isNull() && dhcp4ConfigObjectPath.path() != d->dhcp4ConfigPath) {
- d->dhcp4ConfigPath = dhcp4ConfigObjectPath.path();
- Q_EMIT dhcp4ConfigChanged();
+ properties << QLatin1String("Dhcp4Config");
}
- QDBusObjectPath dhcp6ConfigObjectPath = d->iface.dhcp6Config();
if (!dhcp6ConfigObjectPath.path().isNull() && dhcp6ConfigObjectPath.path() != d->dhcp6ConfigPath) {
- d->dhcp6ConfigPath = dhcp6ConfigObjectPath.path();
- Q_EMIT dhcp6ConfigChanged();
+ properties << QLatin1String("Dhcp6Config");
}
#endif
+
+ Q_FOREACH (const QString &property, properties) {
+ QDBusMessage message = QDBusMessage::createMethodCall(NetworkManager::NetworkManagerPrivate::DBUS_SERVICE,
+ NetworkManager::NetworkManagerPrivate::DBUS_DAEMON_PATH,
+ NetworkManager::NetworkManagerPrivate::FDO_DBUS_PROPERTIES,
+ QLatin1String("Get"));
+ message << d->iface.staticInterfaceName() << property;
+
+ QDBusPendingCall pendingCall = QDBusConnection::systemBus().asyncCall(message);
+ QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(pendingCall, this);
+
+ connect(watcher, &QDBusPendingCallWatcher::finished, [d, this, property] () {
+ if (property == QLatin1String("State")) {
+ d->state = NetworkManager::ActiveConnectionPrivate::convertActiveConnectionState(d->iface.state());
+ Q_EMIT stateChanged(d->state);
+ }
+#if NM_CHECK_VERSION(0, 9, 10)
+ if (property == QLatin1String("Ip4Config")) {
+ d->ipV4ConfigPath = d->iface.ip4Config().path();
+ Q_EMIT ipV4ConfigChanged();
+ } else if (property == QLatin1String("Ip6Config")) {
+ d->ipV6ConfigPath = d->iface.ip6Config().path();
+ Q_EMIT ipV6ConfigChanged();
+ } else if (property == QLatin1String("Dhcp4Config")) {
+ d->dhcp4ConfigPath = d->iface.dhcp4Config().path();
+ Q_EMIT dhcp4ConfigChanged();
+ } else if (property == QLatin1String("Dhcp6Config")) {
+ d->dhcp6ConfigPath = d->iface.dhcp6Config().path();
+ Q_EMIT dhcp6ConfigChanged();
+ }
+#endif
+ });
+ }
}
NetworkManager::ActiveConnection::~ActiveConnection()

@ -1 +1 @@
5bd6cc807ce152c241aa33a16339710a networkmanager-qt-5.18.0.tar.xz
327dc9c1ec64e59357545e842d29e5da networkmanager-qt-5.19.0.tar.xz

Loading…
Cancel
Save