D22199: New plugin to open the selected file path
noreply at phabricator.kde.org
Sat Jul 6 04:31:02 BST 2019
pino added inline comments.
> + 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.
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...
More information about the KWrite-Devel