unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob af3cdff729822c008bc4561898a912b671b54ed5 2104 bytes (raw)
name: gnu/packages/patches/networkmanager-qt-activeconnection-test-2.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
 
From 3f6155389abc8e2b3dafc5eefa1ce0c929b007fa Mon Sep 17 00:00:00 2001
From: Jan Grulich <jgrulich@redhat.com>
Date: Mon, 3 Apr 2017 14:13:54 +0200
Subject: One more attempt to fix unit test for active connections

---
 src/activeconnection.cpp | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/activeconnection.cpp b/src/activeconnection.cpp
index 05582fa..3a8e6b2 100644
--- a/src/activeconnection.cpp
+++ b/src/activeconnection.cpp
@@ -79,11 +79,13 @@ NetworkManager::ActiveConnection::ActiveConnection(const QString &path, QObject
     connect(&d->iface, &OrgFreedesktopNetworkManagerConnectionActiveInterface::PropertiesChanged, d, &ActiveConnectionPrivate::propertiesChanged);
 #endif
 
+#ifndef NMQT_STATIC
     /*
      * Workaround: Re-check connection state before we watch changes in case it gets changed too quickly
      * BUG:352326
      */
     d->recheckProperties();
+#endif
 }
 
 NetworkManager::ActiveConnection::ActiveConnection(ActiveConnectionPrivate &dd, QObject *parent)
@@ -91,18 +93,26 @@ NetworkManager::ActiveConnection::ActiveConnection(ActiveConnectionPrivate &dd,
 {
     Q_D(ActiveConnection);
 
+#ifndef NMQT_STATIC
 #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
+#endif
+
+#ifdef NMQT_STATIC
+    connect(&d->iface, &OrgFreedesktopNetworkManagerConnectionActiveInterface::PropertiesChanged, d, &ActiveConnectionPrivate::propertiesChanged);
+#endif
 
+#ifndef NMQT_STATIC
     /*
      * Workaround: Re-check connection state before we watch changes in case it gets changed too quickly
      * BUG:352326
      */
     d->recheckProperties();
+#endif
 }
 
 NetworkManager::ActiveConnection::~ActiveConnection()
-- 
cgit v0.11.2


debug log:

solving af3cdff ...
found af3cdff in https://git.savannah.gnu.org/cgit/guix.git

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).