Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Plasma
libksysguard
Commits
02d2c026
Commit
02d2c026
authored
Nov 17, 2017
by
Aleix Pol Gonzalez
🐧
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Only initialize variable if we are going to use it
parent
17b23428
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
processui/ProcessModel.cpp
processui/ProcessModel.cpp
+1
-2
No files found.
processui/ProcessModel.cpp
View file @
02d2c026
...
...
@@ -1204,8 +1204,6 @@ QVariant ProcessModel::data(const QModelIndex &index, int role) const
//This function must be super duper ultra fast because it's called thousands of times every few second :(
//I think it should be optomised for role first, hence the switch statement (fastest possible case)
KFormat
format
;
if
(
!
index
.
isValid
())
{
return
QVariant
();
}
...
...
@@ -1213,6 +1211,7 @@ QVariant ProcessModel::data(const QModelIndex &index, int role) const
return
QVariant
();
}
KFormat
format
;
switch
(
role
){
case
Qt
::
DisplayRole
:
{
KSysGuard
::
Process
*
process
=
reinterpret_cast
<
KSysGuard
::
Process
*
>
(
index
.
internalPointer
());
...
...
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