Commit Graph

79 Commits

Author SHA1 Message Date
Lucie Gérard
a7956df3ca Use SPDX license identifiers
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>
2022-08-26 12:27:18 +00:00
Jarek Kobus
0dae822ca3 Drop Qt5: Core: Get rid of QOverload
Change-Id: Ibaebd83304680156e13a9ebc473075ad2a4bfed4
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-07-20 10:30:34 +00:00
Alessandro Portale
8c7eee4ff7 Core: Fix "reactiveness" of FindToolBar
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>
2022-02-08 11:29:33 +00:00
Eike Ziller
a4b3085acb Fix issues with "Select All" (search results)
- 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>
2022-02-02 08:54:21 +00:00
David Schulz
97a5a24a17 Core: add action to select all find results in an Editor
Change-Id: I71f480abde17cfdb6b64d7d12a33c9887792fc61
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-01-05 05:59:56 +00:00
Jarek Kobus
be1d33299e Use invokeMethod instead of single shot timer with 0 timeout
Refactor it in coreplugin.

Change-Id: I6aaad1b9270a8ff8a4a0bea6a1fff806b2fe190b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-01-29 15:24:41 +00:00
Alessandro Portale
3e9385bf1b Core: Make member functions const/static
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>
2020-12-11 08:28:25 +00:00
Eike Ziller
a40e5b5382 Core: Save less settings
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>
2020-12-11 08:02:57 +00:00
Christian Stenger
a285f773e3 Core: Replace QRegExp by QRegularExpression
Task-number: QTCREATORBUG-24098
Change-Id: I7a492d262dba80a5249076678b4e0b237f7cf154
Reviewed-by: hjk <hjk@qt.io>
2020-06-19 10:49:39 +00:00
Alessandro Portale
0675ece793 Core: Set FindToolBar's prev/next buttons disabled on document close
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>
2020-01-24 10:22:20 +00:00
Alessandro Portale
3dc511f1d1 Utils: Use Theme default "ok" and "error" colors for FancyLineEdit
...and remove the redundant setter calls elsewhere.

Change-Id: Iec71fe1bff7f8c9dd72bf3c3e643a4ed01e4dc80
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-12-18 15:27:07 +00:00
Alessandro Ambrosano
07645527a3 Add output filtering for Application Output pane
Task-number: QTCREATORBUG-16356
Change-Id: Ibf6cca1915ef56c50c01cd3c23e7798453506a05
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2019-04-08 07:56:36 +00:00
hjk
6f37348b4c Replace static_casts by QOverload where possible
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>
2019-02-26 15:18:14 +00:00
Chris Rizzitello
5cf2889856 Improve UX for the the find and replace actions
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>
2019-01-30 16:44:49 +00:00
Alessandro Portale
f36f04deba Core: Modernize
modernize-use-auto
modernize-use-nullptr
modernize-use-override
modernize-use-using
modernize-use-default-member-init (partially)

Change-Id: Idf10d7ffb1d98a04edc09a25c35e4e9e3abe87b5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-08-08 16:04:21 +00:00
Alessandro Portale
0291afddfb Core: Use our own PREV and NEXT icons for find toolbar in light mode
Those definitely have the needed contrast against the background color.

Change-Id: If084e4084ac0dccd53def876e2ad75c561126e46
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-02-14 15:09:42 +00:00
Eike Ziller
9d03865ce3 Merge remote-tracking branch 'origin/4.5' into 4.6
Change-Id: I88e4d82b9453274fa2575332aa465cb965e20808
2018-01-11 14:34:52 +01:00
Jarek Kobus
57e27915f4 Fix includes
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>
2018-01-11 10:24:25 +00:00
Friedemann Kleint
91530a3e0c Find: Remember the find flags per completer entry
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>
2018-01-03 12:24:30 +00:00
hjk
cc88302309 De-emphasize PluginManager::getObjects<Type>()
... 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>
2017-12-15 07:08:05 +00:00
Tobias Hunger
c330cf0679 Replace manual signal blocking/unblocking with QSignalBlocker
Change-Id: Ibb59fab4e37d045e506c5a8172b6f5cbb955b028
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-10-04 09:35:06 +00:00
Alessandro Portale
6b0b8c24b5 Utils: Let FancyLineEdit have QIcons instead of QPixmaps
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>
2017-09-19 09:03:12 +00:00
Alessandro Portale
3624a663d8 Reduce usage of qApp in favor of static function calls
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>
2017-04-24 18:36:28 +00:00
Ulf Hermann
15fbfaf2e9 Move icons to Utils
This way we can use them from libraries, not only from plugins.

Change-Id: Ic35cfd5f04d638d87606bf272b2c00ded1267c1b
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2016-08-05 10:52:53 +00:00
Alessandro Portale
a6683575c4 Icons: Move "next/prev", "[un]locked" and "zoom" from Core to Utils
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>
2016-05-31 08:51:12 +00:00
Eike Ziller
4a826ada04 Merge remote-tracking branch 'origin/4.0'
Conflicts:
	qtcreator.pri
	qtcreator.qbs

Change-Id: I0cbc9d335073e3234f472aa43f462eef9a9178aa
2016-04-22 15:13:58 +02:00
Alessandro Portale
5e32183c9b Theme: Separate run/stop/interrupt icons in menus
And for that, we also need separate theme color roles.

Change-Id: I27bf4499acb516f7f824f5e57632797653b150ec
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-04-21 15:57:56 +00:00
Eike Ziller
f1e14468c6 Merge remote-tracking branch 'origin/4.0'
Conflicts:
	src/plugins/coreplugin/find/findtoolbar.h

Change-Id: I7db695a28473d1b16c46b1e39a4d6fce537c13a1
2016-03-16 15:28:47 +01:00
hjk
bcf7a11c24 Core: Apply 'static' pattern to Core::FindPlugin
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>
2016-03-15 12:43:59 +00:00
Orgad Shaneh
b427ac706b Core: Initialize all members in FindToolbar
Use C++11 member initialization.

Change-Id: Ib4db2fc9354658a0a4969c18f2857678cb49bdae
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2016-03-14 09:43:27 +00:00
Orgad Shaneh
5646480f27 Core: Use Qt5-style connects
The heavy lifting was done by clazy.

Change-Id: I2dde14919d917816d02117338205f8f861d8af0a
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2016-02-03 07:54:02 +00:00
Tobias Hunger
397e7f4843 Update License according to agreement with Free Qt Foundation
* Update files in src/plugins

Change-Id: Ia5d77fad7d19d4bb3498e78661982f68729adb22
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-19 15:57:01 +00:00
Alessandro Portale
03c07b80fd Core: Unify the close icons
Use the same image file and recolor it as needed,

Change-Id: I914819a53ca05d83ca5b88adf44706b460b48ac0
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2015-12-04 10:47:32 +00:00
Alessandro Portale
033862f305 Themed Icons: Introduce Utils::Icon
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>
2015-11-25 12:30:52 +00:00
Eike Ziller
6d4135d8f0 Merge remote-tracking branch 'origin/3.6'
Change-Id: Iddfa0d2f3c0fb8ba65c0e5d479ad8e2f2cb95685
2015-10-26 10:55:50 +01:00
Alessandro Portale
b8bdc6f669 Icon refresh: First step towards the new Qt Creator themes
http://blog.qt.io/blog/author/didesous/ announced new designs/themes
for Qt Creator. This patch replaces many of the existing toolbar icons
with recolorizable masks for better theming support.

Change-Id: I557aa485205fe2624f33724226f698c303342b40
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2015-10-23 16:04:52 +00:00
Tobias Hunger
0aad5fac70 FindToolBar: Update to FancyLineEdit changes
Change-Id: I2a1b0440e0cbf511f7e73057bb9fe75e3a01a695
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-10-14 11:07:52 +00:00
Montel Laurent
451a03a4cb Allow to clear text in replace line.
Change-Id: Id73a0b18f9c0eb54da4e7e9f685e2203f56caf5a
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-09-22 05:53:46 +00:00
David Schulz
0cfdc101cd Find: Open tool bar when triggering find next...
...without a search expression.

Task-number: QTCREATORBUG-12865
Change-Id: I87c325ff85a005ffc87ad2df391c19251b5e2e08
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-04-22 12:38:13 +00:00
Orgad Shaneh
0831b0c2ca Core: Remove dead store
Change-Id: I3388751d8b68747afbdc75354430be744736b8e7
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-03-09 08:00:44 +00:00
Orgad Shaneh
3c537312a0 Core: Fix compilation
Change-Id: If3b4a3e716ac76b153148b0ed9517ea07f963370
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-03-06 06:36:20 +00:00
Friedemann Kleint
54da18eaaa Clean exported headers of the Core plugin.
Change-Id: I26472d568844d5fee62323e01f5c5c12082d5450
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-03-05 07:18:14 +00:00
hjk
7f001dab1b Core: Make Context parameter to registerAction optional
... 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>
2015-02-26 10:09:03 +00:00
Christian Kandeler
38609296d1 Find widget: Give feedback to user about whether search has succeeded.
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>
2015-02-17 10:28:11 +00:00
Eike Ziller
9926fc2ab1 Merge commit '3c85058694ee2e41658d17f524fb48f0b187d2fe'
Conflicts:
	src/libs/utils/tooltip/tipcontents.cpp
	src/libs/utils/tooltip/tipcontents.h
	src/plugins/android/androiddeployqtstep.cpp
	src/plugins/baremetal/baremetalconstants.h
	src/plugins/baremetal/baremetaldevice.cpp
	src/plugins/baremetal/baremetaldevice.h
	src/plugins/baremetal/baremetaldeviceconfigurationwidget.cpp
	src/plugins/baremetal/baremetaldeviceconfigurationwidget.h
	src/plugins/baremetal/baremetaldeviceconfigurationwizard.cpp
	src/plugins/baremetal/baremetaldeviceconfigurationwizardpages.cpp
	src/plugins/baremetal/baremetaldeviceconfigurationwizardpages.h
	src/plugins/baremetal/baremetalplugin.cpp
	src/plugins/baremetal/baremetalplugin.h
	src/plugins/baremetal/baremetalruncontrolfactory.cpp
	src/plugins/baremetal/baremetalruncontrolfactory.h
	src/plugins/cppeditor/cppcodemodelinspectordialog.cpp
	src/plugins/cppeditor/cppdoxygen_test.cpp
	src/plugins/cppeditor/cppdoxygen_test.h
	src/plugins/debugger/breakpointmarker.cpp
	src/plugins/debugger/debuggeritemmodel.cpp
	src/plugins/debugger/debuggeritemmodel.h
	src/plugins/debugger/loadcoredialog.cpp
	src/plugins/genericprojectmanager/cppmodelmanagerhelper.cpp
	src/plugins/projectexplorer/addnewmodel.cpp
	src/plugins/projectexplorer/addnewmodel.h
	src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp
	src/plugins/qmlprofiler/abstracttimelinemodel.cpp
	src/plugins/qmlprofiler/abstracttimelinemodel.h
	src/plugins/qmlprofiler/notesmodel.cpp
	src/plugins/qmlprofiler/qml/CategoryLabel.qml
	src/plugins/qmlprofiler/qml/MainView.qml
	src/plugins/qmlprofiler/qml/Overview.js
	src/plugins/qmlprofiler/qml/Overview.qml
	src/plugins/qmlprofiler/qml/TimeDisplay.qml
	src/plugins/qmlprofiler/qml/TimeMarks.qml
	src/plugins/qmlprofiler/qmlprofilertimelinemodelproxy.cpp
	src/plugins/qmlprofiler/sortedtimelinemodel.cpp
	src/plugins/qmlprofiler/sortedtimelinemodel.h
	src/plugins/qmlprofiler/timelinemodelaggregator.cpp
	src/plugins/qmlprofiler/timelinemodelaggregator.h
	src/plugins/qmlprofiler/timelinerenderer.cpp
	src/plugins/qmlprofiler/timelinerenderer.h
	src/plugins/qmlprojectmanager/QmlProjectManager.json.in
	src/plugins/texteditor/findinfiles.cpp
	src/plugins/vcsbase/vcsconfigurationpage.cpp
	src/shared/qbs
	src/shared/scriptwrapper/interface_wrap_helpers.h
	src/shared/scriptwrapper/wrap_helpers.h
	tests/auto/qmlprofiler/abstracttimelinemodel/tst_abstracttimelinemodel.cpp
	tests/system/suite_debugger/tst_debug_empty_main/test.py
	tests/system/suite_debugger/tst_qml_js_console/test.py
	tests/system/suite_debugger/tst_qml_locals/test.py

Change-Id: I67540b648f8b162496f4aa606b04d50c7c9125c6
2015-02-12 17:29:21 +01:00
Montel Laurent
9d84476f2d Core: Revert change that broke focus on find
Change-Id: I6b7a6a84fdf6b57f7d0a34f8b2e239929e25a7e8
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-02-06 14:24:17 +00:00
Montel Laurent
dd8f2dda5c Port to new connect api
Change-Id: I31078e08f46892e94597f48fd27057a16039eb5a
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-02-06 10:48:28 +00:00
Eike Ziller
3c85058694 Update License
Change-Id: I711d5fb475ef814a1dc9d2822740e827f3f67125
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2015-01-16 12:37:56 +01:00
Eike Ziller
c126e7075b Find: Avoid warning
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>
2014-12-12 09:40:31 +01:00
Orgad Shaneh
7f34158041 Core: Cosmetics
* Remove redundant namespace qualifiers
* Qt5-ify some signal/slot connections
* Replace some using Core::Internal with explicit namespace scopes

Change-Id: Id1aae05e2c6fc2992c2716e1f8f9e985c6e56122
Reviewed-by: hjk <hjk121@nokiamail.com>
2014-11-26 13:46:38 +01:00