mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-06 08:26:50 +01:00
ab5220c6fa
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
57 lines
1.6 KiB
Diff
57 lines
1.6 KiB
Diff
--- 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);
|
|
}
|
|
|