[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [networkmanager-qt] src: make it work with older NM versions
From: Antonio Larrosa <larrosa () kde ! org>
Date: 2015-12-15 23:36:21
Message-ID: E1a8z8n-0006Ys-Vd () scm ! kde ! org
[Download RAW message or body]
Git commit 5f6d58672f7ac4a5bc392c817ac58b9ad0f7e64a by Antonio Larrosa.
Committed on 15/12/2015 at 23:33.
Pushed by antlarr into branch 'master'.
make it work with older NM versions
Added a couple of #ifdef NM_CHECK_VERSION(0, 9, 10) so it compiles
with older NM versions that don't have *ConfigPath variables
M +4 -0 src/activeconnection.cpp
http://commits.kde.org/networkmanager-qt/5f6d58672f7ac4a5bc392c817ac58b9ad0f7e64a
diff --git a/src/activeconnection.cpp b/src/activeconnection.cpp
index 7a6c8dc..f29ca67 100644
--- a/src/activeconnection.cpp
+++ b/src/activeconnection.cpp
@@ -113,6 +113,7 @@ NetworkManager::ActiveConnection::ActiveConnection(const QString &path, QObject
Q_EMIT stateChanged(d->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();
@@ -136,6 +137,7 @@ NetworkManager::ActiveConnection::ActiveConnection(const QString &path, QObject
d->dhcp6ConfigPath = dhcp6ConfigObjectPath.path();
Q_EMIT dhcp6ConfigChanged();
}
+#endif
}
NetworkManager::ActiveConnection::ActiveConnection(ActiveConnectionPrivate &dd, QObject *parent)
@@ -154,6 +156,7 @@ NetworkManager::ActiveConnection::ActiveConnection(ActiveConnectionPrivate &dd,
Q_EMIT stateChanged(d->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();
@@ -177,6 +180,7 @@ NetworkManager::ActiveConnection::ActiveConnection(ActiveConnectionPrivate &dd,
d->dhcp6ConfigPath = dhcp6ConfigObjectPath.path();
Q_EMIT dhcp6ConfigChanged();
}
+#endif
}
NetworkManager::ActiveConnection::~ActiveConnection()
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic