openSUSE Commits
Threads by month
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
October 2016
- 1 participants
- 1583 discussions
Hello community,
here is the log from the commit of package sonnet for openSUSE:Factory checked in at 2016-10-28 12:25:42
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/sonnet (Old)
and /work/SRC/openSUSE:Factory/.sonnet.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "sonnet"
Changes:
--------
--- /work/SRC/openSUSE:Factory/sonnet/sonnet.changes 2016-09-14 23:30:43.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.sonnet.new/sonnet.changes 2016-10-28 12:25:43.000000000 +0200
@@ -1,0 +2,7 @@
+Sun Oct 2 13:13:42 UTC 2016 - hrvoje.senjan(a)gmail.com
+
+- Update to 5.27.0
+ * For more details please see:
+ https://www.kde.org/announcements/kde-frameworks-5.27.0.php
+
+-------------------------------------------------------------------
Old:
----
sonnet-5.26.0.tar.xz
New:
----
sonnet-5.27.0.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ sonnet.spec ++++++
--- /var/tmp/diff_new_pack.8qYIgq/_old 2016-10-28 12:25:44.000000000 +0200
+++ /var/tmp/diff_new_pack.8qYIgq/_new 2016-10-28 12:25:44.000000000 +0200
@@ -18,9 +18,9 @@
%bcond_without lang
%define sonum 5
-%define _tar_path 5.26
+%define _tar_path 5.27
Name: sonnet
-Version: 5.26.0
+Version: 5.27.0
Release: 0
#BuildRequires: aspell-devel
BuildRequires: cmake >= 2.8.12
++++++ sonnet-5.26.0.tar.xz -> sonnet-5.27.0.tar.xz ++++++
++++ 839009 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package solid for openSUSE:Factory checked in at 2016-10-28 12:25:33
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/solid (Old)
and /work/SRC/openSUSE:Factory/.solid.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "solid"
Changes:
--------
--- /work/SRC/openSUSE:Factory/solid/solid.changes 2016-09-14 23:30:33.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.solid.new/solid.changes 2016-10-28 12:25:38.000000000 +0200
@@ -1,0 +2,7 @@
+Sun Oct 2 13:13:29 UTC 2016 - hrvoje.senjan(a)gmail.com
+
+- Update to 5.27.0
+ * For more details please see:
+ https://www.kde.org/announcements/kde-frameworks-5.27.0.php
+
+-------------------------------------------------------------------
Old:
----
solid-5.26.0.tar.xz
New:
----
solid-5.27.0.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ solid.spec ++++++
--- /var/tmp/diff_new_pack.4C4TZw/_old 2016-10-28 12:25:39.000000000 +0200
+++ /var/tmp/diff_new_pack.4C4TZw/_new 2016-10-28 12:25:39.000000000 +0200
@@ -18,9 +18,9 @@
%bcond_without lang
%define lname libKF5Solid5
-%define _tar_path 5.26
+%define _tar_path 5.27
Name: solid
-Version: 5.26.0
+Version: 5.27.0
Release: 0
BuildRequires: bison
BuildRequires: cmake >= 2.8.12
++++++ solid-5.26.0.tar.xz -> solid-5.27.0.tar.xz ++++++
++++ 34094 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package oxygen5-icon-theme for openSUSE:Factory checked in at 2016-10-28 12:25:23
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/oxygen5-icon-theme (Old)
and /work/SRC/openSUSE:Factory/.oxygen5-icon-theme.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "oxygen5-icon-theme"
Changes:
--------
--- /work/SRC/openSUSE:Factory/oxygen5-icon-theme/oxygen5-icon-theme.changes 2016-09-14 23:30:11.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.oxygen5-icon-theme.new/oxygen5-icon-theme.changes 2016-10-28 12:25:30.000000000 +0200
@@ -1,0 +2,10 @@
+Sun Oct 2 13:01:59 UTC 2016 - hrvoje.senjan(a)gmail.com
+
+- Update to 5.27.0
+ * Remove invalid directory from index.theme
+ * Introduce dupe test from breeze-icons
+ * Convert all duplicated icons into symlinks
+ * For more details please see:
+ https://www.kde.org/announcements/kde-frameworks-5.27.0.php
+
+-------------------------------------------------------------------
Old:
----
oxygen-icons5-5.26.0.tar.xz
New:
----
oxygen-icons5-5.27.0.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ oxygen5-icon-theme.spec ++++++
--- /var/tmp/diff_new_pack.HmmsB3/_old 2016-10-28 12:25:38.000000000 +0200
+++ /var/tmp/diff_new_pack.HmmsB3/_new 2016-10-28 12:25:38.000000000 +0200
@@ -16,9 +16,9 @@
#
-%define _tar_path 5.26
+%define _tar_path 5.27
Name: oxygen5-icon-theme
-Version: 5.26.0
+Version: 5.27.0
Release: 0
Summary: Oxygen Icon Theme
License: LGPL-3.0
++++++ oxygen-icons5-5.26.0.tar.xz -> oxygen-icons5-5.27.0.tar.xz ++++++
/work/SRC/openSUSE:Factory/oxygen5-icon-theme/oxygen-icons5-5.26.0.tar.xz /work/SRC/openSUSE:Factory/.oxygen5-icon-theme.new/oxygen-icons5-5.27.0.tar.xz differ: char 26, line 1
1
0
Hello community,
here is the log from the commit of package libKF5NetworkManagerQt for openSUSE:Factory checked in at 2016-10-28 12:25:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libKF5NetworkManagerQt (Old)
and /work/SRC/openSUSE:Factory/.libKF5NetworkManagerQt.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libKF5NetworkManagerQt"
Changes:
--------
--- /work/SRC/openSUSE:Factory/libKF5NetworkManagerQt/libKF5NetworkManagerQt.changes 2016-09-30 15:22:49.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.libKF5NetworkManagerQt.new/libKF5NetworkManagerQt.changes 2016-10-28 12:25:07.000000000 +0200
@@ -1,0 +2,13 @@
+Sun Oct 2 13:01:53 UTC 2016 - hrvoje.senjan(a)gmail.com
+
+- Update to 5.27.0
+ * We need to set the state during initialization
+ * Replace all blocking calls for initialization with
+ just one blocking call
+ * Use standard o.f.DBus.Properties interface for PropertiesChanged
+ signal for NM 1.4.0+ (kde#367938)
+ * For more details please see:
+ https://www.kde.org/announcements/kde-frameworks-5.27.0.php
+- Drop upstreamed fix-icons-with-NM-1.4.0.patch
+
+-------------------------------------------------------------------
Old:
----
fix-icons-with-NM-1.4.0.patch
networkmanager-qt-5.26.0.tar.xz
New:
----
networkmanager-qt-5.27.0.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libKF5NetworkManagerQt.spec ++++++
--- /var/tmp/diff_new_pack.yXEjdI/_old 2016-10-28 12:25:08.000000000 +0200
+++ /var/tmp/diff_new_pack.yXEjdI/_new 2016-10-28 12:25:08.000000000 +0200
@@ -17,9 +17,9 @@
%define soversion 6
-%define _tar_path 5.26
+%define _tar_path 5.27
Name: libKF5NetworkManagerQt
-Version: 5.26.0
+Version: 5.27.0
Release: 0
Summary: A Qt wrapper for NetworkManager DBus API
License: LGPL-2.1 or LGPL-3.0
@@ -27,8 +27,6 @@
Url: http://www.kde.org
Source: http://download.kde.org/stable/frameworks/%{_tar_path}/networkmanager-qt-%{…
Source1: baselibs.conf
-# PATCH-FIX-UPSTREAM fix-icons-with-NM-1.4.0.patch kde#367938 -- fixes wrong network icons with NetworkManager 1.4.0+
-Patch: fix-icons-with-NM-1.4.0.patch
BuildRequires: cmake
BuildRequires: extra-cmake-modules >= %{_tar_path}
BuildRequires: kf5-filesystem
@@ -75,7 +73,6 @@
%prep
%setup -q -n networkmanager-qt-%{version}
-%patch -p1
%build
%cmake_kf5 -d build
++++++ networkmanager-qt-5.26.0.tar.xz -> networkmanager-qt-5.27.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/networkmanager-qt-5.26.0/CMakeLists.txt new/networkmanager-qt-5.27.0/CMakeLists.txt
--- old/networkmanager-qt-5.26.0/CMakeLists.txt 2016-09-06 00:45:49.000000000 +0200
+++ new/networkmanager-qt-5.27.0/CMakeLists.txt 2016-10-02 10:17:05.000000000 +0200
@@ -3,7 +3,7 @@
project(NetworkManagerQt)
include(FeatureSummary)
-find_package(ECM 5.26.0 NO_MODULE)
+find_package(ECM 5.27.0 NO_MODULE)
set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake Modules." URL "https://projects.kde.org/projects/kdesupport/extra-cmake-modules")
feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND FATAL_ON_MISSING_REQUIRED_PACKAGES)
@@ -32,7 +32,7 @@
include(ECMSetupVersion)
include(ECMGenerateHeaders)
-set(KF5_VERSION "5.26.0") # handled by release scripts
+set(KF5_VERSION "5.27.0") # handled by release scripts
ecm_setup_version(${KF5_VERSION} VARIABLE_PREFIX NETWORKMANAGERQT
VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/networkmanagerqt_version.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/networkmanager-qt-5.26.0/src/accesspoint.cpp new/networkmanager-qt-5.27.0/src/accesspoint.cpp
--- old/networkmanager-qt-5.26.0/src/accesspoint.cpp 2016-09-06 00:45:49.000000000 +0200
+++ new/networkmanager-qt-5.27.0/src/accesspoint.cpp 2016-10-02 10:17:05.000000000 +0200
@@ -43,21 +43,6 @@
, q_ptr(q)
{
uni = path;
- if (iface.isValid()) {
- capabilities = convertCapabilities(iface.flags());
- wpaFlags = convertWpaFlags(iface.wpaFlags());
- rsnFlags = convertWpaFlags(iface.rsnFlags());
- signalStrength = iface.strength();
- rawSsid = iface.ssid();
- ssid = QString::fromUtf8(rawSsid);
- frequency = iface.frequency();
- hardwareAddress = iface.hwAddress();
- maxBitRate = iface.maxBitrate();
- mode = q->convertOperationMode(iface.mode());
- if (NetworkManager::checkVersion(1, 0, 6)) {
- lastSeen = iface.lastSeen();
- }
- }
}
NetworkManager::AccessPoint::Capabilities NetworkManager::AccessPointPrivate::convertCapabilities(int caps)
@@ -79,7 +64,19 @@
, d_ptr(new AccessPointPrivate(path, this))
{
Q_D(AccessPoint);
+
+ // Get all AccessPoint's properties at once
+ QVariantMap initialProperties = NetworkManagerPrivate::retrieveInitialProperties(d->iface.staticInterfaceName(), path);
+ if (!initialProperties.isEmpty()) {
+ d->propertiesChanged(initialProperties);
+ }
+
+#if NM_CHECK_VERSION(1, 4, 0)
+ QDBusConnection::systemBus().connect(NetworkManagerPrivate::DBUS_SERVICE, d->uni, NetworkManagerPrivate::FDO_DBUS_PROPERTIES,
+ QLatin1String("PropertiesChanged"), d, SLOT(dbusPropertiesChanged(QString,QVariantMap,QStringList)));
+#else
QObject::connect(&d->iface, &OrgFreedesktopNetworkManagerAccessPointInterface::PropertiesChanged, d, &AccessPointPrivate::propertiesChanged);
+#endif
}
NetworkManager::AccessPoint::~AccessPoint()
@@ -182,6 +179,14 @@
return ourMode;
}
+void NetworkManager::AccessPointPrivate::dbusPropertiesChanged(const QString &interfaceName, const QVariantMap &properties, const QStringList &invalidatedProperties)
+{
+ Q_UNUSED(invalidatedProperties);
+ if (interfaceName == QLatin1String("org.freedesktop.NetworkManager.AccessPoint")) {
+ propertiesChanged(properties);
+ }
+}
+
void NetworkManager::AccessPointPrivate::propertiesChanged(const QVariantMap &properties)
{
Q_Q(AccessPoint);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/networkmanager-qt-5.26.0/src/accesspoint_p.h new/networkmanager-qt-5.27.0/src/accesspoint_p.h
--- old/networkmanager-qt-5.26.0/src/accesspoint_p.h 2016-09-06 00:45:49.000000000 +0200
+++ new/networkmanager-qt-5.27.0/src/accesspoint_p.h 2016-10-02 10:17:05.000000000 +0200
@@ -56,6 +56,7 @@
Q_DECLARE_PUBLIC(AccessPoint)
AccessPoint *q_ptr;
private Q_SLOTS:
+ void dbusPropertiesChanged(const QString &interfaceName, const QVariantMap &properties, const QStringList &invalidatedProperties);
void propertiesChanged(const QVariantMap &properties);
};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/networkmanager-qt-5.26.0/src/activeconnection.cpp new/networkmanager-qt-5.27.0/src/activeconnection.cpp
--- old/networkmanager-qt-5.26.0/src/activeconnection.cpp 2016-09-06 00:45:49.000000000 +0200
+++ new/networkmanager-qt-5.27.0/src/activeconnection.cpp 2016-10-02 10:17:05.000000000 +0200
@@ -38,45 +38,12 @@
: iface(NetworkManagerPrivate::DBUS_SERVICE, dbusPath, QDBusConnection::sessionBus())
#else
: iface(NetworkManagerPrivate::DBUS_SERVICE, dbusPath, QDBusConnection::systemBus())
-
#endif
, dhcp4Config(0)
, dhcp6Config(0)
, q_ptr(q)
{
- connection = NetworkManager::findConnection(iface.connection().path());
path = dbusPath;
- default4 = iface.default4();
- default6 = iface.default6();
- specificObject = iface.specificObject().path();
- state = NetworkManager::ActiveConnectionPrivate::convertActiveConnectionState(iface.state());
- vpn = iface.vpn();
- uuid = iface.uuid();
- master = iface.master().path();
- Q_FOREACH (const QDBusObjectPath & devicePath, iface.devices()) {
- devices.append(devicePath.path());
- }
- id = iface.id();
- type = iface.type();
- QDBusObjectPath ip4ConfigObjectPath = iface.ip4Config();
- if (!ip4ConfigObjectPath.path().isNull() || ip4ConfigObjectPath.path() != QLatin1String("/")) {
- ipV4ConfigPath = ip4ConfigObjectPath.path();
- }
-
- QDBusObjectPath ip6ConfigObjectPath = iface.ip6Config();
- if (!ip6ConfigObjectPath.path().isNull() || ip6ConfigObjectPath.path() != QLatin1String("/")) {
- ipV6ConfigPath = ip6ConfigObjectPath.path();
- }
-
- QDBusObjectPath dhcp4ConfigObjectPath = iface.dhcp4Config();
- if (!dhcp4ConfigObjectPath.path().isNull() && dhcp4ConfigObjectPath.path() != QLatin1String("/")) {
- dhcp4ConfigPath = dhcp4ConfigObjectPath.path();
- }
-
- QDBusObjectPath dhcp6ConfigObjectPath = iface.dhcp6Config();
- if (!dhcp6ConfigObjectPath.path().isNull() && dhcp6ConfigObjectPath.path() != QLatin1String("/")) {
- dhcp6ConfigPath = dhcp6ConfigObjectPath.path();
- }
}
NetworkManager::ActiveConnectionPrivate::~ActiveConnectionPrivate()
@@ -93,8 +60,18 @@
{
Q_D(ActiveConnection);
- connect(&d->iface, &OrgFreedesktopNetworkManagerConnectionActiveInterface::PropertiesChanged, d, &ActiveConnectionPrivate::propertiesChanged);
+ // Get all ActiveConnection's at once
+ QVariantMap initialProperties = NetworkManagerPrivate::retrieveInitialProperties(d->iface.staticInterfaceName(), path);
+ if (!initialProperties.isEmpty()) {
+ d->propertiesChanged(initialProperties);
+ }
+#if NM_CHECK_VERSION(1, 4, 0)
+ QDBusConnection::systemBus().connect(NetworkManagerPrivate::DBUS_SERVICE, d->path, NetworkManagerPrivate::FDO_DBUS_PROPERTIES,
+ QLatin1String("PropertiesChanged"), d, SLOT(dbusPropertiesChanged(QString,QVariantMap,QStringList)));
+#else
+ connect(&d->iface, &OrgFreedesktopNetworkManagerConnectionActiveInterface::PropertiesChanged, d, &ActiveConnectionPrivate::propertiesChanged);
+#endif
/*
* Workaround: Re-check connection state before we watch changes in case it gets changed too quickly
* BUG:352326
@@ -107,7 +84,12 @@
{
Q_D(ActiveConnection);
+#if NM_CHECK_VERSION(1, 4, 0)
+ QDBusConnection::systemBus().connect(NetworkManagerPrivate::DBUS_SERVICE, d->path, NetworkManagerPrivate::FDO_DBUS_PROPERTIES,
+ QLatin1String("PropertiesChanged"), d, SLOT(dbusPropertiesChanged(QString,QVariantMap,QStringList)));
+#else
connect(&d->iface, &OrgFreedesktopNetworkManagerConnectionActiveInterface::PropertiesChanged, d, &ActiveConnectionPrivate::propertiesChanged);
+#endif
/*
* Workaround: Re-check connection state before we watch changes in case it gets changed too quickly
@@ -302,102 +284,118 @@
}
}
-void NetworkManager::ActiveConnectionPrivate::propertiesChanged(const QVariantMap &properties)
+void NetworkManager::ActiveConnectionPrivate::dbusPropertiesChanged(const QString &interfaceName, const QVariantMap &properties, const QStringList &invalidatedProperties)
{
- Q_Q(ActiveConnection);
+ Q_UNUSED(invalidatedProperties);
+ if (interfaceName == QLatin1String("org.freedesktop.NetworkManager.Connection.Active")) {
+ propertiesChanged(properties);
+ }
+}
+
+void NetworkManager::ActiveConnectionPrivate::propertiesChanged(const QVariantMap &properties)
+{
// qCDebug(NMQT) << Q_FUNC_INFO << properties;
QVariantMap::const_iterator it = properties.constBegin();
while (it != properties.constEnd()) {
- const QString property = it.key();
- if (property == QLatin1String("Connection")) {
- connection = NetworkManager::findConnection(qdbus_cast<QDBusObjectPath>(*it).path());
- Q_EMIT q->connectionChanged(connection);
- const QString tmpId = connection->settings()->id();
- const QString tmpType = connection->settings()->typeAsString(connection->settings()->connectionType());
- if (tmpId != id) {
- id = tmpId;
- Q_EMIT q->idChanged(id);
- }
+ propertyChanged(it.key(), it.value());
+ ++it;
+ }
+}
- if (tmpType != type) {
- Q_EMIT q->typeChanged(NetworkManager::ConnectionSettings::typeFromString(type));
- }
- } else if (property == QLatin1String("Default")) {
- default4 = it->toBool();
- Q_EMIT q->default4Changed(default4);
- } else if (property == QLatin1String("Default6")) {
- default6 = it->toBool();
- Q_EMIT q->default6Changed(default6);
- } else if (property == QLatin1String("Dhcp4Config")) {
- QDBusObjectPath dhcp4ConfigPathTmp = (*it).value<QDBusObjectPath>();
- if (dhcp4ConfigPathTmp.path().isNull()) {
- dhcp4Config.clear();
- dhcp4ConfigPath.clear();
- } else if (!dhcp4Config || dhcp4Config->path() != dhcp4ConfigPathTmp.path()) {
- dhcp4Config.clear();
- dhcp4ConfigPath = dhcp4ConfigPathTmp.path();
- }
- Q_EMIT q->dhcp4ConfigChanged();
- } else if (property == QLatin1String("Dhcp6Config")) {
- QDBusObjectPath dhcp6ConfigPathTmp = (*it).value<QDBusObjectPath>();
- if (dhcp6ConfigPathTmp.path().isNull()) {
- dhcp6Config.clear();
- dhcp6ConfigPath.clear();
- } else if (!dhcp6Config || dhcp6Config->path() != dhcp6ConfigPathTmp.path()) {
- dhcp6Config.clear();
- dhcp6ConfigPath = dhcp6ConfigPathTmp.path();
- }
- Q_EMIT q->dhcp6ConfigChanged();
- } else if (property == QLatin1String("Ip4Config")) {
- QDBusObjectPath ip4ConfigObjectPathTmp = (*it).value<QDBusObjectPath>();
- if (ip4ConfigObjectPathTmp.path().isNull() || ip4ConfigObjectPathTmp.path() == QLatin1String("/")) {
- ipV4ConfigPath.clear();
- } else {
- ipV4ConfigPath = ip4ConfigObjectPathTmp.path();
- }
- ipV4Config = IpConfig();
- Q_EMIT q->ipV4ConfigChanged();
- } else if (property == QLatin1String("Ip6Config")) {
- QDBusObjectPath ip6ConfigObjectPathTmp = (*it).value<QDBusObjectPath>();
- if (ip6ConfigObjectPathTmp.path().isNull() || ip6ConfigObjectPathTmp.path() == QLatin1String("/")) {
- ipV6ConfigPath.clear();
- } else {
- ipV6ConfigPath = ip6ConfigObjectPathTmp.path();
- }
- ipV6Config = IpConfig();
- Q_EMIT q->ipV6ConfigChanged();
- } else if (property == QLatin1String("Id")) {
- id = it->toString();
+void NetworkManager::ActiveConnectionPrivate::propertyChanged(const QString &property, const QVariant &value)
+{
+ Q_Q(ActiveConnection);
+
+ // qCDebug(NMQT) << property << " - " << value;
+
+ if (property == QLatin1String("Connection")) {
+ connection = NetworkManager::findConnection(qdbus_cast<QDBusObjectPath>(value).path());
+ Q_EMIT q->connectionChanged(connection);
+ const QString tmpId = connection->settings()->id();
+ const QString tmpType = connection->settings()->typeAsString(connection->settings()->connectionType());
+ if (tmpId != id) {
+ id = tmpId;
Q_EMIT q->idChanged(id);
- } else if (property == QLatin1String("Type")) {
- type = it->toString();
+ }
+
+ if (tmpType != type) {
Q_EMIT q->typeChanged(NetworkManager::ConnectionSettings::typeFromString(type));
- } else if (property == QLatin1String("Master")) {
- master = qdbus_cast<QDBusObjectPath>(*it).path();
- Q_EMIT q->masterChanged(master);
- } else if (property == QLatin1String("SpecificObject")) {
- specificObject = qdbus_cast<QDBusObjectPath>(*it).path();
- Q_EMIT q->specificObjectChanged(specificObject);
- } else if (property == QLatin1String("State")) {
- state = NetworkManager::ActiveConnectionPrivate::convertActiveConnectionState(it->toUInt());
- Q_EMIT q->stateChanged(state);
- } else if (property == QLatin1String("Vpn")) {
- vpn = it->toBool();
- Q_EMIT q->vpnChanged(vpn);
- } else if (property == QLatin1String("Uuid")) {
- uuid = it->toString();
- Q_EMIT q->uuidChanged(uuid);
- } else if (property == QLatin1String("Devices")) {
- devices.clear();
- Q_FOREACH (const QDBusObjectPath & path, it->value<QList<QDBusObjectPath> >()) {
- devices.append(path.path());
- }
- Q_EMIT q->devicesChanged();
+ }
+ } else if (property == QLatin1String("Default")) {
+ default4 = value.toBool();
+ Q_EMIT q->default4Changed(default4);
+ } else if (property == QLatin1String("Default6")) {
+ default6 = value.toBool();
+ Q_EMIT q->default6Changed(default6);
+ } else if (property == QLatin1String("Dhcp4Config")) {
+ QDBusObjectPath dhcp4ConfigPathTmp = (value).value<QDBusObjectPath>();
+ if (dhcp4ConfigPathTmp.path().isNull()) {
+ dhcp4Config.clear();
+ dhcp4ConfigPath.clear();
+ } else if (!dhcp4Config || dhcp4Config->path() != dhcp4ConfigPathTmp.path()) {
+ dhcp4Config.clear();
+ dhcp4ConfigPath = dhcp4ConfigPathTmp.path();
+ }
+ Q_EMIT q->dhcp4ConfigChanged();
+ } else if (property == QLatin1String("Dhcp6Config")) {
+ QDBusObjectPath dhcp6ConfigPathTmp = (value).value<QDBusObjectPath>();
+ if (dhcp6ConfigPathTmp.path().isNull()) {
+ dhcp6Config.clear();
+ dhcp6ConfigPath.clear();
+ } else if (!dhcp6Config || dhcp6Config->path() != dhcp6ConfigPathTmp.path()) {
+ dhcp6Config.clear();
+ dhcp6ConfigPath = dhcp6ConfigPathTmp.path();
+ }
+ Q_EMIT q->dhcp6ConfigChanged();
+ } else if (property == QLatin1String("Ip4Config")) {
+ QDBusObjectPath ip4ConfigObjectPathTmp = (value).value<QDBusObjectPath>();
+ if (ip4ConfigObjectPathTmp.path().isNull() || ip4ConfigObjectPathTmp.path() == QLatin1String("/")) {
+ ipV4ConfigPath.clear();
} else {
- qCWarning(NMQT) << Q_FUNC_INFO << "Unhandled property" << property;
+ ipV4ConfigPath = ip4ConfigObjectPathTmp.path();
}
- ++it;
+ ipV4Config = IpConfig();
+ Q_EMIT q->ipV4ConfigChanged();
+ } else if (property == QLatin1String("Ip6Config")) {
+ QDBusObjectPath ip6ConfigObjectPathTmp = (value).value<QDBusObjectPath>();
+ if (ip6ConfigObjectPathTmp.path().isNull() || ip6ConfigObjectPathTmp.path() == QLatin1String("/")) {
+ ipV6ConfigPath.clear();
+ } else {
+ ipV6ConfigPath = ip6ConfigObjectPathTmp.path();
+ }
+ ipV6Config = IpConfig();
+ Q_EMIT q->ipV6ConfigChanged();
+ } else if (property == QLatin1String("Id")) {
+ id = value.toString();
+ Q_EMIT q->idChanged(id);
+ } else if (property == QLatin1String("Type")) {
+ type = value.toString();
+ Q_EMIT q->typeChanged(NetworkManager::ConnectionSettings::typeFromString(type));
+ } else if (property == QLatin1String("Master")) {
+ master = qdbus_cast<QDBusObjectPath>(value).path();
+ Q_EMIT q->masterChanged(master);
+ } else if (property == QLatin1String("SpecificObject")) {
+ specificObject = qdbus_cast<QDBusObjectPath>(value).path();
+ Q_EMIT q->specificObjectChanged(specificObject);
+ } else if (property == QLatin1String("State")) {
+ state = NetworkManager::ActiveConnectionPrivate::convertActiveConnectionState(value.toUInt());
+ Q_EMIT q->stateChanged(state);
+ } else if (property == QLatin1String("Vpn")) {
+ vpn = value.toBool();
+ Q_EMIT q->vpnChanged(vpn);
+ } else if (property == QLatin1String("Uuid")) {
+ uuid = value.toString();
+ Q_EMIT q->uuidChanged(uuid);
+ } else if (property == QLatin1String("Devices")) {
+ devices.clear();
+ Q_FOREACH (const QDBusObjectPath & path, qdbus_cast< QList<QDBusObjectPath> >(value)) {
+ qCDebug(NMQT) << "Device append " << path.path();
+ devices.append(path.path());
+ }
+ Q_EMIT q->devicesChanged();
+ } else {
+ qCWarning(NMQT) << Q_FUNC_INFO << "Unhandled property" << property;
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/networkmanager-qt-5.26.0/src/activeconnection_p.h new/networkmanager-qt-5.27.0/src/activeconnection_p.h
--- old/networkmanager-qt-5.26.0/src/activeconnection_p.h 2016-09-06 00:45:49.000000000 +0200
+++ new/networkmanager-qt-5.27.0/src/activeconnection_p.h 2016-10-02 10:17:05.000000000 +0200
@@ -64,8 +64,18 @@
* BUG:352326
*/
void recheckProperties();
-private Q_SLOTS:
+public:
+ /**
+ * When subclassing make sure to call the parent class method
+ * if the property was not useful to your new class
+ */
+ virtual void propertyChanged(const QString &property, const QVariant &value);
+
+public Q_SLOTS:
void propertiesChanged(const QVariantMap &properties);
+
+private Q_SLOTS:
+ void dbusPropertiesChanged(const QString &interfaceName, const QVariantMap &properties, const QStringList &invalidatedProperties);
};
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/networkmanager-qt-5.26.0/src/adsldevice.cpp new/networkmanager-qt-5.27.0/src/adsldevice.cpp
--- old/networkmanager-qt-5.26.0/src/adsldevice.cpp 2016-09-06 00:45:49.000000000 +0200
+++ new/networkmanager-qt-5.27.0/src/adsldevice.cpp 2016-10-02 10:17:05.000000000 +0200
@@ -30,7 +30,6 @@
#endif
, carrier(false)
{
- carrier = iface.carrier();
}
NetworkManager::AdslDevice::~AdslDevice()
@@ -41,7 +40,18 @@
: Device(*new AdslDevicePrivate(path, this), parent)
{
Q_D(AdslDevice);
+
+ QVariantMap initialProperties = NetworkManagerPrivate::retrieveInitialProperties(d->iface.staticInterfaceName(), path);
+ if (!initialProperties.isEmpty()) {
+ d->propertiesChanged(initialProperties);
+ }
+
+#if NM_CHECK_VERSION(1, 4, 0)
+ QDBusConnection::systemBus().connect(NetworkManagerPrivate::DBUS_SERVICE, d->uni, NetworkManagerPrivate::FDO_DBUS_PROPERTIES,
+ QLatin1String("PropertiesChanged"), d, SLOT(dbusPropertiesChanged(QString,QVariantMap,QStringList)));
+#else
connect(&d->iface, &OrgFreedesktopNetworkManagerDeviceAdslInterface::PropertiesChanged, d, &AdslDevicePrivate::propertiesChanged);
+#endif
}
NetworkManager::AdslDevicePrivate::~AdslDevicePrivate()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/networkmanager-qt-5.26.0/src/bluetoothdevice.cpp new/networkmanager-qt-5.27.0/src/bluetoothdevice.cpp
--- old/networkmanager-qt-5.26.0/src/bluetoothdevice.cpp 2016-09-06 00:45:49.000000000 +0200
+++ new/networkmanager-qt-5.27.0/src/bluetoothdevice.cpp 2016-10-02 10:17:05.000000000 +0200
@@ -33,16 +33,24 @@
, btIface(NetworkManagerPrivate::DBUS_SERVICE, path, QDBusConnection::systemBus())
#endif
{
- btCapabilities = static_cast<QFlags<NetworkManager::BluetoothDevice::Capability> >(btIface.btCapabilities());
- hardwareAddress = btIface.hwAddress();
- name = btIface.name();
}
NetworkManager::BluetoothDevice::BluetoothDevice(const QString &path, QObject *parent)
: ModemDevice(*new BluetoothDevicePrivate(path, this), parent)
{
Q_D(BluetoothDevice);
+
+ QVariantMap initialProperties = NetworkManagerPrivate::retrieveInitialProperties(d->btIface.staticInterfaceName(), path);
+ if (!initialProperties.isEmpty()) {
+ d->propertiesChanged(initialProperties);
+ }
+
+#if NM_CHECK_VERSION(1, 4, 0)
+ QDBusConnection::systemBus().connect(NetworkManagerPrivate::DBUS_SERVICE, d->uni, NetworkManagerPrivate::FDO_DBUS_PROPERTIES,
+ QLatin1String("PropertiesChanged"), d, SLOT(dbusPropertiesChanged(QString,QVariantMap,QStringList)));
+#else
connect(&d->btIface, &OrgFreedesktopNetworkManagerDeviceBluetoothInterface::PropertiesChanged, d, &BluetoothDevicePrivate::propertiesChanged);
+#endif
}
NetworkManager::BluetoothDevice::~BluetoothDevice()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/networkmanager-qt-5.26.0/src/bonddevice.cpp new/networkmanager-qt-5.27.0/src/bonddevice.cpp
--- old/networkmanager-qt-5.26.0/src/bonddevice.cpp 2016-09-06 00:45:49.000000000 +0200
+++ new/networkmanager-qt-5.27.0/src/bonddevice.cpp 2016-10-02 10:17:05.000000000 +0200
@@ -32,13 +32,6 @@
#endif
, carrier(false)
{
- carrier = iface.carrier();
- hwAddress = iface.hwAddress();
- QStringList list;
- Q_FOREACH (const QDBusObjectPath & op, iface.slaves()) {
- list << op.path();
- }
- slaves = list;
}
NetworkManager::BondDevice::~BondDevice()
@@ -49,7 +42,18 @@
Device(*new BondDevicePrivate(path, this), parent)
{
Q_D(BondDevice);
+
+ QVariantMap initialProperties = NetworkManagerPrivate::retrieveInitialProperties(d->iface.staticInterfaceName(), path);
+ if (!initialProperties.isEmpty()) {
+ d->propertiesChanged(initialProperties);
+ }
+
+#if NM_CHECK_VERSION(1, 4, 0)
+ QDBusConnection::systemBus().connect(NetworkManagerPrivate::DBUS_SERVICE, d->uni, NetworkManagerPrivate::FDO_DBUS_PROPERTIES,
+ QLatin1String("PropertiesChanged"), d, SLOT(dbusPropertiesChanged(QString,QVariantMap,QStringList)));
+#else
connect(&d->iface, &OrgFreedesktopNetworkManagerDeviceBondInterface::PropertiesChanged, d, &BondDevicePrivate::propertiesChanged);
+#endif
}
NetworkManager::BondDevicePrivate::~BondDevicePrivate()
@@ -94,7 +98,7 @@
Q_EMIT q->hwAddressChanged(hwAddress);
} else if (property == QLatin1String("Slaves")) {
QStringList list;
- Q_FOREACH (const QDBusObjectPath & op, value.value<QList<QDBusObjectPath> >()) {
+ Q_FOREACH (const QDBusObjectPath & op, qdbus_cast< QList<QDBusObjectPath> >(value)) {
list << op.path();
}
slaves = list;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/networkmanager-qt-5.26.0/src/bridgedevice.cpp new/networkmanager-qt-5.27.0/src/bridgedevice.cpp
--- old/networkmanager-qt-5.26.0/src/bridgedevice.cpp 2016-09-06 00:45:49.000000000 +0200
+++ new/networkmanager-qt-5.27.0/src/bridgedevice.cpp 2016-10-02 10:17:05.000000000 +0200
@@ -30,13 +30,6 @@
#endif
, carrier(false)
{
- carrier = iface.carrier();
- hwAddress = iface.hwAddress();
- QStringList list;
- Q_FOREACH (const QDBusObjectPath & op, iface.slaves()) {
- list << op.path();
- }
- slaves = list;
}
NetworkManager::BridgeDevicePrivate::~BridgeDevicePrivate()
@@ -47,7 +40,18 @@
Device(*new BridgeDevicePrivate(path, this), parent)
{
Q_D(BridgeDevice);
+
+ QVariantMap initialProperties = NetworkManagerPrivate::retrieveInitialProperties(d->iface.staticInterfaceName(), path);
+ if (!initialProperties.isEmpty()) {
+ d->propertiesChanged(initialProperties);
+ }
+
+#if NM_CHECK_VERSION(1, 4, 0)
+ QDBusConnection::systemBus().connect(NetworkManagerPrivate::DBUS_SERVICE, d->uni, NetworkManagerPrivate::FDO_DBUS_PROPERTIES,
+ QLatin1String("PropertiesChanged"), d, SLOT(dbusPropertiesChanged(QString,QVariantMap,QStringList)));
+#else
connect(&d->iface, &OrgFreedesktopNetworkManagerDeviceBridgeInterface::PropertiesChanged, d, &BridgeDevicePrivate::propertiesChanged);
+#endif
}
NetworkManager::BridgeDevice::~BridgeDevice()
@@ -92,7 +96,7 @@
Q_EMIT q->hwAddressChanged(hwAddress);
} else if (property == QLatin1String("Slaves")) {
QStringList list;
- Q_FOREACH (const QDBusObjectPath & op, value.value<QList<QDBusObjectPath> >()) {
+ Q_FOREACH (const QDBusObjectPath & op, qdbus_cast< QList<QDBusObjectPath> >(value)) {
list << op.path();
}
slaves = list;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/networkmanager-qt-5.26.0/src/connection.cpp new/networkmanager-qt-5.27.0/src/connection.cpp
--- old/networkmanager-qt-5.26.0/src/connection.cpp 2016-09-06 00:45:49.000000000 +0200
+++ new/networkmanager-qt-5.27.0/src/connection.cpp 2016-10-02 10:17:05.000000000 +0200
@@ -74,7 +74,12 @@
connect(&d->iface, &OrgFreedesktopNetworkManagerSettingsConnectionInterface::Updated, d, &ConnectionPrivate::onConnectionUpdated);
connect(&d->iface, &OrgFreedesktopNetworkManagerSettingsConnectionInterface::Removed, d, &ConnectionPrivate::onConnectionRemoved);
d->unsaved = d->iface.unsaved();
+#if NM_CHECK_VERSION(1, 4, 0)
+ QDBusConnection::systemBus().connect(NetworkManagerPrivate::DBUS_SERVICE, d->path, NetworkManagerPrivate::FDO_DBUS_PROPERTIES,
+ QLatin1String("PropertiesChanged"), d, SLOT(dbusPropertiesChanged(QString,QVariantMap,QStringList)));
+#else
connect(&d->iface, &OrgFreedesktopNetworkManagerSettingsConnectionInterface::PropertiesChanged, d, &ConnectionPrivate::onPropertiesChanged);
+#endif
}
NetworkManager::Connection::~Connection()
@@ -178,6 +183,14 @@
Q_EMIT q->removed(tmpPath);
}
+void NetworkManager::ConnectionPrivate::dbusPropertiesChanged(const QString &interfaceName, const QVariantMap &properties, const QStringList &invalidatedProperties)
+{
+ Q_UNUSED(invalidatedProperties);
+ if (interfaceName == QLatin1String("org.freedesktop.NetworkManager.Settings.Connection")) {
+ onPropertiesChanged(properties);
+ }
+}
+
void NetworkManager::ConnectionPrivate::onPropertiesChanged(const QVariantMap &properties)
{
Q_Q(Connection);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/networkmanager-qt-5.26.0/src/connection_p.h new/networkmanager-qt-5.27.0/src/connection_p.h
--- old/networkmanager-qt-5.26.0/src/connection_p.h 2016-09-06 00:45:49.000000000 +0200
+++ new/networkmanager-qt-5.27.0/src/connection_p.h 2016-10-02 10:17:05.000000000 +0200
@@ -54,6 +54,7 @@
private Q_SLOTS:
void onConnectionUpdated();
void onConnectionRemoved();
+ void dbusPropertiesChanged(const QString &interfaceName, const QVariantMap &properties, const QStringList &invalidatedProperties);
void onPropertiesChanged(const QVariantMap &properties);
};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/networkmanager-qt-5.26.0/src/device.cpp new/networkmanager-qt-5.27.0/src/device.cpp
--- old/networkmanager-qt-5.26.0/src/device.cpp 2016-09-06 00:45:49.000000000 +0200
+++ new/networkmanager-qt-5.27.0/src/device.cpp 2016-10-02 10:17:05.000000000 +0200
@@ -104,47 +104,6 @@
, mtu(0)
, q_ptr(q)
{
- activeConnection = deviceIface.activeConnection().path();
- driver = deviceIface.driver();
- interfaceName = deviceIface.interface();
- ipInterface = deviceIface.ipInterface();
- ipV4Address = QHostAddress(ntohl(deviceIface.ip4Address()));
- managed = deviceIface.managed();
- udi = deviceIface.udi();
- firmwareMissing = deviceIface.firmwareMissing();
- driverVersion = deviceIface.driverVersion();
- firmwareVersion = deviceIface.firmwareVersion();
- autoconnect = deviceIface.autoconnect();
- reason = NetworkManager::DevicePrivate::convertReason(deviceIface.stateReason().reason);
- Q_FOREACH (const QDBusObjectPath & availableConnection, deviceIface.availableConnections()) {
- availableConnections << availableConnection.path();
- }
- physicalPortId = deviceIface.physicalPortId();
- mtu = deviceIface.mtu();
- nmPluginMissing = NetworkManager::checkVersion(1, 2, 0) ? deviceIface.nmPluginMissing() : false;
- metered = NetworkManager::checkVersion(1, 0, 6)
- ? NetworkManager::DevicePrivate::convertMeteredStatus(deviceIface.metered())
- : NetworkManager::Device::UnknownStatus;
-
- QDBusObjectPath ip4ConfigObjectPath = deviceIface.ip4Config();
- if (!ip4ConfigObjectPath.path().isNull() || ip4ConfigObjectPath.path() != QLatin1String("/")) {
- ipV4ConfigPath = ip4ConfigObjectPath.path();
- }
-
- QDBusObjectPath ip6ConfigObjectPath = deviceIface.ip6Config();
- if (!ip6ConfigObjectPath.path().isNull() || ip6ConfigObjectPath.path() != QLatin1String("/")) {
- ipV6ConfigPath = ip6ConfigObjectPath.path();
- }
-
- QDBusObjectPath dhcp4ConfigObjectPath = deviceIface.dhcp4Config();
- if (!dhcp4ConfigObjectPath.path().isNull() && dhcp4ConfigObjectPath.path() != QLatin1String("/")) {
- dhcp4ConfigPath = dhcp4ConfigObjectPath.path();
- }
-
- QDBusObjectPath dhcp6ConfigObjectPath = deviceIface.dhcp6Config();
- if (!dhcp6ConfigObjectPath.path().isNull() && dhcp6ConfigObjectPath.path() != QLatin1String("/")) {
- dhcp6ConfigPath = dhcp6ConfigObjectPath.path();
- }
}
NetworkManager::DevicePrivate::~DevicePrivate()
@@ -161,10 +120,17 @@
qDBusRegisterMetaType<IpV6DBusRoute>();
qDBusRegisterMetaType<IpV6DBusRouteList>();
qDBusRegisterMetaType<DeviceDBusStateReason>();
- capabilities = convertCapabilities(deviceIface.capabilities());
- connectionState = convertState(deviceIface.state());
+
+ // This needs to be initialized as soon as possible, because based on this property
+ // we initialize the device type
deviceType = static_cast<Device::Type>(deviceIface.deviceType());
+ // Get all Device's properties at once
+ QVariantMap initialProperties = NetworkManagerPrivate::retrieveInitialProperties(deviceIface.staticInterfaceName(), uni);
+ if (!initialProperties.isEmpty()) {
+ propertiesChanged(initialProperties);
+ }
+
QObject::connect(&deviceIface, &OrgFreedesktopNetworkManagerDeviceInterface::StateChanged, this, &DevicePrivate::deviceStateChanged);
}
@@ -215,6 +181,7 @@
{
Q_Q(Device);
+ // qCDebug(NMQT) << property << " - " << value;
if (property == QLatin1String("ActiveConnection")) {
// FIXME workaround, because NM doesn't Q_EMIT correct value
// d->activeConnection = value.value<QDBusObjectPath>.path();
@@ -570,6 +537,14 @@
Q_EMIT q->stateChanged(connectionState, NetworkManager::DevicePrivate::convertState(oldState), NetworkManager::DevicePrivate::convertReason(reason));
}
+void NetworkManager::DevicePrivate::dbusPropertiesChanged(const QString &interfaceName, const QVariantMap &properties, const QStringList &invalidatedProperties)
+{
+ Q_UNUSED(invalidatedProperties);
+ if (interfaceName.contains(QLatin1String("org.freedesktop.NetworkManager.Device"))) {
+ propertiesChanged(properties);
+ }
+}
+
void NetworkManager::DevicePrivate::propertiesChanged(const QVariantMap &properties)
{
// qCDebug(NMQT) << Q_FUNC_INFO << properties;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/networkmanager-qt-5.26.0/src/device_p.h new/networkmanager-qt-5.27.0/src/device_p.h
--- old/networkmanager-qt-5.26.0/src/device_p.h 2016-09-06 00:45:49.000000000 +0200
+++ new/networkmanager-qt-5.27.0/src/device_p.h 2016-10-02 10:17:05.000000000 +0200
@@ -86,6 +86,7 @@
public Q_SLOTS:
void deviceStateChanged(uint, uint, uint);
+ void dbusPropertiesChanged(const QString &interfaceName, const QVariantMap &properties, const QStringList &invalidatedProperties);
void propertiesChanged(const QVariantMap &properties);
};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/networkmanager-qt-5.26.0/src/dhcp4config.cpp new/networkmanager-qt-5.27.0/src/dhcp4config.cpp
--- old/networkmanager-qt-5.26.0/src/dhcp4config.cpp 2016-09-06 00:45:49.000000000 +0200
+++ new/networkmanager-qt-5.27.0/src/dhcp4config.cpp 2016-10-02 10:17:05.000000000 +0200
@@ -44,8 +44,12 @@
{
Q_D(Dhcp4Config);
Q_UNUSED(owner);
-
+#if NM_CHECK_VERSION(1, 4, 0)
+ QDBusConnection::systemBus().connect(NetworkManagerPrivate::DBUS_SERVICE, d->myPath, NetworkManagerPrivate::FDO_DBUS_PROPERTIES,
+ QLatin1String("PropertiesChanged"), d, SLOT(dbusPropertiesChanged(QString,QVariantMap,QStringList)));
+#else
connect(&d->dhcp4Iface, &OrgFreedesktopNetworkManagerDHCP4ConfigInterface::PropertiesChanged, d, &Dhcp4ConfigPrivate::dhcp4PropertiesChanged);
+#endif
d->options = d->dhcp4Iface.options();
}
@@ -76,6 +80,14 @@
return value;
}
+void NetworkManager::Dhcp4ConfigPrivate::dbusPropertiesChanged(const QString &interfaceName, const QVariantMap &properties, const QStringList &invalidatedProperties)
+{
+ Q_UNUSED(invalidatedProperties);
+ if (interfaceName == QLatin1String("org.freedesktop.NetworkManager.DHCP4Config")) {
+ dhcp4PropertiesChanged(properties);
+ }
+}
+
void NetworkManager::Dhcp4ConfigPrivate::dhcp4PropertiesChanged(const QVariantMap &properties)
{
Q_Q(Dhcp4Config);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/networkmanager-qt-5.26.0/src/dhcp4config_p.h new/networkmanager-qt-5.27.0/src/dhcp4config_p.h
--- old/networkmanager-qt-5.26.0/src/dhcp4config_p.h 2016-09-06 00:45:49.000000000 +0200
+++ new/networkmanager-qt-5.27.0/src/dhcp4config_p.h 2016-10-02 10:17:05.000000000 +0200
@@ -41,6 +41,7 @@
Q_DECLARE_PUBLIC(Dhcp4Config)
Dhcp4Config *q_ptr;
protected Q_SLOTS:
+ void dbusPropertiesChanged(const QString &interfaceName, const QVariantMap &properties, const QStringList &invalidatedProperties);
void dhcp4PropertiesChanged(const QVariantMap &);
};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/networkmanager-qt-5.26.0/src/dhcp6config.cpp new/networkmanager-qt-5.27.0/src/dhcp6config.cpp
--- old/networkmanager-qt-5.26.0/src/dhcp6config.cpp 2016-09-06 00:45:49.000000000 +0200
+++ new/networkmanager-qt-5.27.0/src/dhcp6config.cpp 2016-10-02 10:17:05.000000000 +0200
@@ -43,8 +43,12 @@
{
Q_D(Dhcp6Config);
Q_UNUSED(owner);
-
+#if NM_CHECK_VERSION(1, 4, 0)
+ QDBusConnection::systemBus().connect(NetworkManagerPrivate::DBUS_SERVICE, d->path, NetworkManagerPrivate::FDO_DBUS_PROPERTIES,
+ QLatin1String("PropertiesChanged"), d, SLOT(dbusPropertiesChanged(QString,QVariantMap,QStringList)));
+#else
connect(&d->dhcp6Iface, &OrgFreedesktopNetworkManagerDHCP6ConfigInterface::PropertiesChanged, d, &Dhcp6ConfigPrivate::dhcp6PropertiesChanged);
+#endif
d->options = d->dhcp6Iface.options();
}
@@ -75,6 +79,15 @@
return value;
}
+void NetworkManager::Dhcp6ConfigPrivate::dbusPropertiesChanged(const QString &interfaceName, const QVariantMap &properties, const QStringList &invalidatedProperties)
+{
+ Q_UNUSED(invalidatedProperties);
+ if (interfaceName == QLatin1String("org.freedesktop.NetworkManager.DHCP6Config")) {
+ dhcp6PropertiesChanged(properties);
+ }
+}
+
+
void NetworkManager::Dhcp6ConfigPrivate::dhcp6PropertiesChanged(const QVariantMap &properties)
{
Q_Q(Dhcp6Config);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/networkmanager-qt-5.26.0/src/dhcp6config_p.h new/networkmanager-qt-5.27.0/src/dhcp6config_p.h
--- old/networkmanager-qt-5.26.0/src/dhcp6config_p.h 2016-09-06 00:45:49.000000000 +0200
+++ new/networkmanager-qt-5.27.0/src/dhcp6config_p.h 2016-10-02 10:17:05.000000000 +0200
@@ -41,6 +41,7 @@
Q_DECLARE_PUBLIC(Dhcp6Config)
Dhcp6Config *q_ptr;
protected Q_SLOTS:
+ void dbusPropertiesChanged(const QString &interfaceName, const QVariantMap &properties, const QStringList &invalidatedProperties);
void dhcp6PropertiesChanged(const QVariantMap &);
};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/networkmanager-qt-5.26.0/src/genericdevice.cpp new/networkmanager-qt-5.27.0/src/genericdevice.cpp
--- old/networkmanager-qt-5.26.0/src/genericdevice.cpp 2016-09-06 00:45:49.000000000 +0200
+++ new/networkmanager-qt-5.27.0/src/genericdevice.cpp 2016-10-02 10:17:05.000000000 +0200
@@ -30,8 +30,6 @@
, iface(NetworkManagerPrivate::DBUS_SERVICE, path, QDBusConnection::systemBus())
#endif
{
- hwAddress = iface.hwAddress();
- typeDescription = iface.typeDescription();
}
NetworkManager::GenericDevicePrivate::~GenericDevicePrivate()
@@ -42,7 +40,18 @@
: Device(*new NetworkManager::GenericDevicePrivate(path, this), parent)
{
Q_D(GenericDevice);
+
+ QVariantMap initialProperties = NetworkManagerPrivate::retrieveInitialProperties(d->iface.staticInterfaceName(), path);
+ if (!initialProperties.isEmpty()) {
+ d->propertiesChanged(initialProperties);
+ }
+
+#if NM_CHECK_VERSION(1, 4, 0)
+ QDBusConnection::systemBus().connect(NetworkManagerPrivate::DBUS_SERVICE, d->uni, NetworkManagerPrivate::FDO_DBUS_PROPERTIES,
+ QLatin1String("PropertiesChanged"), d, SLOT(dbusPropertiesChanged(QString,QVariantMap,QStringList)));
+#else
connect(&d->iface, &OrgFreedesktopNetworkManagerDeviceGenericInterface::PropertiesChanged, d, &GenericDevicePrivate::propertiesChanged);
+#endif
}
NetworkManager::GenericDevice::~GenericDevice()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/networkmanager-qt-5.26.0/src/gredevice.cpp new/networkmanager-qt-5.27.0/src/gredevice.cpp
--- old/networkmanager-qt-5.26.0/src/gredevice.cpp 2016-09-06 00:45:49.000000000 +0200
+++ new/networkmanager-qt-5.27.0/src/gredevice.cpp 2016-10-02 10:17:05.000000000 +0200
@@ -31,16 +31,6 @@
, iface(NetworkManagerPrivate::DBUS_SERVICE, path, QDBusConnection::systemBus())
#endif
{
- inputFlags = iface.inputFlags();
- outputFlags = iface.outputFlags();
- inputKey = iface.inputKey();
- outputKey = iface.outputKey();
- localEnd = iface.local();
- remoteEnd = iface.remote();
- parent = iface.parent().path();
- pathMtuDiscovery = iface.pathMtuDiscovery();
- tos = iface.tos();
- ttl = iface.ttl();
}
NetworkManager::GreDevicePrivate::~GreDevicePrivate()
@@ -51,7 +41,18 @@
Device(*new GreDevicePrivate(path, this), parent)
{
Q_D(GreDevice);
+
+ QVariantMap initialProperties = NetworkManagerPrivate::retrieveInitialProperties(d->iface.staticInterfaceName(), path);
+ if (!initialProperties.isEmpty()) {
+ d->propertiesChanged(initialProperties);
+ }
+
+#if NM_CHECK_VERSION(1, 4, 0)
+ QDBusConnection::systemBus().connect(NetworkManagerPrivate::DBUS_SERVICE, d->uni, NetworkManagerPrivate::FDO_DBUS_PROPERTIES,
+ QLatin1String("PropertiesChanged"), d, SLOT(dbusPropertiesChanged(QString,QVariantMap,QStringList)));
+#else
QObject::connect(&d->iface, &OrgFreedesktopNetworkManagerDeviceGreInterface::PropertiesChanged, d, &GreDevicePrivate::propertiesChanged);
+#endif
}
NetworkManager::GreDevice::~GreDevice()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/networkmanager-qt-5.26.0/src/infinibanddevice.cpp new/networkmanager-qt-5.27.0/src/infinibanddevice.cpp
--- old/networkmanager-qt-5.26.0/src/infinibanddevice.cpp 2016-09-06 00:45:49.000000000 +0200
+++ new/networkmanager-qt-5.27.0/src/infinibanddevice.cpp 2016-10-02 10:17:05.000000000 +0200
@@ -32,8 +32,6 @@
#endif
, carrier(false)
{
- carrier = iface.carrier();
- hwAddress = iface.hwAddress();
}
NetworkManager::InfinibandDevice::~InfinibandDevice()
@@ -44,7 +42,18 @@
: Device(*new InfinibandDevicePrivate(path, this), parent)
{
Q_D(InfinibandDevice);
+
+ QVariantMap initialProperties = NetworkManagerPrivate::retrieveInitialProperties(d->iface.staticInterfaceName(), path);
+ if (!initialProperties.isEmpty()) {
+ d->propertiesChanged(initialProperties);
+ }
+
+#if NM_CHECK_VERSION(1, 4, 0)
+ QDBusConnection::systemBus().connect(NetworkManagerPrivate::DBUS_SERVICE, d->uni, NetworkManagerPrivate::FDO_DBUS_PROPERTIES,
+ QLatin1String("PropertiesChanged"), d, SLOT(dbusPropertiesChanged(QString,QVariantMap,QStringList)));
+#else
connect(&d->iface, &OrgFreedesktopNetworkManagerDeviceInfinibandInterface::PropertiesChanged, d, &InfinibandDevicePrivate::propertiesChanged);
+#endif
}
NetworkManager::InfinibandDevicePrivate::~InfinibandDevicePrivate()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/networkmanager-qt-5.26.0/src/macvlandevice.cpp new/networkmanager-qt-5.27.0/src/macvlandevice.cpp
--- old/networkmanager-qt-5.26.0/src/macvlandevice.cpp 2016-09-06 00:45:49.000000000 +0200
+++ new/networkmanager-qt-5.27.0/src/macvlandevice.cpp 2016-10-02 10:17:05.000000000 +0200
@@ -30,9 +30,6 @@
, iface(NetworkManagerPrivate::DBUS_SERVICE, path, QDBusConnection::systemBus())
#endif
{
- mode = iface.mode();
- noPromisc = iface.noPromisc();
- parent = iface.parent().path();
}
NetworkManager::MacVlanDevicePrivate::~MacVlanDevicePrivate()
@@ -43,7 +40,18 @@
Device(*new MacVlanDevicePrivate(path, this), parent)
{
Q_D(MacVlanDevice);
+
+ QVariantMap initialProperties = NetworkManagerPrivate::retrieveInitialProperties(d->iface.staticInterfaceName(), path);
+ if (!initialProperties.isEmpty()) {
+ d->propertiesChanged(initialProperties);
+ }
+
+#if NM_CHECK_VERSION(1, 4, 0)
+ QDBusConnection::systemBus().connect(NetworkManagerPrivate::DBUS_SERVICE, d->uni, NetworkManagerPrivate::FDO_DBUS_PROPERTIES,
+ QLatin1String("PropertiesChanged"), d, SLOT(dbusPropertiesChanged(QString,QVariantMap,QStringList)));
+#else
connect(&d->iface, &OrgFreedesktopNetworkManagerDeviceMacvlanInterface::PropertiesChanged, d, &MacVlanDevicePrivate::propertiesChanged);
+#endif
}
NetworkManager::MacVlanDevice::~MacVlanDevice()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/networkmanager-qt-5.26.0/src/manager.cpp new/networkmanager-qt-5.27.0/src/manager.cpp
--- old/networkmanager-qt-5.26.0/src/manager.cpp 2016-09-06 00:45:49.000000000 +0200
+++ new/networkmanager-qt-5.27.0/src/manager.cpp 2016-10-02 10:17:05.000000000 +0200
@@ -97,9 +97,13 @@
this, &NetworkManagerPrivate::onDeviceAdded);
connect(&iface, &OrgFreedesktopNetworkManagerInterface::DeviceRemoved,
this, &NetworkManagerPrivate::onDeviceRemoved);
+#if NM_CHECK_VERSION(1, 4, 0)
+ QDBusConnection::systemBus().connect(NetworkManagerPrivate::DBUS_SERVICE, NetworkManagerPrivate::DBUS_DAEMON_PATH, NetworkManagerPrivate::FDO_DBUS_PROPERTIES,
+ QLatin1String("PropertiesChanged"), this, SLOT(dbusPropertiesChanged(QString,QVariantMap,QStringList)));
+#else
connect(&iface, &OrgFreedesktopNetworkManagerInterface::PropertiesChanged,
this, &NetworkManagerPrivate::propertiesChanged);
-
+#endif
connect(&watcher, &QDBusServiceWatcher::serviceRegistered,
this, &NetworkManagerPrivate::daemonRegistered);
connect(&watcher, &QDBusServiceWatcher::serviceUnregistered,
@@ -157,18 +161,10 @@
);
// Get all Manager's properties async
- QDBusMessage message = QDBusMessage::createMethodCall(DBUS_SERVICE,
- DBUS_DAEMON_PATH,
- FDO_DBUS_PROPERTIES,
- QLatin1String("GetAll"));
- message << iface.staticInterfaceName();
-#ifdef NMQT_STATIC
- QDBusConnection::sessionBus().callWithCallback(message,
-#else
- QDBusConnection::systemBus().callWithCallback(message,
-#endif
- this,
- SLOT(propertiesChanged(QVariantMap)));
+ QVariantMap initialProperties = retrieveInitialProperties(iface.staticInterfaceName(), DBUS_DAEMON_PATH);
+ if (!initialProperties.isEmpty()) {
+ propertiesChanged(initialProperties);
+ }
QTimer::singleShot(0, [this] { qobject_cast<SettingsPrivate *>(settingsNotifier())->init(); });
@@ -240,6 +236,30 @@
return m_supportedInterfaceTypes;
}
+QVariantMap NetworkManager::NetworkManagerPrivate::retrieveInitialProperties(const QString &interfaceName, const QString &path)
+{
+ QDBusMessage message = QDBusMessage::createMethodCall(DBUS_SERVICE,
+ path,
+ FDO_DBUS_PROPERTIES,
+ QLatin1String("GetAll"));
+ message << interfaceName;
+#ifdef NMQT_STATIC
+ QDBusMessage resultMessage = QDBusConnection::sessionBus().call(message);
+#else
+ QDBusMessage resultMessage = QDBusConnection::systemBus().call(message);
+#endif
+ if (resultMessage.type() == QDBusMessage::ReplyMessage) {
+ QVariantMap result;
+ QDBusArgument dbusArgument = resultMessage.arguments().at(0).value<QDBusArgument>();
+ while (!dbusArgument.atEnd()) {
+ dbusArgument >> result;
+ }
+ return result;
+ }
+
+ return QVariantMap();
+}
+
NetworkManager::Device::Ptr NetworkManager::NetworkManagerPrivate::findRegisteredNetworkInterface(const QString &uni)
{
NetworkManager::Device::Ptr networkInterface;
@@ -682,6 +702,14 @@
}
}
+void NetworkManager::NetworkManagerPrivate::dbusPropertiesChanged(const QString &interfaceName, const QVariantMap &properties, const QStringList &invalidatedProperties)
+{
+ Q_UNUSED(invalidatedProperties);
+ if (interfaceName == QLatin1String("org.freedesktop.NetworkManager")) {
+ propertiesChanged(properties);
+ }
+}
+
void NetworkManager::NetworkManagerPrivate::propertiesChanged(const QVariantMap &changedProperties)
{
// qCDebug(NMQT) << Q_FUNC_INFO << changedProperties;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/networkmanager-qt-5.26.0/src/manager_p.h new/networkmanager-qt-5.27.0/src/manager_p.h
--- old/networkmanager-qt-5.26.0/src/manager_p.h 2016-09-06 00:45:49.000000000 +0200
+++ new/networkmanager-qt-5.27.0/src/manager_p.h 2016-10-02 10:17:05.000000000 +0200
@@ -46,6 +46,9 @@
static const QString DBUS_SETTINGS_PATH;
static const QString FDO_DBUS_PROPERTIES;
+ // Functions useful also for other classes
+ static QVariantMap retrieveInitialProperties(const QString &interfaceName, const QString &path);
+
NetworkManagerPrivate();
~NetworkManagerPrivate();
QDBusServiceWatcher watcher;
@@ -121,6 +124,7 @@
void init();
void onDeviceAdded(const QDBusObjectPath &state);
void onDeviceRemoved(const QDBusObjectPath &state);
+ void dbusPropertiesChanged(const QString &interfaceName, const QVariantMap &properties, const QStringList &invalidatedProperties);
void propertiesChanged(const QVariantMap &changedProperties);
void daemonRegistered();
void daemonUnregistered();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/networkmanager-qt-5.26.0/src/modemdevice.cpp new/networkmanager-qt-5.27.0/src/modemdevice.cpp
--- old/networkmanager-qt-5.26.0/src/modemdevice.cpp 2016-09-06 00:45:49.000000000 +0200
+++ new/networkmanager-qt-5.27.0/src/modemdevice.cpp 2016-10-02 10:17:05.000000000 +0200
@@ -43,26 +43,35 @@
{
}
-void NetworkManager::ModemDevicePrivate::initModemProperties()
-{
- modemCapabilities = convertModemCapabilities(modemIface.modemCapabilities());
- currentCapabilities = convertModemCapabilities(modemIface.currentCapabilities());
-}
-
NetworkManager::ModemDevice::ModemDevice(const QString &path, QObject *parent)
: Device(*new ModemDevicePrivate(path, this), parent)
{
Q_D(ModemDevice);
- d->initModemProperties();
+
+ QVariantMap initialProperties = NetworkManagerPrivate::retrieveInitialProperties(d->modemIface.staticInterfaceName(), path);
+ if (!initialProperties.isEmpty()) {
+ d->propertiesChanged(initialProperties);
+ }
+
+#if NM_CHECK_VERSION(1, 4, 0)
+ QDBusConnection::systemBus().connect(NetworkManagerPrivate::DBUS_SERVICE, d->uni, NetworkManagerPrivate::FDO_DBUS_PROPERTIES,
+ QLatin1String("PropertiesChanged"), d, SLOT(dbusPropertiesChanged(QString,QVariantMap,QStringList)));
+#else
QObject::connect(&d->modemIface, &OrgFreedesktopNetworkManagerDeviceModemInterface::PropertiesChanged, d, &ModemDevicePrivate::propertiesChanged);
+#endif
}
NetworkManager::ModemDevice::ModemDevice(NetworkManager::ModemDevicePrivate &dd, QObject *parent)
: Device(dd, parent)
{
Q_D(ModemDevice);
- d->initModemProperties();
+
+#if NM_CHECK_VERSION(1, 4, 0)
+ QDBusConnection::systemBus().connect(NetworkManagerPrivate::DBUS_SERVICE, d->uni, NetworkManagerPrivate::FDO_DBUS_PROPERTIES,
+ QLatin1String("PropertiesChanged"), d, SLOT(dbusPropertiesChanged(QString,QVariantMap,QStringList)));
+#else
QObject::connect(&d->modemIface, &OrgFreedesktopNetworkManagerDeviceModemInterface::PropertiesChanged, d, &ModemDevicePrivate::propertiesChanged);
+#endif
}
NetworkManager::ModemDevice::~ModemDevice()
@@ -93,6 +102,8 @@
if (property == QLatin1String("CurrentCapabilities")) {
currentCapabilities = convertModemCapabilities(value.toUInt());
Q_EMIT q->currentCapabilitiesChanged(currentCapabilities);
+ } else if (property == QLatin1String("ModemCapabilities")) {
+ modemCapabilities = convertModemCapabilities(value.toUInt());
} else {
DevicePrivate::propertyChanged(property, value);
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/networkmanager-qt-5.26.0/src/olpcmeshdevice.cpp new/networkmanager-qt-5.27.0/src/olpcmeshdevice.cpp
--- old/networkmanager-qt-5.26.0/src/olpcmeshdevice.cpp 2016-09-06 00:45:49.000000000 +0200
+++ new/networkmanager-qt-5.27.0/src/olpcmeshdevice.cpp 2016-10-02 10:17:05.000000000 +0200
@@ -33,16 +33,24 @@
, iface(NetworkManagerPrivate::DBUS_SERVICE, path, QDBusConnection::systemBus())
#endif
{
- hardwareAddress = iface.hwAddress();
- activeChannel = iface.activeChannel();
- companion = iface.companion().path();
}
NetworkManager::OlpcMeshDevice::OlpcMeshDevice(const QString &path, QObject *parent)
: Device(*new OlpcMeshDevicePrivate(path, this), parent)
{
Q_D(OlpcMeshDevice);
+
+ QVariantMap initialProperties = NetworkManagerPrivate::retrieveInitialProperties(d->iface.staticInterfaceName(), path);
+ if (!initialProperties.isEmpty()) {
+ d->propertiesChanged(initialProperties);
+ }
+
+#if NM_CHECK_VERSION(1, 4, 0)
+ QDBusConnection::systemBus().connect(NetworkManagerPrivate::DBUS_SERVICE, d->uni, NetworkManagerPrivate::FDO_DBUS_PROPERTIES,
+ QLatin1String("PropertiesChanged"), d, SLOT(dbusPropertiesChanged(QString,QVariantMap,QStringList)));
+#else
QObject::connect(&d->iface, &OrgFreedesktopNetworkManagerDeviceOlpcMeshInterface::PropertiesChanged, d, &OlpcMeshDevicePrivate::propertiesChanged);
+#endif
}
NetworkManager::OlpcMeshDevice::~OlpcMeshDevice()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/networkmanager-qt-5.26.0/src/settings.cpp new/networkmanager-qt-5.27.0/src/settings.cpp
--- old/networkmanager-qt-5.26.0/src/settings.cpp 2016-09-06 00:45:49.000000000 +0200
+++ new/networkmanager-qt-5.27.0/src/settings.cpp 2016-10-02 10:17:05.000000000 +0200
@@ -42,8 +42,13 @@
#endif
, m_canModify(true)
{
+#if NM_CHECK_VERSION(1, 4, 0)
+ QDBusConnection::systemBus().connect(NetworkManagerPrivate::DBUS_SERVICE, NetworkManagerPrivate::DBUS_SETTINGS_PATH, NetworkManagerPrivate::FDO_DBUS_PROPERTIES,
+ QLatin1String("PropertiesChanged"), this, SLOT(dbusPropertiesChanged(QString,QVariantMap,QStringList)));
+#else
connect(&iface, &OrgFreedesktopNetworkManagerSettingsInterface::PropertiesChanged,
this, &SettingsPrivate::propertiesChanged);
+#endif
connect(&iface, &OrgFreedesktopNetworkManagerSettingsInterface::NewConnection,
this, &SettingsPrivate::onConnectionAdded);
connect(&iface, &OrgFreedesktopNetworkManagerSettingsInterface::ConnectionRemoved,
@@ -70,19 +75,11 @@
}
}
- // Get all Setting's properties async
- QDBusMessage message = QDBusMessage::createMethodCall(NetworkManagerPrivate::DBUS_SERVICE,
- NetworkManagerPrivate::DBUS_SETTINGS_PATH,
- NetworkManagerPrivate::FDO_DBUS_PROPERTIES,
- QStringLiteral("GetAll"));
- message << iface.staticInterfaceName();
-#ifdef NMQT_STATIC
- QDBusConnection::sessionBus().callWithCallback(message,
-#else
- QDBusConnection::systemBus().callWithCallback(message,
-#endif
- this,
- SLOT(propertiesChanged(QVariantMap)));
+ // Get all Setting's properties at once
+ QVariantMap initialProperties = NetworkManagerPrivate::retrieveInitialProperties(iface.staticInterfaceName(), NetworkManagerPrivate::DBUS_SETTINGS_PATH);
+ if (!initialProperties.isEmpty()) {
+ propertiesChanged(initialProperties);
+ }
}
NetworkManager::Connection::List NetworkManager::SettingsPrivate::listConnections()
@@ -153,6 +150,14 @@
iface.SaveHostname(hostname);
}
+void NetworkManager::SettingsPrivate::dbusPropertiesChanged(const QString &interfaceName, const QVariantMap &properties, const QStringList &invalidatedProperties)
+{
+ Q_UNUSED(invalidatedProperties);
+ if (interfaceName == QLatin1String("org.freedesktop.NetworkManager.Settings")) {
+ propertiesChanged(properties);
+ }
+}
+
void NetworkManager::SettingsPrivate::propertiesChanged(const QVariantMap &properties)
{
QVariantMap::const_iterator it = properties.constBegin();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/networkmanager-qt-5.26.0/src/settings_p.h new/networkmanager-qt-5.27.0/src/settings_p.h
--- old/networkmanager-qt-5.26.0/src/settings_p.h 2016-09-06 00:45:49.000000000 +0200
+++ new/networkmanager-qt-5.27.0/src/settings_p.h 2016-10-02 10:17:05.000000000 +0200
@@ -58,6 +58,7 @@
void onConnectionAdded(const QDBusObjectPath &);
void onConnectionRemoved(const QDBusObjectPath &);
void onConnectionRemoved(const QString &);
+ void dbusPropertiesChanged(const QString &interfaceName, const QVariantMap &properties, const QStringList &invalidatedProperties);
void propertiesChanged(const QVariantMap &properties);
void initNotifier();
protected:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/networkmanager-qt-5.26.0/src/teamdevice.cpp new/networkmanager-qt-5.27.0/src/teamdevice.cpp
--- old/networkmanager-qt-5.26.0/src/teamdevice.cpp 2016-09-06 00:45:49.000000000 +0200
+++ new/networkmanager-qt-5.27.0/src/teamdevice.cpp 2016-10-02 10:17:05.000000000 +0200
@@ -32,11 +32,6 @@
, iface(NetworkManagerPrivate::DBUS_SERVICE, path, QDBusConnection::systemBus())
#endif
{
- carrier = iface.carrier();
- hwAddress = iface.hwAddress();
- Q_FOREACH (const QDBusObjectPath & op, iface.slaves()) {
- slaves << op.path();
- }
}
NetworkManager::TeamDevicePrivate::~TeamDevicePrivate()
@@ -47,7 +42,18 @@
: Device(*new TeamDevicePrivate(path, this), parent)
{
Q_D(TeamDevice);
+
+ QVariantMap initialProperties = NetworkManagerPrivate::retrieveInitialProperties(d->iface.staticInterfaceName(), path);
+ if (!initialProperties.isEmpty()) {
+ d->propertiesChanged(initialProperties);
+ }
+
+#if NM_CHECK_VERSION(1, 4, 0)
+ QDBusConnection::systemBus().connect(NetworkManagerPrivate::DBUS_SERVICE, d->uni, NetworkManagerPrivate::FDO_DBUS_PROPERTIES,
+ QLatin1String("PropertiesChanged"), d, SLOT(dbusPropertiesChanged(QString,QVariantMap,QStringList)));
+#else
connect(&d->iface, &OrgFreedesktopNetworkManagerDeviceTeamInterface::PropertiesChanged, d, &TeamDevicePrivate::propertiesChanged);
+#endif
}
NetworkManager::TeamDevice::~TeamDevice()
@@ -91,7 +97,7 @@
Q_EMIT q->hwAddressChanged(hwAddress);
} else if (property == QLatin1String("Slaves")) {
QStringList list;
- Q_FOREACH (const QDBusObjectPath & op, value.value<QList<QDBusObjectPath> >()) {
+ Q_FOREACH (const QDBusObjectPath & op, qdbus_cast< QList<QDBusObjectPath> >(value)) {
list << op.path();
}
slaves = list;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/networkmanager-qt-5.26.0/src/tundevice.cpp new/networkmanager-qt-5.27.0/src/tundevice.cpp
--- old/networkmanager-qt-5.26.0/src/tundevice.cpp 2016-09-06 00:45:49.000000000 +0200
+++ new/networkmanager-qt-5.27.0/src/tundevice.cpp 2016-10-02 10:17:05.000000000 +0200
@@ -30,12 +30,6 @@
, iface(NetworkManagerPrivate::DBUS_SERVICE, path, QDBusConnection::systemBus())
#endif
{
- owner = iface.owner();
- group = iface.group();
- mode = iface.mode();
- multiQueue = iface.multiQueue();
- noPi = iface.noPi();
- vnetHdr = iface.vnetHdr();
}
NetworkManager::TunDevicePrivate::~TunDevicePrivate()
@@ -46,7 +40,18 @@
: Device(*new TunDevicePrivate(path, this), parent)
{
Q_D(TunDevice);
+
+ QVariantMap initialProperties = NetworkManagerPrivate::retrieveInitialProperties(d->iface.staticInterfaceName(), path);
+ if (!initialProperties.isEmpty()) {
+ d->propertiesChanged(initialProperties);
+ }
+
+#if NM_CHECK_VERSION(1, 4, 0)
+ QDBusConnection::systemBus().connect(NetworkManagerPrivate::DBUS_SERVICE, d->uni, NetworkManagerPrivate::FDO_DBUS_PROPERTIES,
+ QLatin1String("PropertiesChanged"), d, SLOT(dbusPropertiesChanged(QString,QVariantMap,QStringList)));
+#else
connect(&d->iface, &OrgFreedesktopNetworkManagerDeviceTunInterface::PropertiesChanged, d, &TunDevicePrivate::propertiesChanged);
+#endif
}
NetworkManager::TunDevice::~TunDevice()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/networkmanager-qt-5.26.0/src/vethdevice.cpp new/networkmanager-qt-5.27.0/src/vethdevice.cpp
--- old/networkmanager-qt-5.26.0/src/vethdevice.cpp 2016-09-06 00:45:49.000000000 +0200
+++ new/networkmanager-qt-5.27.0/src/vethdevice.cpp 2016-10-02 10:17:05.000000000 +0200
@@ -32,7 +32,6 @@
, iface(NetworkManagerPrivate::DBUS_SERVICE, path, QDBusConnection::systemBus())
#endif
{
- peer = iface.peer().path();
}
NetworkManager::VethDevicePrivate::~VethDevicePrivate()
@@ -43,7 +42,18 @@
: Device(*new VethDevicePrivate(path, this), parent)
{
Q_D(VethDevice);
+
+ QVariantMap initialProperties = NetworkManagerPrivate::retrieveInitialProperties(d->iface.staticInterfaceName(), path);
+ if (!initialProperties.isEmpty()) {
+ d->propertiesChanged(initialProperties);
+ }
+
+#if NM_CHECK_VERSION(1, 4, 0)
+ QDBusConnection::systemBus().connect(NetworkManagerPrivate::DBUS_SERVICE, d->uni, NetworkManagerPrivate::FDO_DBUS_PROPERTIES,
+ QLatin1String("PropertiesChanged"), d, SLOT(dbusPropertiesChanged(QString,QVariantMap,QStringList)));
+#else
connect(&d->iface, &OrgFreedesktopNetworkManagerDeviceVethInterface::PropertiesChanged, d, &VethDevicePrivate::propertiesChanged);
+#endif
}
NetworkManager::VethDevice::~VethDevice()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/networkmanager-qt-5.26.0/src/vlandevice.cpp new/networkmanager-qt-5.27.0/src/vlandevice.cpp
--- old/networkmanager-qt-5.26.0/src/vlandevice.cpp 2016-09-06 00:45:49.000000000 +0200
+++ new/networkmanager-qt-5.27.0/src/vlandevice.cpp 2016-10-02 10:17:05.000000000 +0200
@@ -31,12 +31,6 @@
#endif
, carrier(false)
{
- carrier = iface.carrier();
- hwAddress = iface.hwAddress();
- if (NetworkManager::checkVersion(1, 0, 0)) {
- parent = iface.parent().path();
- }
- vlanId = iface.vlanId();
}
NetworkManager::VlanDevice::~VlanDevice()
@@ -47,7 +41,18 @@
: Device(*new VlanDevicePrivate(path, this), parent)
{
Q_D(VlanDevice);
+
+ QVariantMap initialProperties = NetworkManagerPrivate::retrieveInitialProperties(d->iface.staticInterfaceName(), path);
+ if (!initialProperties.isEmpty()) {
+ d->propertiesChanged(initialProperties);
+ }
+
+#if NM_CHECK_VERSION(1, 4, 0)
+ QDBusConnection::systemBus().connect(NetworkManagerPrivate::DBUS_SERVICE, d->uni, NetworkManagerPrivate::FDO_DBUS_PROPERTIES,
+ QLatin1String("PropertiesChanged"), d, SLOT(dbusPropertiesChanged(QString,QVariantMap,QStringList)));
+#else
connect(&d->iface, &OrgFreedesktopNetworkManagerDeviceVlanInterface::PropertiesChanged, d, &VlanDevicePrivate::propertiesChanged);
+#endif
}
NetworkManager::VlanDevicePrivate::~VlanDevicePrivate()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/networkmanager-qt-5.26.0/src/vpnconnection.cpp new/networkmanager-qt-5.27.0/src/vpnconnection.cpp
--- old/networkmanager-qt-5.26.0/src/vpnconnection.cpp 2016-09-06 00:45:49.000000000 +0200
+++ new/networkmanager-qt-5.27.0/src/vpnconnection.cpp 2016-10-02 10:17:05.000000000 +0200
@@ -36,8 +36,6 @@
#endif
, q_ptr(q)
{
- banner = iface.banner();
- state = convertVpnConnectionState(iface.vpnState());
}
NetworkManager::VpnConnection::State NetworkManager::VpnConnectionPrivate::convertVpnConnectionState(uint state)
@@ -54,7 +52,29 @@
: ActiveConnection(*new VpnConnectionPrivate(path, this), parent)
{
Q_D(VpnConnection);
+
+ // We need to get ActiveConnection's properties, because by default every ActiveConnection
+ // is basically a VpnConnection
+ QVariantMap initialProperties = NetworkManagerPrivate::retrieveInitialProperties(OrgFreedesktopNetworkManagerConnectionActiveInterface::staticInterfaceName(), path);
+ if (!initialProperties.isEmpty()) {
+ d->propertiesChanged(initialProperties);
+ }
+
+ // Try to retrieve VPN specific properties if this is a VPN connection
+ if (vpn()) {
+ // Get all VpnConnection's properties at once
+ QVariantMap initialProperties = NetworkManagerPrivate::retrieveInitialProperties(d->iface.staticInterfaceName(), path);
+ if (!initialProperties.isEmpty()) {
+ d->propertiesChanged(initialProperties);
+ }
+ }
+
+#if NM_CHECK_VERSION(1, 4, 0)
+ QDBusConnection::systemBus().connect(NetworkManagerPrivate::DBUS_SERVICE, d->path, NetworkManagerPrivate::FDO_DBUS_PROPERTIES,
+ QLatin1String("PropertiesChanged"), d, SLOT(dbusPropertiesChanged(QString,QVariantMap,QStringList)));
+#else
connect(&d->iface, &OrgFreedesktopNetworkManagerVPNConnectionInterface::PropertiesChanged, d, &VpnConnectionPrivate::propertiesChanged);
+#endif
connect(&d->iface, &OrgFreedesktopNetworkManagerVPNConnectionInterface::VpnStateChanged, d, &VpnConnectionPrivate::vpnStateChanged);
}
@@ -75,25 +95,31 @@
return d->state;
}
-void NetworkManager::VpnConnectionPrivate::propertiesChanged(const QVariantMap &properties)
+void NetworkManager::VpnConnectionPrivate::dbusPropertiesChanged(const QString &interfaceName, const QVariantMap &properties, const QStringList &invalidatedProperties)
+{
+ Q_UNUSED(invalidatedProperties);
+
+ if (interfaceName == QLatin1String("org.freedesktop.NetworkManager.VPN.Connection")) {
+ propertiesChanged(properties);
+ } else {
+ ActiveConnectionPrivate::propertiesChanged(properties);
+ }
+}
+
+void NetworkManager::VpnConnectionPrivate::propertyChanged(const QString &property, const QVariant &value)
{
Q_Q(VpnConnection);
- QVariantMap::const_iterator it = properties.constBegin();
- while (it != properties.constEnd()) {
- const QString property = it.key();
- if (property == QLatin1String("Banner")) {
- banner = it->toString();
- Q_EMIT q->bannerChanged(banner);
- } else if (property == QLatin1String("VpnState")) {
- state = NetworkManager::VpnConnectionPrivate::convertVpnConnectionState(it->toUInt());
- NetworkManager::VpnConnection::StateChangeReason reason = NetworkManager::VpnConnectionPrivate::convertVpnConnectionStateReason(properties.key("Reason").toUInt());
- // Do not notify about changed VpnState twice, because there is also signal VpnStateChanged() from NetworkManager
- // Q_EMIT stateChanged(d->state, reason);
- } else {
- qCWarning(NMQT) << Q_FUNC_INFO << "Unhandled property" << property;
- }
- ++it;
+ if (property == QLatin1String("Banner")) {
+ banner = value.toString();
+ Q_EMIT q->bannerChanged(banner);
+ } else if (property == QLatin1String("VpnState")) {
+ //Do not notify about changed VpnState twice, because there is also signal VpnStateChanged() from NetworkManager
+ state = NetworkManager::VpnConnectionPrivate::convertVpnConnectionState(value.toUInt());
+ //NetworkManager::VpnConnection::StateChangeReason reason = NetworkManager::VpnConnectionPrivate::convertVpnConnectionStateReason(properties.key("Reason").toUInt());
+ //Q_EMIT stateChanged(d->state, reason);
+ } else {
+ ActiveConnectionPrivate::propertyChanged(property, value);
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/networkmanager-qt-5.26.0/src/vpnconnection_p.h new/networkmanager-qt-5.27.0/src/vpnconnection_p.h
--- old/networkmanager-qt-5.26.0/src/vpnconnection_p.h 2016-09-06 00:45:49.000000000 +0200
+++ new/networkmanager-qt-5.27.0/src/vpnconnection_p.h 2016-10-02 10:17:05.000000000 +0200
@@ -46,8 +46,16 @@
Q_DECLARE_PUBLIC(VpnConnection)
VpnConnection *q_ptr;
+
+protected:
+ /**
+ * When subclassing make sure to call the parent class method
+ * if the property was not useful to your new class
+ */
+ virtual void propertyChanged(const QString &property, const QVariant &value) Q_DECL_OVERRIDE;
+
private Q_SLOTS:
- void propertiesChanged(const QVariantMap &properties);
+ void dbusPropertiesChanged(const QString &interfaceName, const QVariantMap &properties, const QStringList &invalidatedProperties);
void vpnStateChanged(uint new_state, uint reason);
};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/networkmanager-qt-5.26.0/src/wimaxdevice.cpp new/networkmanager-qt-5.27.0/src/wimaxdevice.cpp
--- old/networkmanager-qt-5.26.0/src/wimaxdevice.cpp 2016-09-06 00:45:49.000000000 +0200
+++ new/networkmanager-qt-5.27.0/src/wimaxdevice.cpp 2016-10-02 10:17:05.000000000 +0200
@@ -34,14 +34,6 @@
, wimaxIface(NetworkManagerPrivate::DBUS_SERVICE, path, QDBusConnection::systemBus())
#endif
{
- hardwareAddress = wimaxIface.hwAddress();
- centerFrequency = wimaxIface.centerFrequency();
- activeNsp = wimaxIface.activeNsp().path();
- bsid = wimaxIface.bsid();
- cinr = wimaxIface.cinr();
- rssi = wimaxIface.rssi();
- txPower = wimaxIface.txPower();
-
qDBusRegisterMetaType<QList<QDBusObjectPath> >();
QList <QDBusObjectPath> nsps = wimaxIface.nsps();
Q_FOREACH (const QDBusObjectPath & op, nsps) {
@@ -54,7 +46,18 @@
: Device(*new WimaxDevicePrivate(path, this), parent)
{
Q_D(WimaxDevice);
+
+ QVariantMap initialProperties = NetworkManagerPrivate::retrieveInitialProperties(d->wimaxIface.staticInterfaceName(), path);
+ if (!initialProperties.isEmpty()) {
+ d->propertiesChanged(initialProperties);
+ }
+
+#if NM_CHECK_VERSION(1, 4, 0)
+ QDBusConnection::systemBus().connect(NetworkManagerPrivate::DBUS_SERVICE, d->uni, NetworkManagerPrivate::FDO_DBUS_PROPERTIES,
+ QLatin1String("PropertiesChanged"), d, SLOT(dbusPropertiesChanged(QString,QVariantMap,QStringList)));
+#else
connect(&d->wimaxIface, &OrgFreedesktopNetworkManagerDeviceWiMaxInterface::PropertiesChanged, d, &WimaxDevicePrivate::propertiesChanged);
+#endif
connect(&d->wimaxIface, &OrgFreedesktopNetworkManagerDeviceWiMaxInterface::NspAdded, d, &WimaxDevicePrivate::nspAdded);
connect(&d->wimaxIface, &OrgFreedesktopNetworkManagerDeviceWiMaxInterface::NspRemoved, d, &WimaxDevicePrivate::nspRemoved);
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/networkmanager-qt-5.26.0/src/wireddevice.cpp new/networkmanager-qt-5.27.0/src/wireddevice.cpp
--- old/networkmanager-qt-5.26.0/src/wireddevice.cpp 2016-09-06 00:45:49.000000000 +0200
+++ new/networkmanager-qt-5.27.0/src/wireddevice.cpp 2016-10-02 10:17:05.000000000 +0200
@@ -36,10 +36,6 @@
, bitrate(0)
, carrier(false)
{
- hardwareAddress = wiredIface.hwAddress();
- permanentHardwareAddress = wiredIface.permHwAddress();
- bitrate = wiredIface.speed() * 1000;
- carrier = wiredIface.carrier();
}
NetworkManager::WiredDevicePrivate::~WiredDevicePrivate()
@@ -50,7 +46,19 @@
: Device(*new NetworkManager::WiredDevicePrivate(path, this), parent)
{
Q_D(WiredDevice);
+
+ // Get all WiredDevices's properties at once
+ QVariantMap initialProperties = NetworkManagerPrivate::retrieveInitialProperties(d->wiredIface.staticInterfaceName(), path);
+ if (!initialProperties.isEmpty()) {
+ d->propertiesChanged(initialProperties);
+ }
+
+#if NM_CHECK_VERSION(1, 4, 0)
+ QDBusConnection::systemBus().connect(NetworkManagerPrivate::DBUS_SERVICE, d->uni, NetworkManagerPrivate::FDO_DBUS_PROPERTIES,
+ QLatin1String("PropertiesChanged"), d, SLOT(dbusPropertiesChanged(QString,QVariantMap,QStringList)));
+#else
connect(&d->wiredIface, &OrgFreedesktopNetworkManagerDeviceWiredInterface::PropertiesChanged, d, &WiredDevicePrivate::propertiesChanged);
+#endif
}
NetworkManager::WiredDevice::~WiredDevice()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/networkmanager-qt-5.26.0/src/wirelessdevice.cpp new/networkmanager-qt-5.27.0/src/wirelessdevice.cpp
--- old/networkmanager-qt-5.26.0/src/wirelessdevice.cpp 2016-09-06 00:45:49.000000000 +0200
+++ new/networkmanager-qt-5.27.0/src/wirelessdevice.cpp 2016-10-02 10:17:05.000000000 +0200
@@ -51,12 +51,6 @@
{
Q_D(WirelessDevice);
- d->hardwareAddress = d->wirelessIface.hwAddress();
- d->permanentHardwareAddress = d->wirelessIface.permHwAddress();
- d->mode = convertOperationMode(d->wirelessIface.mode());
- d->bitRate = d->wirelessIface.bitrate();
- d->wirelessCapabilities = convertCapabilities(d->wirelessIface.wirelessCapabilities());
-
qDBusRegisterMetaType<QList<QDBusObjectPath> >();
QList <QDBusObjectPath> aps = d->wirelessIface.accessPoints();
@@ -66,11 +60,20 @@
d->accessPointAdded(op);
}
+ // Get all WirelessDevices's properties at once
+ QVariantMap initialProperties = NetworkManagerPrivate::retrieveInitialProperties(d->wirelessIface.staticInterfaceName(), path);
+ if (!initialProperties.isEmpty()) {
+ d->propertiesChanged(initialProperties);
+ }
+
+#if NM_CHECK_VERSION(1, 4, 0)
+ QDBusConnection::systemBus().connect(NetworkManagerPrivate::DBUS_SERVICE, d->uni, NetworkManagerPrivate::FDO_DBUS_PROPERTIES,
+ QLatin1String("PropertiesChanged"), d, SLOT(dbusPropertiesChanged(QString,QVariantMap,QStringList)));
+#else
connect(&d->wirelessIface, &OrgFreedesktopNetworkManagerDeviceWirelessInterface::PropertiesChanged, d, &WirelessDevicePrivate::propertiesChanged);
+#endif
connect(&d->wirelessIface, &OrgFreedesktopNetworkManagerDeviceWirelessInterface::AccessPointAdded, d, &WirelessDevicePrivate::accessPointAdded);
connect(&d->wirelessIface, &OrgFreedesktopNetworkManagerDeviceWirelessInterface::AccessPointRemoved, d, &WirelessDevicePrivate::accessPointRemoved);
-
- d->activeAccessPoint = findAccessPoint(d->wirelessIface.activeAccessPoint().path());
}
NetworkManager::WirelessDevice::~WirelessDevice()
1
0
Hello community,
here is the log from the commit of package libKF5ModemManagerQt for openSUSE:Factory checked in at 2016-10-28 12:24:56
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libKF5ModemManagerQt (Old)
and /work/SRC/openSUSE:Factory/.libKF5ModemManagerQt.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libKF5ModemManagerQt"
Changes:
--------
--- /work/SRC/openSUSE:Factory/libKF5ModemManagerQt/libKF5ModemManagerQt.changes 2016-09-14 23:29:46.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.libKF5ModemManagerQt.new/libKF5ModemManagerQt.changes 2016-10-28 12:24:57.000000000 +0200
@@ -1,0 +2,7 @@
+Sun Oct 2 13:01:46 UTC 2016 - hrvoje.senjan(a)gmail.com
+
+- Update to 5.27.0
+ * For more details please see:
+ https://www.kde.org/announcements/kde-frameworks-5.27.0.php
+
+-------------------------------------------------------------------
Old:
----
modemmanager-qt-5.26.0.tar.xz
New:
----
modemmanager-qt-5.27.0.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libKF5ModemManagerQt.spec ++++++
--- /var/tmp/diff_new_pack.CfO1PR/_old 2016-10-28 12:24:58.000000000 +0200
+++ /var/tmp/diff_new_pack.CfO1PR/_new 2016-10-28 12:24:58.000000000 +0200
@@ -17,9 +17,9 @@
%define soversion 6
-%define _tar_path 5.26
+%define _tar_path 5.27
Name: libKF5ModemManagerQt
-Version: 5.26.0
+Version: 5.27.0
Release: 0
Summary: Qt wrapper for ModemManager DBus API
License: LGPL-2.1 or LGPL-3.0
++++++ modemmanager-qt-5.26.0.tar.xz -> modemmanager-qt-5.27.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/modemmanager-qt-5.26.0/CMakeLists.txt new/modemmanager-qt-5.27.0/CMakeLists.txt
--- old/modemmanager-qt-5.26.0/CMakeLists.txt 2016-09-06 00:45:36.000000000 +0200
+++ new/modemmanager-qt-5.27.0/CMakeLists.txt 2016-10-02 10:16:33.000000000 +0200
@@ -3,7 +3,7 @@
project(ModemManagerQt)
include(FeatureSummary)
-find_package(ECM 5.26.0 NO_MODULE)
+find_package(ECM 5.27.0 NO_MODULE)
set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake Modules." URL "https://projects.kde.org/projects/kdesupport/extra-cmake-modules")
feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND FATAL_ON_MISSING_REQUIRED_PACKAGES)
@@ -32,7 +32,7 @@
include(ECMSetupVersion)
include(ECMGenerateHeaders)
-set(KF5_VERSION "5.26.0") # handled by release scripts
+set(KF5_VERSION "5.27.0") # handled by release scripts
ecm_setup_version(${KF5_VERSION} VARIABLE_PREFIX MODEMMANAGERQT
VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/modemmanagerqt_version.h"
1
0
Hello community,
here is the log from the commit of package kxmlrpcclient5 for openSUSE:Factory checked in at 2016-10-28 12:24:46
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kxmlrpcclient5 (Old)
and /work/SRC/openSUSE:Factory/.kxmlrpcclient5.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kxmlrpcclient5"
Changes:
--------
--- /work/SRC/openSUSE:Factory/kxmlrpcclient5/kxmlrpcclient5.changes 2016-09-14 23:29:38.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.kxmlrpcclient5.new/kxmlrpcclient5.changes 2016-10-28 12:24:47.000000000 +0200
@@ -1,0 +2,8 @@
+Sun Oct 2 13:01:39 UTC 2016 - hrvoje.senjan(a)gmail.com
+
+- Update to 5.27.0
+ * Convert categories to org.kde.pim.*
+ * For more details please see:
+ https://www.kde.org/announcements/kde-frameworks-5.27.0.php
+
+-------------------------------------------------------------------
Old:
----
kxmlrpcclient-5.26.0.tar.xz
New:
----
kxmlrpcclient-5.27.0.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ kxmlrpcclient5.spec ++++++
--- /var/tmp/diff_new_pack.e8MBOf/_old 2016-10-28 12:24:48.000000000 +0200
+++ /var/tmp/diff_new_pack.e8MBOf/_new 2016-10-28 12:24:48.000000000 +0200
@@ -19,9 +19,9 @@
%bcond_without lang
%define rname kxmlrpcclient
%define lname libKF5XmlRpcClient5
-%define _tar_path 5.26
+%define _tar_path 5.27
Name: kxmlrpcclient5
-Version: 5.26.0
+Version: 5.27.0
Release: 0
%define kf5_version %{version}
Summary: Library containing simple XML-RPC Client support
++++++ kxmlrpcclient-5.26.0.tar.xz -> kxmlrpcclient-5.27.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kxmlrpcclient-5.26.0/CMakeLists.txt new/kxmlrpcclient-5.27.0/CMakeLists.txt
--- old/kxmlrpcclient-5.26.0/CMakeLists.txt 2016-09-06 14:25:12.000000000 +0200
+++ new/kxmlrpcclient-5.27.0/CMakeLists.txt 2016-10-02 12:02:54.000000000 +0200
@@ -4,7 +4,7 @@
# ECM setup
include(FeatureSummary)
-find_package(ECM 5.26.0 CONFIG )
+find_package(ECM 5.27.0 CONFIG )
set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake Modules." URL "https://projects.kde.org/projects/kdesupport/extra-cmake-modules")
feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND FATAL_ON_MISSING_REQUIRED_PACKAGES)
@@ -21,8 +21,8 @@
include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
include(ECMQtDeclareLoggingCategory)
-set(KF5_VERSION "5.26.0") # handled by release scripts
-set(KF5_DEP_VERSION "5.26.0") # handled by release scripts
+set(KF5_VERSION "5.27.0") # handled by release scripts
+set(KF5_DEP_VERSION "5.27.0") # handled by release scripts
add_definitions(-DTRANSLATION_DOMAIN=\"libkxmlrpcclient5\")
ecm_setup_version(${KF5_VERSION} VARIABLE_PREFIX KXMLRPCCLIENT
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kxmlrpcclient-5.26.0/src/CMakeLists.txt new/kxmlrpcclient-5.27.0/src/CMakeLists.txt
--- old/kxmlrpcclient-5.26.0/src/CMakeLists.txt 2016-09-06 14:25:12.000000000 +0200
+++ new/kxmlrpcclient-5.27.0/src/CMakeLists.txt 2016-10-02 12:02:54.000000000 +0200
@@ -3,7 +3,7 @@
query.cpp
)
-ecm_qt_declare_logging_category(kxmlrpcclient_SRCS HEADER kxmlrpcclient_debug.h IDENTIFIER KXMLRPCCLIENT_LOG CATEGORY_NAME log_kxmlrpcclient)
+ecm_qt_declare_logging_category(kxmlrpcclient_SRCS HEADER kxmlrpcclient_debug.h IDENTIFIER KXMLRPCCLIENT_LOG CATEGORY_NAME org.kde.pim.kxmlrpcclient)
add_library(KF5XmlRpcClient ${kxmlrpcclient_SRCS})
1
0
Hello community,
here is the log from the commit of package kxmlgui for openSUSE:Factory checked in at 2016-10-28 12:24:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kxmlgui (Old)
and /work/SRC/openSUSE:Factory/.kxmlgui.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kxmlgui"
Changes:
--------
--- /work/SRC/openSUSE:Factory/kxmlgui/kxmlgui.changes 2016-09-14 23:29:26.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.kxmlgui.new/kxmlgui.changes 2016-10-28 12:24:39.000000000 +0200
@@ -1,0 +2,7 @@
+Sun Oct 2 13:01:19 UTC 2016 - hrvoje.senjan(a)gmail.com
+
+- Update to 5.27.0
+ * For more details please see:
+ https://www.kde.org/announcements/kde-frameworks-5.27.0.php
+
+-------------------------------------------------------------------
Old:
----
kxmlgui-5.26.0.tar.xz
New:
----
kxmlgui-5.27.0.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ kxmlgui.spec ++++++
--- /var/tmp/diff_new_pack.YeJ128/_old 2016-10-28 12:24:40.000000000 +0200
+++ /var/tmp/diff_new_pack.YeJ128/_new 2016-10-28 12:24:40.000000000 +0200
@@ -18,9 +18,9 @@
%bcond_without lang
%define lname libKF5XmlGui5
-%define _tar_path 5.26
+%define _tar_path 5.27
Name: kxmlgui
-Version: 5.26.0
+Version: 5.27.0
Release: 0
%define kf5_version %{version}
BuildRequires: attica-qt5-devel >= %{_tar_path}
++++++ kxmlgui-5.26.0.tar.xz -> kxmlgui-5.27.0.tar.xz ++++++
++++ 851508 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package kwindowsystem for openSUSE:Factory checked in at 2016-10-28 12:24:29
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kwindowsystem (Old)
and /work/SRC/openSUSE:Factory/.kwindowsystem.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kwindowsystem"
Changes:
--------
--- /work/SRC/openSUSE:Factory/kwindowsystem/kwindowsystem.changes 2016-09-14 23:29:15.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.kwindowsystem.new/kwindowsystem.changes 2016-10-28 12:24:29.000000000 +0200
@@ -1,0 +2,7 @@
+Sun Oct 2 13:01:04 UTC 2016 - hrvoje.senjan(a)gmail.com
+
+- Update to 5.27.0
+ * For more details please see:
+ https://www.kde.org/announcements/kde-frameworks-5.27.0.php
+
+-------------------------------------------------------------------
Old:
----
kwindowsystem-5.26.0.tar.xz
New:
----
kwindowsystem-5.27.0.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ kwindowsystem.spec ++++++
--- /var/tmp/diff_new_pack.MUs1l6/_old 2016-10-28 12:24:30.000000000 +0200
+++ /var/tmp/diff_new_pack.MUs1l6/_new 2016-10-28 12:24:30.000000000 +0200
@@ -18,9 +18,9 @@
%bcond_without lang
%define lname libKF5WindowSystem5
-%define _tar_path 5.26
+%define _tar_path 5.27
Name: kwindowsystem
-Version: 5.26.0
+Version: 5.27.0
Release: 0
BuildRequires: cmake >= 2.8.12
BuildRequires: extra-cmake-modules >= %{_tar_path}
++++++ kwindowsystem-5.26.0.tar.xz -> kwindowsystem-5.27.0.tar.xz ++++++
++++ 866892 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package kwidgetsaddons for openSUSE:Factory checked in at 2016-10-28 12:24:21
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kwidgetsaddons (Old)
and /work/SRC/openSUSE:Factory/.kwidgetsaddons.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kwidgetsaddons"
Changes:
--------
--- /work/SRC/openSUSE:Factory/kwidgetsaddons/kwidgetsaddons.changes 2016-09-14 23:29:07.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.kwidgetsaddons.new/kwidgetsaddons.changes 2016-10-28 12:24:23.000000000 +0200
@@ -1,0 +2,7 @@
+Sun Oct 2 13:00:42 UTC 2016 - hrvoje.senjan(a)gmail.com
+
+- Update to 5.27.0
+ * For more details please see:
+ https://www.kde.org/announcements/kde-frameworks-5.27.0.php
+
+-------------------------------------------------------------------
Old:
----
kwidgetsaddons-5.26.0.tar.xz
New:
----
kwidgetsaddons-5.27.0.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ kwidgetsaddons.spec ++++++
--- /var/tmp/diff_new_pack.ITCFpm/_old 2016-10-28 12:24:24.000000000 +0200
+++ /var/tmp/diff_new_pack.ITCFpm/_new 2016-10-28 12:24:24.000000000 +0200
@@ -18,9 +18,9 @@
%bcond_without lang
%define lname libKF5WidgetsAddons5
-%define _tar_path 5.26
+%define _tar_path 5.27
Name: kwidgetsaddons
-Version: 5.26.0
+Version: 5.27.0
Release: 0
BuildRequires: cmake >= 2.8.12
BuildRequires: extra-cmake-modules >= %{_tar_path}
++++++ kwidgetsaddons-5.26.0.tar.xz -> kwidgetsaddons-5.27.0.tar.xz ++++++
++++ 760996 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package kwayland for openSUSE:Factory checked in at 2016-10-28 12:24:12
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kwayland (Old)
and /work/SRC/openSUSE:Factory/.kwayland.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kwayland"
Changes:
--------
--- /work/SRC/openSUSE:Factory/kwayland/kwayland.changes 2016-09-14 23:28:58.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.kwayland.new/kwayland.changes 2016-10-28 12:24:13.000000000 +0200
@@ -1,0 +2,13 @@
+Sun Oct 2 13:00:34 UTC 2016 - hrvoje.senjan(a)gmail.com
+
+- Update to 5.27.0
+ * [server] Don't send key release for not pressed keys and
+ no double key press (kde#366625)
+ * [server] When replacing the clipboard selection previous
+ DataSource needs to be cancelled (kde#368391)
+ * Add support for Surface enter/leave events
+ * [client] Track all created Outputs and add static get method
+ * For more details please see:
+ https://www.kde.org/announcements/kde-frameworks-5.27.0.php
+
+-------------------------------------------------------------------
Old:
----
kwayland-5.26.0.tar.xz
New:
----
kwayland-5.27.0.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ kwayland.spec ++++++
--- /var/tmp/diff_new_pack.pZHLJn/_old 2016-10-28 12:24:14.000000000 +0200
+++ /var/tmp/diff_new_pack.pZHLJn/_new 2016-10-28 12:24:14.000000000 +0200
@@ -16,9 +16,9 @@
#
-%define _tar_path 5.26
+%define _tar_path 5.27
Name: kwayland
-Version: 5.26.0
+Version: 5.27.0
Release: 0
Summary: KDE Wayland library
License: LGPL-2.1+
++++++ kwayland-5.26.0.tar.xz -> kwayland-5.27.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwayland-5.26.0/CMakeLists.txt new/kwayland-5.27.0/CMakeLists.txt
--- old/kwayland-5.26.0/CMakeLists.txt 2016-09-06 00:44:32.000000000 +0200
+++ new/kwayland-5.27.0/CMakeLists.txt 2016-10-02 10:13:48.000000000 +0200
@@ -4,7 +4,7 @@
# ECM setup
include(FeatureSummary)
-find_package(ECM 5.26.0 NO_MODULE)
+find_package(ECM 5.27.0 NO_MODULE)
set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake Modules." URL "https://projects.kde.org/projects/kdesupport/extra-cmake-modules")
feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND FATAL_ON_MISSING_REQUIRED_PACKAGES)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
@@ -18,7 +18,7 @@
include(ECMPoQmTools)
-set(KF5_VERSION "5.26.0") # handled by release scripts
+set(KF5_VERSION "5.27.0") # handled by release scripts
ecm_setup_version(${KF5_VERSION} VARIABLE_PREFIX KWAYLAND
VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/kwayland_version.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwayland-5.26.0/autotests/client/test_datadevice.cpp new/kwayland-5.27.0/autotests/client/test_datadevice.cpp
--- old/kwayland-5.26.0/autotests/client/test_datadevice.cpp 2016-09-06 00:44:32.000000000 +0200
+++ new/kwayland-5.27.0/autotests/client/test_datadevice.cpp 2016-10-02 10:13:48.000000000 +0200
@@ -53,6 +53,7 @@
void testDragInternally();
void testSetSelection();
void testSendSelectionOnSeat();
+ void testReplaceSource();
void testDestroy();
private:
@@ -455,6 +456,79 @@
m_seatInterface->setFocusedKeyboardSurface(serverSurface);
}
+void TestDataDevice::testReplaceSource()
+{
+ // this test verifies that replacing a data source cancels the previous source
+ using namespace KWayland::Client;
+ using namespace KWayland::Server;
+ // first add keyboard support to Seat
+ QSignalSpy keyboardChangedSpy(m_seat, &Seat::hasKeyboardChanged);
+ QVERIFY(keyboardChangedSpy.isValid());
+ m_seatInterface->setHasKeyboard(true);
+ QVERIFY(keyboardChangedSpy.wait());
+ // now create DataDevice, Keyboard and a Surface
+ QSignalSpy dataDeviceCreatedSpy(m_dataDeviceManagerInterface, &DataDeviceManagerInterface::dataDeviceCreated);
+ QVERIFY(dataDeviceCreatedSpy.isValid());
+ QScopedPointer<DataDevice> dataDevice(m_dataDeviceManager->getDataDevice(m_seat));
+ QVERIFY(dataDevice->isValid());
+ QVERIFY(dataDeviceCreatedSpy.wait());
+ auto serverDataDevice = dataDeviceCreatedSpy.first().first().value<DataDeviceInterface*>();
+ QVERIFY(serverDataDevice);
+ QScopedPointer<Keyboard> keyboard(m_seat->createKeyboard());
+ QVERIFY(keyboard->isValid());
+ QSignalSpy surfaceCreatedSpy(m_compositorInterface, &CompositorInterface::surfaceCreated);
+ QVERIFY(surfaceCreatedSpy.isValid());
+ QScopedPointer<Surface> surface(m_compositor->createSurface());
+ QVERIFY(surface->isValid());
+ QVERIFY(surfaceCreatedSpy.wait());
+
+ auto serverSurface = surfaceCreatedSpy.first().first().value<SurfaceInterface*>();
+ QVERIFY(serverSurface);
+ m_seatInterface->setFocusedKeyboardSurface(serverSurface);
+
+ // now set the selection
+ QScopedPointer<DataSource> dataSource(m_dataDeviceManager->createDataSource());
+ QVERIFY(dataSource->isValid());
+ dataSource->offer(QStringLiteral("text/plain"));
+ dataDevice->setSelection(1, dataSource.data());
+ QSignalSpy sourceCancelledSpy(dataSource.data(), &DataSource::cancelled);
+ QVERIFY(sourceCancelledSpy.isValid());
+ // we should get a selection offered for that on the data device
+ QSignalSpy selectionOfferedSpy(dataDevice.data(), &DataDevice::selectionOffered);
+ QVERIFY(selectionOfferedSpy.isValid());
+ QVERIFY(selectionOfferedSpy.wait());
+ QCOMPARE(selectionOfferedSpy.count(), 1);
+
+ // create a second data source and replace previous one
+ QScopedPointer<DataSource> dataSource2(m_dataDeviceManager->createDataSource());
+ QVERIFY(dataSource2->isValid());
+ dataSource2->offer(QStringLiteral("text/plain"));
+ QSignalSpy sourceCancelled2Spy(dataSource2.data(), &DataSource::cancelled);
+ QVERIFY(sourceCancelled2Spy.isValid());
+ dataDevice->setSelection(1, dataSource2.data());
+ QCOMPARE(selectionOfferedSpy.count(), 1);
+ QVERIFY(sourceCancelledSpy.wait());
+ QCOMPARE(selectionOfferedSpy.count(), 2);
+ QVERIFY(sourceCancelled2Spy.isEmpty());
+
+ // create a new DataDevice and replace previous one
+ QScopedPointer<DataDevice> dataDevice2(m_dataDeviceManager->getDataDevice(m_seat));
+ QVERIFY(dataDevice2->isValid());
+ QScopedPointer<DataSource> dataSource3(m_dataDeviceManager->createDataSource());
+ QVERIFY(dataSource3->isValid());
+ dataSource3->offer(QStringLiteral("text/plain"));
+ dataDevice2->setSelection(1, dataSource3.data());
+ QVERIFY(sourceCancelled2Spy.wait());
+
+ // try to crash by first destroying dataSource3 and setting a new DataSource
+ QScopedPointer<DataSource> dataSource4(m_dataDeviceManager->createDataSource());
+ QVERIFY(dataSource4->isValid());
+ dataSource4->offer(QStringLiteral("text/plain"));
+ dataSource3.reset();
+ dataDevice2->setSelection(1, dataSource4.data());
+ QVERIFY(selectionOfferedSpy.wait());
+}
+
void TestDataDevice::testDestroy()
{
using namespace KWayland::Client;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwayland-5.26.0/autotests/client/test_wayland_output.cpp new/kwayland-5.27.0/autotests/client/test_wayland_output.cpp
--- old/kwayland-5.26.0/autotests/client/test_wayland_output.cpp 2016-09-06 00:44:32.000000000 +0200
+++ new/kwayland-5.27.0/autotests/client/test_wayland_output.cpp 2016-10-02 10:13:48.000000000 +0200
@@ -185,7 +185,10 @@
QSignalSpy outputChanged(&output, SIGNAL(changed()));
QVERIFY(outputChanged.isValid());
- output.setup(registry.bindOutput(announced.first().first().value<quint32>(), announced.first().last().value<quint32>()));
+ auto o = registry.bindOutput(announced.first().first().value<quint32>(), announced.first().last().value<quint32>());
+ QVERIFY(!KWayland::Client::Output::get(o));
+ output.setup(o);
+ QCOMPARE(KWayland::Client::Output::get(o), &output);
wl_display_flush(m_connection->display());
QVERIFY(outputChanged.wait());
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwayland-5.26.0/autotests/client/test_wayland_seat.cpp new/kwayland-5.27.0/autotests/client/test_wayland_seat.cpp
--- old/kwayland-5.26.0/autotests/client/test_wayland_seat.cpp 2016-09-06 00:44:32.000000000 +0200
+++ new/kwayland-5.27.0/autotests/client/test_wayland_seat.cpp 2016-10-02 10:13:48.000000000 +0200
@@ -1201,6 +1201,21 @@
QCOMPARE(keyChangedSpy.at(4).at(1).value<Keyboard::KeyState>(), Keyboard::KeyState::Released);
QCOMPARE(keyChangedSpy.at(4).at(2).value<quint32>(), quint32(8));
+ // releasing a key which is already released should not set a key changed
+ m_seatInterface->keyReleased(KEY_F1);
+ QVERIFY(!keyChangedSpy.wait(200));
+ // let's press it again
+ m_seatInterface->keyPressed(KEY_F1);
+ QVERIFY(keyChangedSpy.wait());
+ QCOMPARE(keyChangedSpy.count(), 6);
+ // press again should be ignored
+ m_seatInterface->keyPressed(KEY_F1);
+ QVERIFY(!keyChangedSpy.wait(200));
+ // and release
+ m_seatInterface->keyReleased(KEY_F1);
+ QVERIFY(keyChangedSpy.wait());
+ QCOMPARE(keyChangedSpy.count(), 7);
+
m_seatInterface->updateKeyboardModifiers(1, 2, 3, 4);
QVERIFY(modifierSpy.wait());
QCOMPARE(modifierSpy.count(), 2);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwayland-5.26.0/autotests/client/test_wayland_surface.cpp new/kwayland-5.27.0/autotests/client/test_wayland_surface.cpp
--- old/kwayland-5.26.0/autotests/client/test_wayland_surface.cpp 2016-09-06 00:44:32.000000000 +0200
+++ new/kwayland-5.27.0/autotests/client/test_wayland_surface.cpp 2016-10-02 10:13:48.000000000 +0200
@@ -25,6 +25,7 @@
#include "../../src/client/compositor.h"
#include "../../src/client/connection_thread.h"
#include "../../src/client/event_queue.h"
+#include "../../src/client/output.h"
#include "../../src/client/surface.h"
#include "../../src/client/region.h"
#include "../../src/client/registry.h"
@@ -59,6 +60,7 @@
void testSurfaceAt();
void testDestroyAttachedBuffer();
void testDestroyWithPendingCallback();
+ void testOutput();
void testDisconnect();
private:
@@ -956,5 +958,78 @@
m_queue->destroy();
}
+void TestWaylandSurface::testOutput()
+{
+ // This test verifies that the enter/leave are sent correctly to the Client
+ using namespace KWayland::Client;
+ using namespace KWayland::Server;
+ qRegisterMetaType<KWayland::Client::Output*>();
+ QScopedPointer<Surface> s(m_compositor->createSurface());
+ QVERIFY(!s.isNull());
+ QVERIFY(s->isValid());
+ QVERIFY(s->outputs().isEmpty());
+ QSignalSpy enteredSpy(s.data(), &Surface::outputEntered);
+ QVERIFY(enteredSpy.isValid());
+ QSignalSpy leftSpy(s.data(), &Surface::outputLeft);
+ QVERIFY(leftSpy.isValid());
+ // wait for the surface on the Server side
+ QSignalSpy surfaceCreatedSpy(m_compositorInterface, &CompositorInterface::surfaceCreated);
+ QVERIFY(surfaceCreatedSpy.isValid());
+ QVERIFY(surfaceCreatedSpy.wait());
+ auto serverSurface = surfaceCreatedSpy.first().first().value<SurfaceInterface*>();
+ QVERIFY(serverSurface);
+ QCOMPARE(serverSurface->outputs(), QVector<OutputInterface*>());
+
+ // create another registry to get notified about added outputs
+ Registry registry;
+ registry.setEventQueue(m_queue);
+ QSignalSpy allAnnounced(®istry, &Registry::interfacesAnnounced);
+ QVERIFY(allAnnounced.isValid());
+ registry.create(m_connection);
+ QVERIFY(registry.isValid());
+ registry.setup();
+ QVERIFY(allAnnounced.wait());
+ QSignalSpy outputAnnouncedSpy(®istry, &Registry::outputAnnounced);
+ QVERIFY(outputAnnouncedSpy.isValid());
+
+ auto serverOutput = m_display->createOutput(m_display);
+ serverOutput->create();
+ QVERIFY(outputAnnouncedSpy.wait());
+ QScopedPointer<Output> clientOutput(registry.createOutput(outputAnnouncedSpy.first().first().value<quint32>(), outputAnnouncedSpy.first().last().value<quint32>()));
+ QVERIFY(clientOutput->isValid());
+ m_connection->flush();
+ m_display->dispatchEvents();
+
+ // now enter it
+ serverSurface->setOutputs(QVector<OutputInterface*>{serverOutput});
+ QCOMPARE(serverSurface->outputs(), QVector<OutputInterface*>{serverOutput});
+ QVERIFY(enteredSpy.wait());
+ QCOMPARE(enteredSpy.count(), 1);
+ QCOMPARE(enteredSpy.first().first().value<Output*>(), clientOutput.data());
+ QCOMPARE(s->outputs(), QVector<Output*>{clientOutput.data()});
+
+ // adding to same should not trigger
+ serverSurface->setOutputs(QVector<OutputInterface*>{serverOutput});
+
+ // leave again
+ serverSurface->setOutputs(QVector<OutputInterface*>());
+ QCOMPARE(serverSurface->outputs(), QVector<OutputInterface*>());
+ QVERIFY(leftSpy.wait());
+ QCOMPARE(enteredSpy.count(), 1);
+ QCOMPARE(leftSpy.count(), 1);
+ QCOMPARE(leftSpy.first().first().value<Output*>(), clientOutput.data());
+ QCOMPARE(s->outputs(), QVector<Output*>());
+
+ // leave again should not trigger
+ serverSurface->setOutputs(QVector<OutputInterface*>());
+
+ // and enter again, just to verify
+ serverSurface->setOutputs(QVector<OutputInterface*>{serverOutput});
+ QCOMPARE(serverSurface->outputs(), QVector<OutputInterface*>{serverOutput});
+ QVERIFY(enteredSpy.wait());
+ QCOMPARE(enteredSpy.count(), 2);
+ QCOMPARE(leftSpy.count(), 1);
+}
+
QTEST_GUILESS_MAIN(TestWaylandSurface)
#include "test_wayland_surface.moc"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwayland-5.26.0/src/client/output.cpp new/kwayland-5.27.0/src/client/output.cpp
--- old/kwayland-5.26.0/src/client/output.cpp 2016-09-06 00:44:32.000000000 +0200
+++ new/kwayland-5.27.0/src/client/output.cpp 2016-10-02 10:13:48.000000000 +0200
@@ -23,6 +23,7 @@
#include <QPoint>
#include <QRect>
#include <QSize>
+#include <QVector>
// wayland
#include <wayland-client-protocol.h>
@@ -40,6 +41,7 @@
{
public:
Private(Output *q);
+ ~Private();
void setup(wl_output *o);
WaylandPointer<wl_output, wl_output_destroy> output;
@@ -54,6 +56,8 @@
Modes modes;
Modes::iterator currentMode = modes.end();
+ static Output *get(wl_output *o);
+
private:
static void geometryCallback(void *data, wl_output *output, int32_t x, int32_t y,
int32_t physicalWidth, int32_t physicalHeight, int32_t subPixel,
@@ -72,11 +76,35 @@
Output *q;
static struct wl_output_listener s_outputListener;
+
+ static QVector<Private*> s_allOutputs;
};
+QVector<Output::Private*> Output::Private::s_allOutputs;
+
Output::Private::Private(Output *q)
: q(q)
{
+ s_allOutputs << this;
+}
+
+Output::Private::~Private()
+{
+ s_allOutputs.removeOne(this);
+}
+
+Output *Output::Private::get(wl_output *o)
+{
+ auto it = std::find_if(s_allOutputs.constBegin(), s_allOutputs.constEnd(),
+ [o] (Private *p) {
+ const wl_output *reference = p->output;
+ return reference == o;
+ }
+ );
+ if (it != s_allOutputs.constEnd()) {
+ return (*it)->q;
+ }
+ return nullptr;
}
void Output::Private::setup(wl_output *o)
@@ -358,5 +386,10 @@
return d->output;
}
+Output *Output::get(wl_output *o)
+{
+ return Private::get(o);
+}
+
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwayland-5.26.0/src/client/output.h new/kwayland-5.27.0/src/client/output.h
--- old/kwayland-5.26.0/src/client/output.h 2016-09-06 00:44:32.000000000 +0200
+++ new/kwayland-5.27.0/src/client/output.h 2016-10-02 10:13:48.000000000 +0200
@@ -198,6 +198,12 @@
**/
EventQueue *eventQueue() const;
+ /**
+ * @returns The Output for the @p native wl_output. @c null if there is no Output for it.
+ * @since 5.27
+ **/
+ static Output *get(wl_output *native);
+
Q_SIGNALS:
/**
* Emitted whenever at least one of the data changed.
@@ -236,6 +242,7 @@
}
}
+Q_DECLARE_METATYPE(KWayland::Client::Output*)
Q_DECLARE_METATYPE(KWayland::Client::Output::SubPixel)
Q_DECLARE_METATYPE(KWayland::Client::Output::Transform)
Q_DECLARE_METATYPE(KWayland::Client::Output::Mode)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwayland-5.26.0/src/client/surface.cpp new/kwayland-5.27.0/src/client/surface.cpp
--- old/kwayland-5.26.0/src/client/surface.cpp 2016-09-06 00:44:32.000000000 +0200
+++ new/kwayland-5.27.0/src/client/surface.cpp 2016-10-02 10:13:48.000000000 +0200
@@ -20,6 +20,7 @@
#include "surface.h"
#include "buffer.h"
#include "region.h"
+#include "output.h"
#include "wayland_pointer_p.h"
#include <QGuiApplication>
@@ -46,14 +47,20 @@
QSize size;
bool foreign = false;
qint32 scale = 1;
+ QVector<Output *> outputs;
+
+ void setup(wl_surface *s);
static QList<Surface*> s_surfaces;
private:
void handleFrameCallback();
static void frameCallback(void *data, wl_callback *callback, uint32_t time);
+ static void enterCallback(void *data, wl_surface *wl_surface, wl_output *output);
+ static void leaveCallback(void *data, wl_surface *wl_surface, wl_output *output);
Surface *q;
static const wl_callback_listener s_listener;
+ static const wl_surface_listener s_surfaceListener;
};
QList<Surface*> Surface::Private::s_surfaces = QList<Surface*>();
@@ -130,9 +137,15 @@
void Surface::setup(wl_surface *surface)
{
- Q_ASSERT(surface);
- Q_ASSERT(!d->surface);
- d->surface.setup(surface);
+ d->setup(surface);
+}
+
+void Surface::Private::setup(wl_surface *s)
+{
+ Q_ASSERT(s);
+ Q_ASSERT(!surface);
+ surface.setup(s);
+ wl_surface_add_listener(s, &s_surfaceListener, this);
}
void Surface::Private::frameCallback(void *data, wl_callback *callback, uint32_t time)
@@ -155,8 +168,37 @@
const struct wl_callback_listener Surface::Private::s_listener = {
frameCallback
};
+
+const struct wl_surface_listener Surface::Private::s_surfaceListener = {
+ enterCallback,
+ leaveCallback
+};
#endif
+void Surface::Private::enterCallback(void *data, wl_surface *surface, wl_output *output)
+{
+ Q_UNUSED(surface);
+ auto s = reinterpret_cast<Surface::Private*>(data);
+ Output *o = Output::get(output);
+ if (!o) {
+ return;
+ }
+ s->outputs << o;
+ emit s->q->outputEntered(o);
+}
+
+void Surface::Private::leaveCallback(void *data, wl_surface *surface, wl_output *output)
+{
+ Q_UNUSED(surface);
+ auto s = reinterpret_cast<Surface::Private*>(data);
+ Output *o = Output::get(output);
+ if (!o) {
+ return;
+ }
+ s->outputs.removeOne(o);
+ emit s->q->outputLeft(o);
+}
+
void Surface::Private::setupFrameCallback()
{
Q_ASSERT(!frameCallbackInstalled);
@@ -293,5 +335,10 @@
wl_surface_set_buffer_scale(d->surface, scale);
}
+QVector<Output *> Surface::outputs() const
+{
+ return d->outputs;
+}
+
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwayland-5.26.0/src/client/surface.h new/kwayland-5.27.0/src/client/surface.h
--- old/kwayland-5.26.0/src/client/surface.h 2016-09-06 00:44:32.000000000 +0200
+++ new/kwayland-5.27.0/src/client/surface.h 2016-10-02 10:13:48.000000000 +0200
@@ -39,6 +39,7 @@
namespace Client
{
+class Output;
class Region;
/**
@@ -238,6 +239,14 @@
quint32 id() const;
/**
+ * @returns All Outputs the Surface is on, may be none.
+ * @see outputEntered
+ * @see outputLeft
+ * @since 5.27
+ **/
+ QVector<Output *> outputs() const;
+
+ /**
* All Surfaces which are currently created.
* TODO: KF6 return QList<Surface*> instead of const-ref
**/
@@ -258,6 +267,28 @@
void frameRendered();
void sizeChanged(const QSize&);
+ /**
+ * Emitted whenever a change in the Surface (e.g. creation, movement, resize) results in
+ * a part of the Surface being within the scanout region of the Output @p o.
+ *
+ * @param o The Output the Surface intersects with
+ * @see outputLeft
+ * @see outputs
+ * @since 5.27
+ **/
+ void outputEntered(KWayland::Client::Output *o);
+
+ /**
+ * Emitted whenever a change in the Surface (e.g. creation, movement, resize, unmapping)
+ * results in the Surface no longer being within the scanout region of the Output @p o.
+ *
+ * @param o The Output the Surface no longer intersects with
+ * @see outputEntered
+ * @see outputs
+ * @since 5.27
+ **/
+ void outputLeft(KWayland::Client::Output *o);
+
private:
class Private;
QScopedPointer<Private> d;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwayland-5.26.0/src/server/datadevice_interface.cpp new/kwayland-5.27.0/src/server/datadevice_interface.cpp
--- old/kwayland-5.26.0/src/server/datadevice_interface.cpp 2016-09-06 00:44:32.000000000 +0200
+++ new/kwayland-5.27.0/src/server/datadevice_interface.cpp 2016-10-02 10:13:48.000000000 +0200
@@ -48,6 +48,8 @@
SurfaceInterface *icon = nullptr;
DataSourceInterface *selection = nullptr;
+ QMetaObject::Connection selectionUnboundConnection;
+ QMetaObject::Connection selectionDestroyedConnection;
struct Drag {
SurfaceInterface *surface = nullptr;
@@ -120,10 +122,22 @@
void DataDeviceInterface::Private::setSelection(DataSourceInterface *dataSource)
{
Q_Q(DataDeviceInterface);
+ QObject::disconnect(selectionUnboundConnection);
+ QObject::disconnect(selectionDestroyedConnection);
+ if (selection) {
+ selection->cancel();
+ }
selection = dataSource;
if (selection) {
+ auto clearSelection = [this] {
+ setSelection(nullptr);
+ };
+ selectionUnboundConnection = QObject::connect(selection, &Resource::unbound, q, clearSelection);
+ selectionDestroyedConnection = QObject::connect(selection, &QObject::destroyed, q, clearSelection);
emit q->selectionChanged(selection);
} else {
+ selectionUnboundConnection = QMetaObject::Connection();
+ selectionDestroyedConnection = QMetaObject::Connection();
emit q->selectionCleared();
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwayland-5.26.0/src/server/datasource_interface.cpp new/kwayland-5.27.0/src/server/datasource_interface.cpp
--- old/kwayland-5.26.0/src/server/datasource_interface.cpp 2016-09-06 00:44:32.000000000 +0200
+++ new/kwayland-5.27.0/src/server/datasource_interface.cpp 2016-10-02 10:13:48.000000000 +0200
@@ -19,6 +19,7 @@
*********************************************************************/
#include "datasource_interface.h"
#include "datadevicemanager_interface.h"
+#include "clientconnection.h"
#include "resource_p.h"
// Qt
#include <QStringList>
@@ -103,7 +104,11 @@
void DataSourceInterface::cancel()
{
Q_D();
+ if (!d->resource) {
+ return;
+ }
wl_data_source_send_cancelled(d->resource);
+ client()->flush();
}
QStringList DataSourceInterface::mimeTypes() const
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwayland-5.26.0/src/server/output_interface.cpp new/kwayland-5.27.0/src/server/output_interface.cpp
--- old/kwayland-5.26.0/src/server/output_interface.cpp 2016-09-06 00:44:32.000000000 +0200
+++ new/kwayland-5.27.0/src/server/output_interface.cpp 2016-10-02 10:13:48.000000000 +0200
@@ -506,6 +506,18 @@
return d->dpms.supported;
}
+QVector<wl_resource *> OutputInterface::clientResources(ClientConnection *client) const
+{
+ Q_D();
+ QVector<wl_resource *> ret;
+ for (auto it = d->resources.constBegin(), end = d->resources.constEnd(); it != end; ++it) {
+ if (wl_resource_get_client((*it).resource) == client->client()) {
+ ret << (*it).resource;
+ }
+ }
+ return ret;
+}
+
OutputInterface *OutputInterface::get(wl_resource* native)
{
return Private::get(native);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwayland-5.26.0/src/server/output_interface.h new/kwayland-5.27.0/src/server/output_interface.h
--- old/kwayland-5.26.0/src/server/output_interface.h 2016-09-06 00:44:32.000000000 +0200
+++ new/kwayland-5.27.0/src/server/output_interface.h 2016-10-02 10:13:48.000000000 +0200
@@ -36,6 +36,7 @@
namespace Server
{
+class ClientConnection;
class Display;
/**
@@ -125,6 +126,12 @@
**/
void setDpmsMode(DpmsMode mode);
+ /**
+ * @returns all wl_resources bound for the @p client
+ * @since 5.27
+ **/
+ QVector<wl_resource *> clientResources(ClientConnection *client) const;
+
static OutputInterface *get(wl_resource *native);
Q_SIGNALS:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwayland-5.26.0/src/server/seat_interface.cpp new/kwayland-5.27.0/src/server/seat_interface.cpp
--- old/kwayland-5.26.0/src/server/seat_interface.cpp 2016-09-06 00:44:32.000000000 +0200
+++ new/kwayland-5.27.0/src/server/seat_interface.cpp 2016-10-02 10:13:48.000000000 +0200
@@ -132,14 +132,18 @@
it.value() = state;
}
-void SeatInterface::Private::updateKey(quint32 key, Keyboard::State state)
+bool SeatInterface::Private::updateKey(quint32 key, Keyboard::State state)
{
auto it = keys.states.find(key);
if (it == keys.states.end()) {
keys.states.insert(key, state);
- return;
+ return true;
+ }
+ if (it.value() == state) {
+ return false;
}
it.value() = state;
+ return true;
}
void SeatInterface::Private::sendName(wl_resource *r)
@@ -321,6 +325,16 @@
void SeatInterface::Private::updateSelection(DataDeviceInterface *dataDevice, bool set)
{
if (keys.focus.surface && (keys.focus.surface->client() == dataDevice->client())) {
+ if (currentSelection) {
+ // cancel the previous selection
+ if (auto s = currentSelection->selection()) {
+ if (currentSelection != dataDevice) {
+ // only if current selection is not on the same device
+ // that would cancel the newly set source
+ s->cancel();
+ }
+ }
+ }
// new selection on a data device belonging to current keyboard focus
currentSelection = dataDevice;
}
@@ -815,7 +829,9 @@
{
Q_D();
d->keys.lastStateSerial = d->display->nextSerial();
- d->updateKey(key, Private::Keyboard::State::Pressed);
+ if (!d->updateKey(key, Private::Keyboard::State::Pressed)) {
+ return;
+ }
if (d->keys.focus.keyboard && d->keys.focus.surface) {
d->keys.focus.keyboard->keyPressed(key, d->keys.lastStateSerial);
}
@@ -825,7 +841,9 @@
{
Q_D();
d->keys.lastStateSerial = d->display->nextSerial();
- d->updateKey(key, Private::Keyboard::State::Released);
+ if (!d->updateKey(key, Private::Keyboard::State::Released)) {
+ return;
+ }
if (d->keys.focus.keyboard && d->keys.focus.surface) {
d->keys.focus.keyboard->keyReleased(key, d->keys.lastStateSerial);
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwayland-5.26.0/src/server/seat_interface_p.h new/kwayland-5.27.0/src/server/seat_interface_p.h
--- old/kwayland-5.26.0/src/server/seat_interface_p.h 2016-09-06 00:44:32.000000000 +0200
+++ new/kwayland-5.27.0/src/server/seat_interface_p.h 2016-10-02 10:13:48.000000000 +0200
@@ -124,7 +124,7 @@
} keyRepeat;
};
Keyboard keys;
- void updateKey(quint32 key, Keyboard::State state);
+ bool updateKey(quint32 key, Keyboard::State state);
struct TextInput {
struct Focus {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwayland-5.26.0/src/server/surface_interface.cpp new/kwayland-5.27.0/src/server/surface_interface.cpp
--- old/kwayland-5.26.0/src/server/surface_interface.cpp 2016-09-06 00:44:32.000000000 +0200
+++ new/kwayland-5.27.0/src/server/surface_interface.cpp 2016-10-02 10:13:48.000000000 +0200
@@ -688,6 +688,44 @@
d->trackedDamage = QRegion();
}
+QVector<OutputInterface *> SurfaceInterface::outputs() const
+{
+ Q_D();
+ return d->outputs;
+}
+
+void SurfaceInterface::setOutputs(const QVector<OutputInterface *> &outputs)
+{
+ Q_D();
+ QVector<OutputInterface *> removedOutputs = d->outputs;
+ for (auto it = outputs.constBegin(), end = outputs.constEnd(); it != end; ++it) {
+ const auto o = *it;
+ removedOutputs.removeOne(o);
+ }
+ for (auto it = removedOutputs.constBegin(), end = removedOutputs.constEnd(); it != end; ++it) {
+ const auto resources = (*it)->clientResources(client());
+ for (wl_resource *r : resources) {
+ wl_surface_send_leave(d->resource, r);
+ }
+ }
+ // TODO: send leave when OutputInterface gets destroyed
+
+ QVector<OutputInterface *> addedOutputsOutputs = outputs;
+ for (auto it = d->outputs.constBegin(), end = d->outputs.constEnd(); it != end; ++it) {
+ const auto o = *it;
+ addedOutputsOutputs.removeOne(o);
+ }
+ for (auto it = addedOutputsOutputs.constBegin(), end = addedOutputsOutputs.constEnd(); it != end; ++it) {
+ const auto resources = (*it)->clientResources(client());
+ for (wl_resource *r : resources) {
+ wl_surface_send_enter(d->resource, r);
+ }
+ }
+ // TODO: send enter when the client binds the OutputInterface another time
+
+ d->outputs = outputs;
+}
+
SurfaceInterface *SurfaceInterface::surfaceAt(const QPointF &position)
{
if (!isMapped()) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwayland-5.26.0/src/server/surface_interface.h new/kwayland-5.27.0/src/server/surface_interface.h
--- old/kwayland-5.26.0/src/server/surface_interface.h 2016-09-06 00:44:32.000000000 +0200
+++ new/kwayland-5.27.0/src/server/surface_interface.h 2016-10-02 10:13:48.000000000 +0200
@@ -206,6 +206,24 @@
SurfaceInterface *surfaceAt(const QPointF &position);
/**
+ * Sets the @p outputs this SurfaceInterface overlaps with, may be empty.
+ *
+ * The compositor should update whenever the SurfaceInterface becomes visible on
+ * an OutputInterface by e.g. getting (un)mapped, resized, moved, etc.
+ *
+ * @see outputs
+ * @since 5.27
+ **/
+ void setOutputs(const QVector<OutputInterface *> &outputs);
+
+ /**
+ * @returns All OutputInterfaces the SurfaceInterface is on.
+ * @see setOutputs
+ * @since 5.27
+ **/
+ QVector<OutputInterface *> outputs() const;
+
+ /**
* @returns The SurfaceInterface for the @p native resource.
**/
static SurfaceInterface *get(wl_resource *native);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kwayland-5.26.0/src/server/surface_interface_p.h new/kwayland-5.27.0/src/server/surface_interface_p.h
--- old/kwayland-5.26.0/src/server/surface_interface_p.h 2016-09-06 00:44:32.000000000 +0200
+++ new/kwayland-5.27.0/src/server/surface_interface_p.h 2016-10-02 10:13:48.000000000 +0200
@@ -22,6 +22,8 @@
#include "surface_interface.h"
#include "resource_p.h"
+// Qt
+#include <QVector>
// Wayland
#include <wayland-server.h>
@@ -89,6 +91,8 @@
// waiting on the frame callback of the never visible surface
bool subSurfaceIsMapped = true;
+ QVector<OutputInterface *> outputs;
+
private:
SurfaceInterface *q_func() {
return reinterpret_cast<SurfaceInterface *>(q);
1
0