Not just for selected documents. This also removes the need for
the separate setupAsPlainTextDocument function.
Change-Id: I51a04eebbad37a7598068ce6e157a53c1519464f
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
The method is for setting the contents, so it belongs to the document,
and should be named correspondingly.
Change-Id: I40363dc08f11268f530885b512e4a88e8b10d096
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Instead of keeping a separate plain text editor and document,
the FormWindowEditor and FormWindowFile are directly derived
from PlainTextEditor and BaseTextDocument respectively.
Change-Id: I4319904dea769ec31900061bc7c3a3c5c22e0e8a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
The display name is not editor instance specific, but belongs to the
document.
Change-Id: I3c936f04a86e10e6ca30063d85036d85b4b5880e
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
That is what it actually is, wrt how Qt API calls it.
Change-Id: Ied02055debf6aad75556b0d9d22e8ba2f72be555
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Instead of requiring subclasses to implement a method.
Also renames IDocument::rename to IDocument::setFileName,
since it doesn't really rename any files or such.
Change-Id: I1344025c24d2f74a6a983e04fb0a5245f1f37aad
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Ran script to remove inludes on a trial-and-error basis and
manually corrected it.
Change-Id: Ia97b5bd9e4496cd824f35c5fda8ccf0db9af471c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Also removed all <QMainWindow> includes which are not needed
anymore.
Change-Id: I393c9a62a5c6df95d9f35d872e1473a4f13bcdc4
Reviewed-by: hjk <qthjk@ovi.com>
And adapt the other API respectively.
Change-Id: I1e04e555409be09242db6890f9e013396f83aeed
Reviewed-by: Bill King <bill.king@nokia.com>
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
Getting the #include directives ready for Qt5. This includes the
new-project wizards.
Change-Id: Ia9261f1e8faec06b9285b694d2b7e9a095978d2b
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
It is supposed to refer to the property of the file on disk (if there is
any).
Task-number: QTCREATORBUG-4998
Change-Id: Iaed62c17d124b364aecec4d1f910046bade42d40
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
Use it in BaseTextEditor and Designer to preserve CRLF
of the files.
Task-number: QTCREATORBUG-5901
Change-Id: I7599ce78649a3b09f2e5118d02f8cbf3db27ed31
Reviewed-on: http://codereview.qt.nokia.com/3591
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
there only two classes of files anyway: regularly editable ones which may
ask for interaction, and "background" files which always operate silently.
the regular case is the more complex one, so put that into the base class.
Currently creator assumes that "save" is synchronous
and doesn't enter internal event loop.
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Task-number: QTCREATORBUG-3678
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.
Re-introduce FormWindowEditor as IEditor used for
Designer. Use SharedTools::WidgetHost directly
for embedding into FormEditorStack, doing the
geometry-changed handling in there as well.
Re-introduce FormEditorFile that delegates dirty handling to the form
window. Change DesignerXmlEditable to be an IEditor that embeds
TextEditable so that the PlainTextEditor can work with it, but delegates
relevant functionality to FormEditorFile.
Centralize all form window creation code that was scattered around
in FormEditorW::createEditor() and have that return a struct Editor
data, which is passed to FormEditorStack.
Update the text editor only on open/createNew/switch away from design
mode.
- Remove shared subwindow reparenting from EditorWidget, make EditorWidget
inherit FancyMainWindow. and use just once instance of it instead of
per-editor ones.
- Embedded FormEditorStack into EditorWidget as a centralwidget.
- Changed FormWindowEditor's base class from IEditor to SharedTools::FormWindowHost
(Widget) to be embedded into FormEditorStack (no need to be an IEditor),
Remove Designer::Internal::FormWindowHost which had little functionality.
- Add Design Mode widget to FormEditorW which has FakeToolBar and EditorWidget
(single instance) in a vertical layout.
- Removed ProxyAction class handling dock view toggle actions of several EditorWidgets
(no longer necessary since there is just once instance). Moved "View menu" to bottom.
- Started to make FakeToolBar work as a single instance listening on changing
xml editors
- Include-file/slot connection clean-up.