... 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>
A QIcon contains variants for different resolutions. This change
makes sure that in a Multi-screen/mixed-scaling-mode scenario,
the right of those resolutions is chosen, depending on which screen
the line edit currently is.
Task-number: QTCREATORBUG-18869
Change-Id: I8775e9e2c9b15c2863e9415751e1306f9e43c9aa
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Q*Application classes have unusually many static functions. In many
cases in our code, these functions are unnecessarily called as instance
functions, using the qApp helper.
This patch replaces many occurencies of qApp with the according
Q*Application classname.
Change-Id: I6099a419fa7bf969891269c37ed7a9e817ef5124
Reviewed-by: hjk <hjk@qt.io>
This way we can use them from libraries, not only from plugins.
Change-Id: Ic35cfd5f04d638d87606bf272b2c00ded1267c1b
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
They are needed in the timeline view.
The change in qtcreator-project.qdocconf makes sure
that qdoc still finds the referenced icons.
Change-Id: I812fba8e57d06d93efc00c295467c83c08cd1784
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
Also, rename it to Core::Find. It hasn't been a plugin for a while.
Change-Id: I845885ccf18bdc1440258d523b033758d5583881
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Use the same image file and recolor it as needed,
Change-Id: I914819a53ca05d83ca5b88adf44706b460b48ac0
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
Instead of describing icons via file name or in the themed icons case
via
a string that is a list of mask/color pairs, we have now a class for it.
Icons are now listed in per-plugin *icons.h headers.
RunControl::m_icon was The only place left where an icon property was in
fact a string. This patch changes that member to be a Utils::Icon.
Change-Id: Ibcfa8bb25e6d2e330c567ee7ccc0b97ead603177
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
... and default to C_GLOBAL. A rather common case.
Similar for ActionContainer::addSeparator().
Change-Id: I7f9ba573af201c0a472132d5a494ad17cc4175b7
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Right now, the only way for a user to find out whether a search term was
found is to scan the editor window for marked strings, which is a drag
in the negative case. Also, an ongoing search is practically
indistinguishable from a failed one.
Therefore, color the search term red if the search has failed.
Change-Id: I57441c3804043e1dcfb33638844b4550abd5ac46
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
1. open a text editor
2. open find
3. close editor
4. move focus between e.g. project tree and empty editor area
It was trying to highlight all occurrences in the empty editor area.
Change-Id: I59e344f977970290c7fd816951c1bdc150dae783
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
They were always triggered on the find support that had the find tool bar,
even if the focus moved to a different one and even if the find tool bar was
not visible.
Task-number: QTCREATORBUG-11587
Change-Id: Ica7ef6275dc8a7e0e8b974c2796651c9ca7809a6
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Introduce flags for what to do instead of doing much of the
logic itself in that method.
Change-Id: I3ee38e39549e1267c55c94c3a93211492eb2e2f3
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
The labels need to be polished so that they get the right palette,
and the icon needs to be switched from light to dark.
Change-Id: I3e37947e741c3d92f3c1ac3bb02e631aa7803f59
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Letting that helper function return a file name is more flexible than
returning a QPixmap.
Change-Id: I4634e4e795eec029608c8e65c1a0e8afff870a91
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
magnifier@2x.png was already part of the core plugin, but never used
since the @2x logic is in QIcon and for the magnifier.png we use QPixmap
for loading.
This patch uses Utils::StyleHelper::dpiSpecificPixmap() to load the
image in the findtoolbar and locatorwidget. It also removes the image
centering code in FindToolBar::updateIcons() (most likely a by now
obsolete workaround) since the image gets properly centered in the
Utils::FancyLineEdit.
Change-Id: I5cd6d22fc5cce3838db6164568cb9165da052c49
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
The highlight was removed when switching editors (also from the original
editor).
Change-Id: Ie2d6760dec52940097f3daafe6e36b57069c1443
Task-number: QTCREATORBUG-9949
Reviewed-by: David Schulz <david.schulz@digia.com>
Hide the labels and buttons if it gets too small.
Change-Id: Id6a3d695909e13be7160890ed04117c25929c7f7
Reviewed-by: Daniel Teske <daniel.teske@digia.com>