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
Utilities
Konsole
Commits
b92d563c
Commit
b92d563c
authored
Apr 22, 2017
by
Kurt Hindenburg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Since we ignore return value of readProcessInfo(), change to void
parent
e45db267
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
11 deletions
+8
-11
src/ProcessInfo.cpp
src/ProcessInfo.cpp
+5
-8
src/ProcessInfo.h
src/ProcessInfo.h
+3
-3
No files found.
src/ProcessInfo.cpp
View file @
b92d563c
...
...
@@ -329,9 +329,8 @@ NullProcessInfo::NullProcessInfo(int aPid, const QString& /*titleFormat*/)
{
}
bool
NullProcessInfo
::
readProcessInfo
(
int
/*pid*/
)
void
NullProcessInfo
::
readProcessInfo
(
int
/*pid*/
)
{
return
false
;
}
bool
NullProcessInfo
::
readCurrentDir
(
int
/*pid*/
)
...
...
@@ -350,18 +349,16 @@ UnixProcessInfo::UnixProcessInfo(int aPid, const QString& titleFormat)
setUserNameRequired
(
titleFormat
.
contains
(
QLatin1String
(
"%u"
)));
}
bool
UnixProcessInfo
::
readProcessInfo
(
int
aPid
)
void
UnixProcessInfo
::
readProcessInfo
(
int
aPid
)
{
// prevent _arguments from growing longer and longer each time this
// method is called.
clearArguments
();
bool
ok
=
readProcInfo
(
aPid
);
if
(
ok
)
{
ok
|=
readArguments
(
aPid
);
ok
|=
readCurrentDir
(
aPid
);
if
(
readProcInfo
(
aPid
))
{
readArguments
(
aPid
);
readCurrentDir
(
aPid
);
}
return
ok
;
}
void
UnixProcessInfo
::
readUserName
()
...
...
src/ProcessInfo.h
View file @
b92d563c
...
...
@@ -218,7 +218,7 @@ protected:
*
* @param pid The process id of the process to read
*/
virtual
bool
readProcessInfo
(
int
pid
)
=
0
;
virtual
void
readProcessInfo
(
int
pid
)
=
0
;
/**
* Determine the current directory of the process.
...
...
@@ -306,7 +306,7 @@ public:
*/
explicit
NullProcessInfo
(
int
pid
,
const
QString
&
titleFormat
);
protected:
bool
readProcessInfo
(
int
pid
)
Q_DECL_OVERRIDE
;
void
readProcessInfo
(
int
pid
)
Q_DECL_OVERRIDE
;
bool
readCurrentDir
(
int
pid
)
Q_DECL_OVERRIDE
;
void
readUserName
(
void
)
Q_DECL_OVERRIDE
;
};
...
...
@@ -330,7 +330,7 @@ protected:
* Implementation of ProcessInfo::readProcessInfo(); calls the
* four private methods below in turn.
*/
bool
readProcessInfo
(
int
pid
)
Q_DECL_OVERRIDE
;
void
readProcessInfo
(
int
pid
)
Q_DECL_OVERRIDE
;
void
readUserName
(
void
)
Q_DECL_OVERRIDE
;
...
...
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