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
Network
KIO Extras
Commits
d5f2beb2
Commit
d5f2beb2
authored
Sep 11, 2020
by
Jonathan Marten
Browse files
man ioslave: Call error() instead of finished() for an error condition
parent
d7bff8a4
Changes
1
Hide whitespace changes
Inline
Side-by-side
man/kio_man.cpp
View file @
d5f2beb2
...
...
@@ -487,12 +487,10 @@ void MANProtocol::get(const QUrl &url)
"If the name is correct, then you may need to extend the search path "
"for man pages, either using the <envar>MANPATH</envar> environment "
"variable or a configuration file in the <filename>/etc</filename> "
"directory."
,
title
.
toHtmlEscaped
()));
"directory."
,
title
.
toHtmlEscaped
()));
// TODO: call error(KIO::SLAVE_DEFINED, QString()) in outputError()
// and not finished() here
finished
();
return
;
error
(
KIO
::
ERR_SLAVE_DEFINED
,
QString
());
return
;
}
// Sort the list of pages now, for display if required and for
...
...
@@ -529,7 +527,7 @@ void MANProtocol::get(const QUrl &url)
{
outputError
(
xi18nc
(
"@info"
,
"The man page <filename>%1</filename> was found, "
"but it could not be read or parsed."
,
title
));
finished
(
);
error
(
KIO
::
ERR_SLAVE_DEFINED
,
QString
()
);
return
;
}
// will call output_real
...
...
@@ -605,7 +603,7 @@ char *MANProtocol::readManPage(const char *_filename)
"could not be found."
,
QFile
::
decodeName
(
filename
),
QDir
::
cleanPath
(
lastdir
+
'/'
+
nameFilter
)));
return
0
;
return
nullptr
;
}
filename
=
lastdir
+
'/'
+
QFile
::
encodeName
(
entries
.
first
());
...
...
@@ -721,7 +719,6 @@ void MANProtocol::stat( const QUrl& url)
#endif
statEntry
(
entry
);
finished
();
}
...
...
@@ -1431,6 +1428,6 @@ void MANProtocol::getProgramPath()
outputError
(
xi18nc
(
"@info"
,
"Could not find the <command>sgml2roff</command> program on your system. "
"Please install it if necessary, and ensure that it can be found using "
"the environment variable <envar>PATH</envar>."
));
finished
(
);
error
(
KIO
::
ERR_SLAVE_DEFINED
,
QString
()
);
exit
();
}
Jonathan Marten
@marten
mentioned in commit
5ee42d9a
·
Aug 25, 2021
mentioned in commit
5ee42d9a
mentioned in commit 5ee42d9a827eb4b953483bff302b62508c7205bf
Toggle commit list
Write
Preview
Supports
Markdown
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