Replace the current license disclaimer in files by
a SPDX-License-Identifier.
Task-number: QTBUG-67283
Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
The recently added "Select All" button needs to be included in the
width calculation.
If the find buttons switch to icon mode, "Select All" gets hidden.
Also, if the replace buttons are visible, they define whether all
buttons are shwon in full text or get hidden. No icon mode at all in
that case.
Change-Id: Ie85a68c7f7c3f1a6ca51ed3f91d64124eeb7aa1a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
- the shortcut Alt+Return conflicts with "Trigger Refactoring Action"
- display the shortcut in find toolbar button's tooltip
- no need to repeat the default shortcut (it's the same Command)
Change-Id: Ifd1e56ba091806901241bdca66c42a332574bc0c
Reviewed-by: David Schulz <david.schulz@qt.io>
readability-make-member-function-const finds lots of member functions
that could be made const. This change just picks getter functions that
really should be const.
readability-convert-member-functions-to-static finds non-static member
functions which do not access this. This change turns most of them
into static ones, but leaves some non static to keep the class API
consistent.
Change-Id: I004d6f7fab4375f9902f940f29b4a4f561fc7604
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Try to not save settings that weren't changed from their default, and
make it possible for defaults to change in the future.
Task-number: QTCREATORBUG-24762
Change-Id: If469b72573791bc92ed535edf00271ef09b55386
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
If the current document closes, all items of the find toolbar (except
"Advanced...") are supposed to be disabled. The previous and next
buttons however remained enabled, which is now fixed with this change.
Change-Id: I33f978f23970280f04fb4f6237b733d5109043c1
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Mainly to get rid of the QProcess::finished deprecation warning.
Also adjust coding style in the surrounding connects when needed.
Change-Id: I12f9b248c7974b892c4a069356e578e80f8c59e9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Better UX for the findNext, findPrevious and replace actions in the find
coreplugin.
Actions are now (en | dis) abled dynamically.
Fixes issue with icons vs text for the find previous/next buttons.
Adjusted CurrentDocumentFind to remove soft assert warnings.
Fixes: QTCREATORBUG-21769
Change-Id: Ia0005016311299d49c3f65d2a8fe0aa99d4aaa66
Reviewed-by: Chris Rizzitello <rizzitello@kde.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Those definitely have the needed contrast against the background color.
Change-Id: If084e4084ac0dccd53def876e2ad75c561126e46
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
The missing headers were included indirectly
through the QHeaderView, QButtonGroup or QAction
inside the generated ui files.
Now, the generated ui files won't include QHeaderView,
QButtonGroup nor QAction, so we need to include the
missing headers explicitly.
Change-Id: Ife6c4e2c39b2b2b7d8365cc5ae2dbb6de4b3ac66
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Replace the QStringListModel used by the completer
by a special model storing a struct of the text and find flags.
On activating the completer, the flags are applied.
Change-Id: I05031641647692196ce60dcad36fc8970131f516
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
... 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>