D19795: Add Variable interface to KTextEditor::Editor
Dominik Haumann
noreply at phabricator.kde.org
Sun Mar 17 10:14:11 GMT 2019
dhaumann added a comment.
Unfortunately, I still see one issue: In the unit test, expanding the variable to "World" works, but expanding it to "Smart World" leads to single-quoted text "'Smart World'" because of the space. That of course makes sense, but is not always what you want.
Therefore, I suggest we expand the API as follows:
bool expandVariable(const QString& variable, KTextEditor::View* view, QString& output, KTextEditor::ExpansionMode mode = QuoteWhenNeeded) const;
bool expandText(const QString& text, KTextEditor::View* view, QString& output, KTextEditor::ExpansionMode mode = QuoteWhenNeeded) const;
with
enum class KTextEditor::ExpansionMode { Never, QuoteWhenNeeded }
Any comments?
REPOSITORY
R39 KTextEditor
REVISION DETAIL
https://phabricator.kde.org/D19795
To: dhaumann, cullmann
Cc: kwrite-devel, kde-frameworks-devel, gennad, domson, michaelh, ngraham, bruns, demsking, cullmann, sars, dhaumann
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwrite-devel/attachments/20190317/d1115fee/attachment-0001.html>
More information about the KWrite-Devel
mailing list