summaryrefslogtreecommitdiffstats
path: root/arch/tde-extra/tde-tdenetworkmanager/bp000-ea2b20ed7a.diff
blob: 22abf310bcd266b429c40bd16b889beddcff3257 (plain)
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
commit ea2b20ed7ab3e83b8585e20d2febdbb5f2d356c1
Author: Michele Calgaro <michele.calgaro@yahoo.it>
Date:   Mon Aug 2 11:24:50 2021 +0900

    Removed unused hardwareEvent code.
    
    Initialization of TDEHardwareDevices() always happens before the signal
    was connected. The constructor of TDEHardwareDevices() is the only place
    that was triggering the signal emission, so the code was non functional.
    
    Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>

diff --git a/tdenetworkmanager/src/devicetraycomponent.cpp b/tdenetworkmanager/src/devicetraycomponent.cpp
index 5f1f26e..085435c 100644
--- a/tdenetworkmanager/src/devicetraycomponent.cpp
+++ b/tdenetworkmanager/src/devicetraycomponent.cpp
@@ -74,8 +74,6 @@ DeviceTrayComponent::DeviceTrayComponent(TQString device, KSystemTray * parent,
 
 	TDEHardwareDevices* hwdevices = TDEGlobal::hardwareDevices();
 
-	// Listen for hardware change events
-	connect(hwdevices, TQT_SIGNAL(hardwareEvent(TDEHardwareEvent::TDEHardwareEvent, TQString)), this, TQT_SLOT(tdeHardwareEventHandler(TDEHardwareEvent::TDEHardwareEvent, TQString)));
 	// Trigger an initial hardware information update
 	tdeHardwareEventHandler(TDEHardwareEvent::HardwareListModified, TQString::null);
 
diff --git a/tdenetworkmanager/src/tdenetman-tray.cpp b/tdenetworkmanager/src/tdenetman-tray.cpp
index 9427679..173464f 100644
--- a/tdenetworkmanager/src/tdenetman-tray.cpp
+++ b/tdenetworkmanager/src/tdenetman-tray.cpp
@@ -963,14 +963,6 @@ void Tray::slotGenericDeviceRemoved(TDEGenericDevice *dev)
 	}
 }
 
-void Tray::slotGenericHardwareEvent(TDEHardwareEvent::TDEHardwareEvent event, TQString)
-{
-	if (event == TDEHardwareEvent::HardwareListModified) {
-		updateDeviceTrays();
-		connectTrayDeviceManager();
-	}
-}
-
 void Tray::slotVPNEventHandler(TDENetworkVPNEventType::TDENetworkVPNEventType event, TQString message)
 {
 	if (event == TDENetworkVPNEventType::LoginBanner) {
@@ -1094,7 +1086,6 @@ Tray::Tray() : KSystemTray()
 	// get notified about new/removed devices
 	connect(hwdevices, TQT_SIGNAL(hardwareAdded(TDEGenericDevice*)), this, TQT_SLOT(slotGenericDeviceAdded(TDEGenericDevice*)));
 	connect(hwdevices, TQT_SIGNAL(hardwareRemoved(TDEGenericDevice*)), this, TQT_SLOT(slotGenericDeviceRemoved(TDEGenericDevice*)));
-	connect(hwdevices, TQT_SIGNAL(hardwareEvent(TDEHardwareEvent::TDEHardwareEvent, TQString)), this, TQT_SLOT(slotGenericHardwareEvent(TDEHardwareEvent::TDEHardwareEvent, TQString)));
 
 	// Notifications
 	connect(TDEGlobal::networkManager(), TQT_SIGNAL(networkConnectionStateChanged(TDENetworkGlobalManagerFlags::TDENetworkGlobalManagerFlags, TDENetworkGlobalManagerFlags::TDENetworkGlobalManagerFlags)), this, TQT_SLOT(slotStateChangedNotify(TDENetworkGlobalManagerFlags::TDENetworkGlobalManagerFlags, TDENetworkGlobalManagerFlags::TDENetworkGlobalManagerFlags)));
diff --git a/tdenetworkmanager/src/tdenetman-tray.h b/tdenetworkmanager/src/tdenetman-tray.h
index d086902..6f4fdea 100644
--- a/tdenetworkmanager/src/tdenetman-tray.h
+++ b/tdenetworkmanager/src/tdenetman-tray.h
@@ -115,7 +115,6 @@ class Tray : public KSystemTray
 	private slots:
 		void slotGenericDeviceAdded(TDEGenericDevice*);
 		void slotGenericDeviceRemoved(TDEGenericDevice*);
-		void slotGenericHardwareEvent(TDEHardwareEvent::TDEHardwareEvent, TQString);
 		void slotVPNEventHandler(TDENetworkVPNEventType::TDENetworkVPNEventType event, TQString message);
 
 	private:
diff --git a/tdenetworkmanager/src/tdenetman-wireless_device_tray.cpp b/tdenetworkmanager/src/tdenetman-wireless_device_tray.cpp
index 2d4eccb..9b855ec 100644
--- a/tdenetworkmanager/src/tdenetman-wireless_device_tray.cpp
+++ b/tdenetworkmanager/src/tdenetman-wireless_device_tray.cpp
@@ -487,9 +487,6 @@ WirelessDeviceTray::WirelessDeviceTray (TQString dev, KSystemTray * parent, cons
 	setPixmapForState(TDENetworkConnectionStatus::Disconnected, "wireless");
 	setPixmapForState(TDENetworkConnectionStatus::Connected, "nm_signal_50");
 
-	// Listen for hardware change events
-	connect(hwdevices, TQT_SIGNAL(hardwareEvent(TDEHardwareEvent::TDEHardwareEvent, TQString)), this, TQT_SLOT(tdeHardwareEventHandler(TDEHardwareEvent::TDEHardwareEvent, TQString)));
-
 	// Trigger an initial hardware information update
 	tdeHardwareEventHandler(TDEHardwareEvent::HardwareListModified, TQString::null);
 }