D22199: New plugin to open the selected file path
Dominik Haumann
noreply at phabricator.kde.org
Tue Jul 2 11:59:06 BST 2019
dhaumann added inline comments.
INLINE COMMENTS
> plugin_kateopenselection.cpp:91
> + KTextEditor::View* editView = application->activeMainWindow()->activeView();
> + if (editView && editView->document()) {
> + QString selection;
A view always has a valid document, no need to check editView->document()
> plugin_kateopenselection.cpp:107
> + const KTextEditor::Cursor &cursor = editView->cursorPosition();
> + const QString &line = editView->document()->line(cursor.line());
> + const int lineLength = line.size();
QString is implicitly shared. Please remove the '&' here.
> plugin_kateopenselection.cpp:112
> + const int col = cursor.column();
> + int start=col, end=col;
> + // Stop at first white space or quote (for path with space, user should select the text)
In general: Please use spaces around operators and adhere to the standard KDE coding guidelines (also used in Kate everywhere else).
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/20190702/5e15e42f/attachment.html>
More information about the KWrite-Devel
mailing list