Move exported class out of namespace Internal, but expose only a minimal
interface. Use Qt 5 connections, adjust callers and surrounding code.
Change-Id: I52b4156d78cd1ec42ec6c94994775ce74f24ebdc
Reviewed-by: hjk <hjk121@nokiamail.com>
This eliminates a bunch of list->set->list conversions. Especially the
ProjectInfo::appendProjectPart takes lots of time converting for every
part added.
Change-Id: Ib3c8cd4b0ad6c012ccbeed12ebedd46b9b6cca95
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Less typing and less cycles than join(QString) where appropriate
Change-Id: I6ebc0e17e4d7fd9845864dd95b7de4ba4dad6906
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
It was closing all existing editors and opening a single new one in the
"current" split.
Instead, open new editors in all splits where the file was open and
visible.
Change-Id: Iac7238077b2e42937ce54eea65fa1b61dcd07df1
Reviewed-by: David Schulz <david.schulz@digia.com>
Currently we pass in some places by value, elsewhere by const ref and
for some weird reason also by const value in a lot of places. The latter
is particularly annoying, as it is also used in interfaces and therefore
forces all implementors to do the same, since leaving the "const" off is
causing compiler warnings with MSVC.
Change-Id: I65b87dc3cce0986b8a55ff6119cb752361027803
Reviewed-by: hjk <hjk121@nokiamail.com>
We have fileNameCaseSensitivity and withExecutableSuffix et al.
Change-Id: I79bd2cd57e258c3f15673a661a49bab597d7afa4
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This broke when introducing delayed setting of the currentEditor when
the context changes. Simply move the logic from the document manager to
the editor manager, where it arguably belongs to anyway, and also set
the currentFile delayed in that case.
Task-number: QTCREATORBUG-12264
Change-Id: I67ee3f9a02e62cfa67671629c956a4290361cba8
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: David Schulz <david.schulz@digia.com>
Move item model implementation to private, adjust user code.
Change-Id: Ifbe94e7c7b9b1e8be1b4c531958dbd7a9413af13
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Introduce methods to save a document/list of documents/all documents,
both silently and with a dialog to the DocumentManager.
All of these return a bool that signifies whether the save was
successful or not.
Detailed information on which files failed to load or whether the
save was canceled by the user are still available as optional
in/out parameters.
Change-Id: Id17798302f2a8ba6b85a07c1f0b91f03b20da03f
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Only methods as programming functions are affected. Besides renaming
some actions like "Switch Between Function Declaration/Definition" this
mostly touches (api) code comments.
This is a follow-up patch to commit 872bfb7.
Change-Id: Icb65e8d73b59a022f8885b14df497169543a3b92
Reviewed-by: hjk <hjk121@nokiamail.com>
Remove \brief commands for functions.
Use standard wording for QDoc commands.
Fix style and grammar issues.
Use the \a command instead of the \c command for attributes
in function descriptions.
Do not use \returns, because it does not exist.
Change-Id: Icd32b519670cb376e246bab3a58fe7e98d2529ea
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Also adjust and streamline using and surrounding code.
Change-Id: I6a8b05126bdcbb74ff611b21c7cb3c5902a2d5ca
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
A lot of our build system files specify unneeded include
paths. These roughly fall into the following categories:
a) Paths that are already set in more general files
such as qtcreator.pri.
b) Paths that serve no purpose at all, possibly
left over from earlier versions of the project.
c) Paths that act as workarounds for wrong include
statements of the form '#include "xyz.h"', where
xyz.h is not in the same directory as the including
file.
This patch removes such path specifications and fixes the offending
include statements from case c).
Tested on Linux, Windows and OSX with qmake and qbs.
Change-Id: I039a8449f8a65df0d616b4c08081145c18ae4b15
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
And move to using the corresponding method in document model.
Change-Id: I80b12ceab8a91c5393b9c0422d660a8896ae09d8
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
It's a property of the document implementation, not of the specific
editor instance working on it.
Change-Id: I5c3dd054e21b646e2d94b891916a096d045923f8
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Eike Ziller <eike.ziller@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>
The notification was only done when the main window was activated which
leads to funny results with external editor windows.
Change-Id: I657ef7e429256f9c098b1fc744d40ffbc2bb5260
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
QDoc does some magic with the \class and \namespaces
and \brief commands, so the following wording must be used:
"The xxx class yyy ..."
Change-Id: Id231f30e8464898b776888d5423523de404aae34
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This change
* Removes IMode::type, ModeManager::activateModeType, and
IEditor::preferredModeType, and adds IEditor::isDesignModePreferred
instead
* Adapts the mode switching code in EditorManager to handle multiple
windows, for example switching to edit mode should only happen if
the editor/view is in the main window. Otherwise the editor window
should be raised and focused
* Renames EditorManager::NoActivate --> DoNotChangeCurrentEditor
* Reverts the EditorManager::ModeSwitch logic to switch mode or
make the current editor visible by default, introducing
DoNotMakeVisible flag instead
* Fixes a few instances where EditorManager::ModeSwitch should have been
used
One non-trivial problem left: If you open a .ui file and switch to an
external editor window, edit mode is activated, because the current
editor no longer is a .ui file, which means that the design mode gets
deactivated.
Change-Id: I76c5c2391eb4090143b778fb103acff3a5a1ff41
Reviewed-by: David Schulz <david.schulz@digia.com>
The extra editor windows need to have editor manager context, otherwise
shortcuts (like ctrl+tab) do not work in them if e.g. projects mode is
active. Doing this via add/removeAdditionalContexts would be non-trivial
and error prone, so adding a context to the extra window is more
convenient. Since editors themselves already define a context, we need
to allow nesting of contexts.
Change-Id: I244eca53ebd665fd4d8fe7531e8ff701ed0b40b2
Reviewed-by: David Schulz <david.schulz@digia.com>
(cherry picked from commit deff0eb3c7)
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
The Hijack button (makeWriteableButton) should only
be shown for snapshot views.
Change-Id: I809981885d18b6057d82f73b5104b0f1041cd255
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>