summaryrefslogtreecommitdiff
path: root/desktop/razorqt/patches/libstatgrab-0.90.patch
blob: d168e5644dd62b166d192f3aa5d99667f9fc56a4 (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
--- a/razorqt-panel/plugin-networkmonitor/razornetworkmonitor.cpp
+++ b/razorqt-panel/plugin-networkmonitor/razornetworkmonitor.cpp
@@ -45,7 +45,7 @@
     addWidget(&m_stuff);
 
     /* Initialise statgrab */
-    sg_init();
+    sg_init(1);
 
     m_iconList << "modem" << "monitor"
                << "network" << "wireless";
@@ -72,11 +72,11 @@
 {
     bool matched = false;
 
-    int num_network_stats;
+    size_t num_network_stats;
 
     sg_network_io_stats *network_stats = sg_get_network_io_stats_diff(&num_network_stats);
 
-    for (int x = 0; x < num_network_stats; x++)
+    for (size_t x = 0; x < num_network_stats; x++)
     {
         if (m_interface == QString::fromLocal8Bit(network_stats->interface_name))
         {
@@ -129,9 +129,9 @@
 {
     if (event->type() == QEvent::ToolTip)
     {
-        int num_network_stats;
+        size_t num_network_stats;
         sg_network_io_stats *network_stats = sg_get_network_io_stats(&num_network_stats);
-        for (int x = 0; x < num_network_stats; x++)
+        for (size_t x = 0; x < num_network_stats; x++)
         {
             if (m_interface == QString::fromLocal8Bit(network_stats->interface_name))
             {
--- a/razorqt-panel/plugin-cpuload/razorcpuload.cpp
+++ b/razorqt-panel/plugin-cpuload/razorcpuload.cpp
@@ -52,7 +52,7 @@
 	addWidget(&m_stuff);
 
 	/* Initialise statgrab */
-	sg_init();
+	sg_init(1);
 
 	/* Drop setuid/setgid privileges. */
 	if (sg_drop_privileges() != 0) {
@@ -89,7 +89,7 @@
 
 double RazorCpuLoad::getLoadCpu() const
 {
-	sg_cpu_percents* cur = sg_get_cpu_percents();
+	sg_cpu_percents* cur = sg_get_cpu_percents(NULL);
 	return (cur->user + cur->kernel + cur->nice);
 }