While reloading a text document, the bookmarks got lost since their
associated QTextBlocks were deleted.
This patch makes sure that before reloading, the bookmarks are removed
non-persistently in the same way as when closing a document, and that
they are restored after the document was reloaded.
Currently, no effort is made to update the location of the bookmarks
based on the way the file changed.
Task-number: QTCREATORBUG-1281
Reviewed-by: dt
The Parentheses, TextBlockUserData and TextEditDocumentLayout classes
and their member function implementations were spread around the
BaseTextEditor class. Moving them to their own file to make the code a
bit better organized.
Reviewed-by: mae
Previously, it could contain multiple directory separators, . or ..
This makes using the filename safe for hashes like the ones used in the
C++ and Qml code models.
Reviewed-by: Roberto Raggi
Reviewed-by: mae
actual whitespace when the indentation column changes.
Complete whitespace cleanup can still be done either automatically
on save (when configured) or when explicitely called with the
"Clean Whitespace" action from Edit/Advanced.
on QFileInfo to tell us that a file is not writable, but accept
that the attempt to save a file might actually fail (:-) ). This
solves the NT network domain issue without the insane slowness.
The stuff needs more work. We do not have any UI for failing save
operations when closing creator (other than it doesn't close). Bad.
It is desirable to have removal of trailing whitespace as a separate
option to "tab cleanup". Clean Whitespace option without Clean
Indentation option will now only remove trailing whitespace on file save
and on Clean Whitespace requests. Clean Indentation option is set to
true by default to maintain backward compatibility.
Signed-off-by: Adam Majer <adamm@zombino.com>