... by additionally keeping local (currently non-owning) pools per
"interesting" type.
Current situation:
- The global object pool does not scale well for looking up
objects, as iteration plus qobject_cast typically iterates
over all pooled objects.
- User code that can use typed results from the object
pool need to have access to the full type definition anyway,
i.e. depend on the plugin of the target class anyway.
The patch here solves the scaling problem is to have local
type-specific pools to which objects register in their
constructors and deregister in their destructors.
This patch here does *not* change the ownership model of the
pooled objects, however, it opens the possibility to change
the ownership model per type (e.g. by not putting things into
the global pool at all anymore and make the local pool 'owning')
and the intent is to handle that in later patchs.
Even without the follow-up patches this here is a performance
improvement for the cases that access the local pools instead
the global one, i.e. "practically all".
Change-Id: Ib11a42df2c4ecf5e1155534730083a520dd1995b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Allow users without physical MenuKey to open the context menu
Change-Id: Id886a5614e26d614cba6ceb3b08a9df6148e9655
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
The registry is an implementation detail and doesn't need to be exported
so move it to the textmark.cpp file.
Change-Id: Ic103b122cb20063fa4bc220bdc90cecff27054aa
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Both wrap the corresponding Qt class, but make sure all temporary files
or directories are created inside a "master temporary directory".
Change-Id: I55461be507c828c965224c02863ea5ed9bbf9498
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Creator can start to shutdown before initialize is called. This should
be safe here right now, but let's not take chances in case somebody
refactors this later.
Change-Id: I961c215b8dffc92cf90d9f83e91b0b3034772077
Reviewed-by: David Schulz <david.schulz@qt.io>
No longer uses artificial mime types for highlighting files that do not
specify a mime type. No longer registers mime types that are specified
but that Qt Creator does not know about.
Instead, try to match the mime type, and if that fails, or if the result
does not match the file name pattern, try to match file name patterns
instead.
This also fixes the potential problem that mime types were always only
added, never removed, even if the user removed definitions and triggered
a reparse.
Also fixes that a highlight definition in the fallback location could
overwrite a highlight definition in the preferred location, if it has a
higher priority setting.
Task-number: QTCREATORBUG-13912
Change-Id: I86ce10f4f4341f6add0d2b58a04f080501d0cbf4
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Allow multiple expanders to be registered for lineedits, e.g. a
local and the global ones, and actually show them.
Use a tree view in the chooser for somewhat more structured display.
Change-Id: I769f92144e5249f45e54381de52aa6973eb20118
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This allows a MacroExpander also to describe an expansion it can
do which was restricted to the global VariableManager only.
The global is now just a thin (unneeded) wrapper about new "standard"
functionality.
Change-Id: Ida7ca70cf3d319eae4220ea8d12f3dd1c0d4042c
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
In preparation for the final s/BaseTextEditor/TextEditor.
Change-Id: Ie18db9817ec9eec53d805443605ca55423c64c93
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Replace it with a json wizard based implementation.
Todo: This removes the keyboard shortcut available to trigger
this wizard. We should make sure all wizards are available
for binding keyboard shortcuts to them instead.
Change-Id: I1aa76222d08371e79c40b52aeb26705f3ccb4899
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
The issue only appeared in the test due to the different
editor construction there. Now use the same factory access.
Change-Id: I3a8534fbe683bb88f04ad68850cecdfe32b11433
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Remove usage of the Q_EXPORT_PLUGIN macros, which do not exist in Qt 5.
Change-Id: I678c3cf10b9c5d5c1b9f252b0ecd1c97dc810a47
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Same patter. Plain is fully merged now, so remove the files, too.
Change-Id: Id8c0ba5689ad9980a0db3580cb9833344fd911f3
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Turns out we don't even need two-phase initialization,
by transparently postponing registration until we get
a non-empty file name, either at constuction, or at
file name change times.
Change-Id: I3e87e47c820066e6707e946fc474ab9c1993e61f
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
"Refactoring action" is the term used in Qt Creator Manual.
Change-Id: I10dd3ecb615f24a9b5fa5d9ae8aa160969146e72
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Instead of broadcasting for each resolution we ask the code
that knows about a specific variable directly.
Change-Id: I2f0f4f2acceba85a236995d236980594a3166bd8
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Start at splitting up the wizard functionality a bit. Currently
it is a factory but also contains a lot of logic that is invoked by
the real wizard dialogs.
This change renames/moves a couple of things only.
Change-Id: I1fa114ee3ee262f7c0690841f361bbf09e674725
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Registering QShortcuts doesn't solve any problem that is not already
solved by registering QActions, and shortcuts are in fact much more
limited (not being able to register multiple shortcuts for different
contexts).
Change-Id: I9478e601b2cbc3c5e12fb5baee43cacc20d0fb9c
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
The action handler already knows which editors to handle through the
context. It only needs to receive signals for updating the actions from
the current editor. So there is no need to tell the action handler about
every individual editor. This also removes some noise from the text
editor implementations.
Change-Id: I76dc5b1559cc8cf54ff313e6cdba4e789a3108aa
Reviewed-by: David Schulz <david.schulz@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>
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>