D22199: New plugin to open the selected file path

Pino Toscano noreply at phabricator.kde.org
Sat Jul 6 04:31:02 BST 2019


pino added inline comments.

INLINE COMMENTS

> plugin_kateopenselection.cpp:58
> +    QAction *a = actionCollection()->addAction(QStringLiteral("file_openselection"));
> +    a->setText(i18n("Open selected path"));
> +    actionCollection()->setDefaultShortcut(a, QKeySequence(Qt::ALT + Qt::Key_O));

This should be "Open Selected Paths"; see https://hig.kde.org/style/writing/capitalization.html

> nononux wrote in plugin_kateopenselection.cpp:134
> I think the test should be kept : if a multi-line text is selected, it can contain a newline (not removed by the trimmed function).

This is more general thing to take into account, as I mentioned in another comment: what if the selection contains more than two paths? A space or a newline between them does not make much difference.

> nononux wrote in plugin_kateopenselection.cpp:135
> The name of the function 'fromLocalFile' is a bit ambiguous. The QUrl doc (https://doc.qt.io/qt-5/qurl.html#fromLocalFile) says this function work with remote files, with a path starting with //.

No, QUrl::fromLocalFile() always assumes it is a local file, using a local "file" protocol. The "remote files" mentioned there are simply Qt things, not a general stuff -- it will not handle `http://www.kde.org/file.txt` at all.

REPOSITORY
  R40 Kate

REVISION DETAIL
  https://phabricator.kde.org/D22199

To: nononux
Cc: dhaumann, pino, yurchor, kwrite-devel, kde-doc-english, gennad, fbampaloukas, domson, michaelh, ngraham, demsking, skadinna, cullmann, sars
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwrite-devel/attachments/20190706/6cfbe8ed/attachment-0001.html>


More information about the KWrite-Devel mailing list