Details
-
Bug
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
Qt Creator 4.9.0
-
None
-
Mac OS 10.14.4 (18E226), Apple LLVM version 10.0.1 (clang-1001.0.46.4)
Description
Sometimes the paste operation (CTRL/⌘ + V) inserts not only plain text but also some special characters.
I noticed it today when I was copy/pasting some text (the word responseText) from a page in web-browser to Qt Creator editor (QML file). After pasting the text I got this error:
Expected token `)'
When I re-entered the same text manually, this error disappeared. So I compared the strings in HEX:
72 65 73 70 6f 6e 73 65 e2 80 8b 54 65 78 74 72 65 73 70 6f 6e 73 65 54 65 78 74
So the difference is the e2 80 8b sequence, which apparently is what causes the error.
So what I am reporting here is the fact the paste operation in Qt Creator inserts special (invisible) characters and that causes troubles. My expectation was that as a source code editor Qt Creator should operate only with plain text, stripping it from special formatting symbols.
For example, here's how these two strings look like in nano editor after being pasted:
Which, I believe, is the correct way of handling the paste operation in a source code editor.