Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
Plasma Add-ons
Commits
e32a705b
Commit
e32a705b
authored
Oct 29, 2015
by
Kåre Särs
Browse files
Fix SystemLoadViewer freezing plasmashell
BUG: 348385 REVIEW: 125858
parent
2a343b91
Changes
1
Hide whitespace changes
Inline
Side-by-side
applets/systemloadviewer/package/contents/ui/SystemLoadViewer.qml
View file @
e32a705b
...
...
@@ -172,21 +172,21 @@ Item {
function
fitCpuLoad
(
load
)
{
var
x
=
load
/
maxCpuLoad
;
if
(
isNaN
(
x
))
{
return
0
;}
return
x
;
return
Math
.
min
(
x
,
1
);
// Ensure that we do not get values that might cause problems
}
function
fitMemoryUsage
(
usage
)
{
var
x
=
(
usage
/
(
parseFloat
(
dataSource
.
data
[
dataSource
.
memFree
].
value
)
+
parseFloat
(
dataSource
.
data
[
dataSource
.
memUsed
].
value
)))
if
(
isNaN
(
x
))
{
return
0
;}
return
x
;
return
Math
.
min
(
x
,
1
)
;
}
function
fitSwapUsage
(
usage
)
{
var
x
=
(
usage
/
(
parseFloat
(
usage
)
+
parseFloat
(
dataSource
.
data
[
dataSource
.
swapFree
].
value
)))
if
(
isNaN
(
x
))
{
return
0
;}
return
x
;
return
Math
.
min
(
x
,
1
)
;
}
function
columnCount
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment