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
Reviewed-By: con
Reviewed-By: Friedemann Kleint
We now support renaming files. The version control system tries first to
rename, if that doesn't support or can't rename the file we do a normal
rename. (Note: git, hg, perforce > 2009.02 support renaming, cvs not.
(perforce untested)). We correctly notify all editors of the renamed
file and tell the project manager to rename the file in the project.
Note: Only the qt4projectmanager knows how to rename files.
Note: renaming folders, moving files to different folders, renaming
.pro/.pri files is not supported. Those things can be later added after
this has proven to work correctly in the simple case.
Also we don't do any actions based on the renaming like renaming
classes, changing include guards or #include lines.
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>