Commit Graph

73 Commits

Author SHA1 Message Date
Jarek Kobus
545dbc5743 Valgrind: Use QMetaEnum for parsing enum values
Change-Id: I43685e3fde662a57b6966d5f5f29d4138158b4d8
Reviewed-by: hjk <hjk@qt.io>
2023-07-25 15:00:43 +00:00
hjk
cecf9c9136 Valgrind: Collapse project and global settings classes
Change-Id: I41b157bb07a451851641c7a5785334bd28036f45
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-07-25 13:37:20 +00:00
hjk
9a53869d51 ProjectExplorer: Dissolve ISettingsAspect
Covered by AspectContainer nowadays.

Change-Id: Id7eadaf089059031e6bd4c4b3e742e4ed0a1dc96
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-07-25 11:21:12 +00:00
hjk
846ff37aac Valgrind: Fix valgrind settings persistence
Change-Id: Idcd551e10d36cbadb8785bd7922777a45a871518
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-07-25 08:45:22 +00:00
hjk
d2bb1151f5 Valgrind: Merge configwidget population to settings aspect container
Change-Id: I021ef0ea9b3ab48c805a8af282a4062ddd701dea
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-07-24 13:51:54 +00:00
hjk
773a28acea Valgrind: Move global settings handling closer to current pattern
Change-Id: I41f35485ef51b977ee75fec53dbf0c8d75a27461
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-07-24 11:26:43 +00:00
hjk
7cc6078756 Utils: Let aspect transition functions indicate there was a change
Helps to make it easier to reason about the necessity of emitting
*changed signals.

Change-Id: Ieab29b25f5cc2799e193417b9cab02c99501c60a
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-07-20 13:52:24 +00:00
hjk
4ab1d75ee6 Utils: Introduce a staging area for gui values
Accessing gui elements is very aspect-specific, whereas the
rules when and how values are synchronized are rather general.

Splitting the two concepts and having a permanent 'buffer' area
that is synchronized with the gui elements if and only if they
have been created helps to keep the boilerplate needed per-aspect
at a minimum.

This value could also serve as "model" in case we wanted to allow
multiple "views" in different places of the gui onto that aspect.

Change-Id: I34832512b99c53cb0e4df437ee9b4c5d17a2ad8f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-07-18 06:53:28 +00:00
hjk
d0d1e1af1f A few more direct FilePathAspect value accesses
Task-number: QTCREATORBUG-29167
Change-Id: I8eba582303c16dddbdb5cea5bce43f048bac06b7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-07-04 13:08:00 +00:00
hjk
8e257dca2c Utils: Replace StringAspect::setFilePath()
... by FilePathAspect::setValue().

Closer to the intented uniform API.

Task-number: QTCREATORBUG-29167
Change-Id: Ife26046eaeef2e49108e42a31a2d32e453883e3c
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-07-04 11:41:31 +00:00
hjk
379e7f906e Utils: Rework aspect implementation
This avoids some repetition and could be a step towards
having type storage in (or rather accessible from) the base,
so we can have aspects for more complex data (treemodels...)
that are not easily converted to QVariant.

Change-Id: I9797b3d5646195705212db1830d2b415291ac651
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-06-29 11:25:44 +00:00
Eike Ziller
7a605e9a59 Consistently use "Callgrind" and "Memcheck"
Change-Id: Ib9727153fcf653cf11b07592639f544a856a8ad9
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2023-06-13 13:45:45 +00:00
hjk
77b8c63436 Valgrind: Adapt to recent Aspect changes
Change-Id: I88647e5b2934bedf04828984567dee0a34bb7605
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-05-25 11:08:07 +00:00
hjk
75710fa369 Utils: Remove LabelPlacement::AtCheckBoxWithoutDummyLabel
This is identical in remaining functionality to AtCheckBox after
the recent layout builder changes (or rather, can be adjusted on
the layouting side by having appropriate empty cells)

Task-number: QTCREATORBUG-29167
Change-Id: Ic357de6fb756acb5926afe1fd361ee4b18b17afd
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-05-24 09:53:05 +00:00
hjk
cdf1926215 Valgrind: Use FilePathAspect for main executable
Change-Id: I0bdb625b47d0f39b577684b6f407b9e8a6086d1f
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-05-23 12:13:41 +00:00
hjk
99f7679564 Layouting: Make aspects operate on parent items, not LayoutBuilder
LayoutBuilder is meant to be an implementation detail nowadays.

Change-Id: I777ab934d3d405873e819eeddd27428d8c652f9a
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-05-03 13:44:28 +00:00
hjk
642c593481 Utils: Flatten LayoutBuilder related hierarchies
Originally the idea was to only expose LayoutBuilder, but we
are getting more and more related items. Be consequent now,
and have everything in Utils::Layouting, but not in nested classes.

Change-Id: Ic0f98595882e5c60a25c30ec52df4a0ea79bc0ca
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-01-20 12:44:30 +00:00
Kai Köhne
56baf8c058 Remove GPL-3.0+ from license identifiers
Since we also license under GPL-3.0 WITH Qt-GPL-exception-1.0,
this applies only to a hypothetical newer version of GPL, that doesn't
exist yet. If such a version emerges, we can still decide to relicense...

While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only

Change was done by running

  find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR GPL-3.0 WITH Qt-GPL-exception-1.0/LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0/g" {} \;

Change-Id: I5097e6ce8d10233993ee30d7e25120e2659eb10b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-06 11:15:13 +00:00
Marc Mutz
8eb4d52342 Port from qAsConst() to std::as_const()
We've been requiring C++17 since Qt 6.0, and our qAsConst use finally
starts to bother us (QTBUG-99313), so time to port away from it
now.

Since qAsConst has exactly the same semantics as std::as_const (down
to rvalue treatment, constexpr'ness and noexcept'ness), there's really
nothing more to it than a global search-and-replace.

Task-number: QTBUG-99313
Change-Id: I88edd91395849574436299b8badda21bb93bea39
Reviewed-by: hjk <hjk@qt.io>
2022-10-07 13:47:53 +00:00
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
Marcus Tillmanns
04205d1225 FileUtils: Adds toFilePathList function
Change-Id: Ie3137751135fdb6c3161cc886f307323fcce6b72
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-08-04 11:33:53 +00:00
hjk
14257a24f9 Utils: Introduce Layouting::{br,st}
... as "standard" ways to define line breaks and simple stretch.

There have already been too many patterns to do it.

Break() and Stretch() still work for the patches in flight, but
they are planned to be removed.

Change-Id: I9b70dcdc11244a904a496b0c55938dfb0b265fc8
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-07-25 09:52:15 +00:00
hjk
866f20e4f9 Valgrind: Use Tr::tr
Change-Id: I77b27462d88079699e620ef459f951846c15c3e2
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-07-11 07:14:37 +00:00
Jarek Kobus
6cd736fe6c Remove algorithm.h from buildtargetinfo.h
Change-Id: I777212fb94d46c1c71f017288b7e38dd5db62a91
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-05-18 08:38:05 +00:00
hjk
8d68e05d05 Valgrind: Use FilePath for some suppression files
Change-Id: I48490a77d569d752ada1883554cf307148f2c0cb
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-10-05 08:46:11 +00:00
hjk
95f7c5f256 Valgrind: Simplify suppression file interface
The global settings and per-project settings looked the same,
but behaved quite differently: The per-project one were a kind
of diff against the global one.

Besides having "issues" when keeping the temporary and permanent places
where relevant parts of the data were kept (settings, manual-applied
global, auto-applied local settings), the concept was not clear in the
UI at all.

This here takes the simple way out: Either local, or global, no diffs.

Change-Id: I90439cd20067ab60b88372f1cb03eeef8c2e42d3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-09-27 11:05:30 +00:00
hjk
897d3349fa Valgrind: Bring back label for suppression files list in settings
Also, top-align it again.

Change-Id: I33ac6e44fd1d47c262e5473a17dea997fa5d1b71
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-09-16 07:55:05 +00:00
hjk
584217a52f Use more FileUtils based file dialogs
Change-Id: I1e7ec0493c26afe58e17afb8923a2b1023f6dcd4
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-08-19 08:33:22 +00:00
hjk
454e8a31e2 Analyzer: Base ISettingsAspect on Utils::AspectContainer
Change-Id: Ib4c19d0cb167911dc50d989771dd53f3569db087
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-04-12 13:15:13 +00:00
hjk
035a6ff031 Utils: Avoid intermediate widgets when using LayoutBuilder
In most cases, the layout constructed in the builder was set
on a widget which in turn was put into a vbox in the actual
widget. This is not necessary, but needs some re-ordering.

Also make sure that using not-yet-parented widgets during
layout construction does not cause visible artifacts.

Change-Id: I75727a571da093d3131ea6fba467c2c646cdb6f1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-03-16 11:37:44 +00:00
hjk
da01f4544f Valgrind: Create a SuppressionsAspect
This is a fairly complex use case, as the corresponding widget looks the
same in global settings and Project settings, but behaves differently
(Project only stores a diff, is auto-apply). It also use two(!)
settings keys in the project case.

So while it works, it takes manual help for the cancel/apply and
toMap/fromMap. Looks like there is still some basic infrastructure
missing.

Change-Id: I25ab7b41616ee09ff9133e93b84f34947fc32988
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-03-12 09:14:06 +00:00
hjk
0e2445bc54 Valgrind: Aspectify settings
Change-Id: I2fbf8244a05ffb1b642843c6471f92e2b154cf8a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-03-04 13:37:35 +00:00
Eike Ziller
f47c7b2e90 Valgrind: Do not save defaults to settings
Task-number: QTCREATORBUG-24762
Change-Id: I10fee50cde9facaa35a67114ac15e8b1daa72ab2
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2021-02-22 10:24:03 +00:00
hjk
c5cc771656 Valgrind: Allow specifying extra arguments to valgrind etc
Fixes: QTCREATORBUG-18693
Change-Id: Ibb968dcd82b118340a45329b4a14b28d85700661
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-02-17 14:59:03 +00:00
hjk
21f6445781 Valgrind: Apply new SettingsPage patterns
Change-Id: I7b2c7cf06ed79926fbbd00d4df479c0e0a7da249
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-01-17 13:44:25 +00:00
hjk
cd3876fd1a ProjectExplorer: Use a ISettingsAspect::setConfigWidgetCreator() setter
Closer to the usual pattern elsewhere.

Change-Id: Ieaed483bc7f61b63e5bde87a721f43c3e3d737aa
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-08-30 11:13:51 +00:00
hjk
741950a3aa Valgrind: Restructure plugin setup
Bring it more in line with the standard pattern.

Plus some cosmetics.

Change-Id: I2297c4e72892db386c50ece7dc64bdc89f0d9010
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-03-25 15:00:01 +00:00
Orgad Shaneh
7c56b2c310 Callgrind: Support opening last results in KCachegrind
Change-Id: Idb3b08ca6a1837f2456b73bcaf19aced5b83179f
Reviewed-by: hjk <hjk@qt.io>
2018-12-03 09:46:14 +00:00
Orgad Shaneh
2c212d48a5 Valgrind: Strip QLatin1*
Change-Id: If93ca890ab6d023ab786a5153f50a1dfa03764de
Reviewed-by: hjk <hjk@qt.io>
2018-12-03 09:45:47 +00:00
hjk
69753cf9b6 ProjectExplorer: Remove direct runconfig dependency from ISettingsAspect
Change-Id: I5d8a6a31f6bf97c34163b64b8d37f9ea070717ba
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-09-11 07:51:11 +00:00
Ulf Hermann
f0baf01a2e ProjectExplorer: Keep RunConfiguration in ISettingsAspect
Any SettingsAspect that doesn't refer to the global settings has a
specific RunConfiguration it is about. This can be very handy to know
when constructing the actual settings. Right now there is no way to find
out about it.

Drop the clone() and create() methods. They weren't used anywhere and a
proper implementation should take care of the runConfiguration member.

Change-Id: Ie505a9b19707f8a1b6bf9cae73513cd3c30d0bca
Reviewed-by: hjk <hjk@qt.io>
2018-04-27 08:55:24 +00:00
Orgad Shaneh
951f0e0bbd Valgrind: Fix cyclic connect
Editing the widget triggers rawPathChanged(), which calls
setValgrindExecutable, which emits valgrindExecutableChanged(), which calls
setPath on the widget.

No other path reaches any of these functions.

This causes the cursor to jump to the end, so if you want to change
'valgrind' to '/usr/local/bin/valgrind' you have to jump back after each
character.

Removed the now unused signal.

Change-Id: Iaf4e902fb9a42975e9ada6662b7a64e53fab5cad
Reviewed-by: hjk <hjk@qt.io>
2017-11-17 07:53:32 +00:00
hjk
931ee3382c Analyzer: Rework the dock widget layout generation
Decouple layout generation from widget generation and
separate analyzer action description from menu action creation.

Tool specific layouts are named "Perspective" now.

Change-Id: I774efe77a07640c4cc26e4e566662c8a673c8831
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-02-29 10:47:43 +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
Kai Koehne
46fc33d914 Don't mix iterator and const_iterator
This avoids unnecessary detaches of the Qt container data.
The mismatches where detected by defining QT_STRICT_ITERATORS;
however, this define violates the ODR (causing linker errors),
and therefore is not added permanently.

Change-Id: Idd336a9c8b394214a820437ef1b92d2101f6101c
GPush-Base: 62b0848b9c
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-04-02 09:40:24 +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
8295b503be License update
Change-Id: I3c22ef2685d7aa589f5d0ab74d693653a4c32082
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2014-10-09 11:41:44 +02:00
Friedemann Kleint
70f22fa823 Valgrind: Initialize shortenTemplates-setting.
Purify reports "Uninitialized Memory Read" for shortenTemplates.

Change-Id: Ieab51cd78bf9fc7bbc539ef3158e0f57a12579d7
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2014-01-20 09:31:00 +01:00
Robert Loehning
746c5d8863 Incremented year in copyright info
Change-Id: Ib5423fdd064e4546f848c0b640b0ed0514c26d3a
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-01-08 08:29:47 +01:00
Nikolai Kosjar
cdb174484c Valgrind: Memcheck: Add gui options for --show-origins and --leak-check
Change-Id: If07c7a7a11a4c555e26b672bebb1e93eded38dc4
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-09-10 18:01:23 +02:00