D29385: Introduce KIO::OpenUrlJob, a rewrite and replacement for KRun
Kai Uwe Broulik
noreply at phabricator.kde.org
Sun May 3 19:33:15 BST 2020
broulik added a comment.
Cool!
INLINE COMMENTS
> openurljob.cpp:261
> +
> +void KIO::OpenUrlJobPrivate::determineLocalMimeType()
> +{
I know what you always say when I say what I always say, but why not just always stat/mimetype job?
> openurljob.cpp:274
> + QMimeDatabase db;
> + QMimeType mime = db.mimeTypeForUrl(m_url);
> + //qDebug() << "MIME TYPE is " << mime.name();
I know what you always say when I say what I always say but can we use a mimetype job here? :)
> openurljob.cpp:305
> + q->emitResult();
> + } else {
> + if (m_followRedirections) { // Update our URL in case of a redirection
Using an early return here would make the code less nested
> openurljob.cpp:447
> + // X-KDE-LastOpenedWith holds the service desktop entry name that
> + // was should be preferred for opening this URL if possible.
> + // This is used by the Recent Documents menu for instance.
was or should be?
> openurljob.cpp:506
> + q->setError(KJob::UserDefinedError);
> + q->setErrorText(i18n("<qt>The file <b>%1</b> is an executable program. "
> + "For safety it will not be started.</qt>", m_url.toDisplayString().toHtmlEscaped()));
While at it, can we clean up/unify those texts? Sometimes it puts the file on a new line, sometimes it's bold, sometines in quotes, etc. Generally I wouldn't really want any HTML formatting in there.
REPOSITORY
R241 KIO
REVISION DETAIL
https://phabricator.kde.org/D29385
To: dfaure, ahmadsamir, broulik, meven, kossebau, davidedmundson, nicolasfella, svuorela
Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200503/19479278/attachment-0001.html>
More information about the Kde-frameworks-devel
mailing list