Commit Graph

1664 Commits

Author SHA1 Message Date
Jarek Kobus
7fadaff5d4 IDevice: Make it possible to forward declare Ptr and ConstPtr
Most inclusions of idevice.h inside other headers are
required just because of IDevice::Ptr or IDevice::ConstPtr
was used there. Unfortunately, since these "using"
are defined inside a IDevice class, we just can't
forward declare IDevice::Ptr nor IDevice::ConstPtr.

Instead, create a separate header that defines
IDevicePtr and IDeviceConstPtr while having IDevice
forward declared. Redefine IDevice::Ptr/ConstPtr
inside IDevice to use IDevicePtr/IDeviceConstPtr.

Now, instead of forward declaring a IDevice::Ptr
it's sufficient to include the idevicefwd.h.

This drops the number of files being recompiled
after touching idevice.h from ~770 to ~210.

Change-Id: Ib6f2982aa0761fb4cd6593badb9c3c0c527ea535
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-04-14 12:27:04 +00:00
hjk
530b9ae85a ProjectExplorer: Copy more RunConfiguration data to RunControl
The aspects are now responsible for defining what data needs
to be copied and also to provide a suitable interface (kind
of source-compatible to direct use) for access.

The important change here is that RunControl::aspect(...) doesn't
need to access RunControl::runConfiguration() in fully aspectified
RunConfigurations anymore. In not-fully aspectified the runConfig
access is moved to the user code to make the problem visible there.
Long term, aspectification should be finished.

As an additional benefit, the resolving of macros etc can
now be done at the correct time.

Change-Id: I690d9f8f696ce9b4efd42082ba3f81b514efcb77
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-04-12 08:43:09 +00:00
Jarek Kobus
f1e973de79 RunControl: Drop IDevice * from doStart()
Use device set inside passed runnable instead.

Grep for all usages of RunControl::start().
If passed device wasn't nullptr, set this device
inside passed runnable. Otherwise ensure that
passed runnable contains device set to nullptr.

Change-Id: I06fd42a16246fa9fedd81eeb47481a217f887cb0
Reviewed-by: hjk <hjk@qt.io>
2022-02-23 16:28:01 +00:00
Antti Määttä
cdeb3ae13f Add quick3d memory consumption to profiler
Change-Id: I300ef808793fafc7328118dcc694ab67e90f9f52
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-02-09 12:51:15 +00:00
hjk
25f5771aa4 Rename QtSupport::BaseQtVersion to QtVersion
... and the Utils::QtVersion enum to Utils::QtMajorVersion to avoid
conflicts.

Change-Id: Ib688c67388272b7204a91444155f60b8c18a56bd
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-01-24 12:13:19 +00:00
Alessandro Portale
da225e0784 QmlProfiler: Add quick3dmodel.cpp/.h to qbs
Change-Id: I87d70b8a1905bf348784a667ba75c18c759d4afe
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-01-24 07:51:03 +00:00
Janne Koskinen
e37f1d3d6b Add Quick3d profiler support
Add support for quick3d profiling

Task-number: QTBUG-98146
Change-Id: Ida84537df685e8bddc536158519600d722a23d2e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-01-24 06:21:54 +00:00
Eike Ziller
9d8a419d10 Remove qmake build files
Removes qmake as a build system for building Qt Creator itself.
Keep them for some tests that are not completely moved to CMake yet.

Change-Id: I846c6ef65626b6dfae6375fdc85d00677aa8c2fb
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-01-20 12:18:15 +00:00
hjk
104ea4accc Make some qHash and comparison operators overloads hidden friends
Restricts lookup scope more to necessary bits.

Change-Id: Ia42c95aaa70534843b7f6a90bfc56d2a1202c612
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-12-06 17:10:49 +00:00
hjk
304e5c7552 QmlProfiler: Remove unneeded Q_OBJECT in some test
Which apparently also confused my cmake.

Change-Id: I0d3c131616e9aeb1487731900849545f925a0106
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-11-26 14:35:12 +00:00
Jarek Kobus
e3acfcbe60 Remove unneeded includes of ApplicationLauncher
Touching applicationlauncher.h caused recompilation of 455 files.
This reduces it now to 250 files.

Change-Id: I4f347d67695db40ea139faf7d36cfe02f1c32258
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-11-10 08:27:32 +00:00
Eike Ziller
195abefe7d EditorManager: Remove QString openEditor(At) overloads
In favor of the FilePath/Link ones.

Change-Id: I5caf9e0f8de304ff4ee12329557aa50a6f3a0c69
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-11-02 08:11:14 +00:00
Orgad Shaneh
3871e40f43 Fix qHash-related size compatibility warnings by MSVC
Change-Id: I3b7981ce78b67db4b996f99682284a0b911d8cd7
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-10-20 15:03:51 +00:00
Eike Ziller
3d4d7c7e14 Merge remote-tracking branch 'origin/5.0'
Conflicts:
	src/plugins/clangtools/clangtoolssettings.cpp
	src/plugins/clangtools/executableinfo.cpp
	src/plugins/clangtools/executableinfo.h

Change-Id: Id8caf63e3e594792467d3447870086bd2d8f73b9
2021-09-13 17:03:55 +02:00
Laszlo Agocs
0caf69cc52 Migrate to fixed add_shaders prefix handling
One way to get rid of the "qml" in there is to use BASE.
An alternative would be to update the file paths in the source code.
Here we chose the former.

Change-Id: If49cb584aea022d5d74b2348ec99ed831b715111
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-09-10 11:03:53 +00:00
Eike Ziller
987ad3fe9c Merge remote-tracking branch 'origin/5.0'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri
	src/plugins/android/androidconfigurations.cpp

Change-Id: Icd2b0fda2b2653656285bbbe457c30c9cd414d3f
2021-08-30 12:15:37 +02:00
Laszlo Agocs
491bd18d1f Update scenegraph API check in isUsable
Do not test for OpenGL-through-QRhi, but rather for
anything-through-QRhi. The implementation of the profiler
views is not tied to OpenGL anymore. That said, QQuickWidget
implies using OpenGL as of now, so in practice we will always
have OpenGL at best, but update the tests now to be better
prepared for the future.

Change-Id: Ic43eac1c5cf0e2ce2ef35cdd8a29b475884a5af8
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-08-26 16:38:18 +00:00
Eike Ziller
b09b6bd747 Merge remote-tracking branch 'origin/5.0'
Change-Id: I370268624bd6e91e7b44fa236e913f5f55867e17
2021-08-20 09:50:30 +02:00
Alessandro Portale
c568ab89c5 Tracing/QmlProfiler/PerfProfiler: Fix qt_add_qml_module call
This change fixes the failing configuration against a recent Qt (post
6.2-Beta2) build:

CMake Error at QTDIR/qtbase/lib/cmake/Qt6Qml/Qt6QmlMacros.cmake:196
(message):
  PLUGIN_TARGET must also be provided when NO_CREATE_PLUGIN_TARGET is
  used.
  If you want to disable creating a plugin altogether, use the NO_PLUGIN
  option instead.

Change-Id: If1dbfb09bda8e8cdd07cc575076dd6ccec1a4d39
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2021-08-20 07:03:24 +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
7c28c4f744 Utils: Introduce a FilePath constructor from char arrays
Similar to QT_RESTRICTED_CAST_FROM_ASCII to avoid the need for
decorations in user code.

At the same time, drop some convenience constructors and functions
in CommandLine and Icon essentially serving the same purpose.

Change-Id: Ida4e5ac19c2da0a4298a97b2a8e1511d56bbb79d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-17 05:34:10 +00:00
hjk
52e5023bcc ProjectExplorer: Use Utils::CommandLine in ProjectExplorer::Runnable
Change-Id: Id965f1f9047dcbc3ea5c9ddaa550d12668cf8ae6
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-13 15:04:30 +00:00
Alessandro Portale
21cb0711c4 Tracing/QmlProfiler: Port shaders to Qt 6
For each shader in Tracing and QmlProfiler:
- Add a vert/frag variant in Vulkan style GLSL
- Include the shader via qt_add_shaders
- Implement RHI/Qt6-specific code for loading the shaders and for
  updating the uniform buffer
- Set the material's QSGMaterial::CustomCompileStep flag to affect the z
  value the same way as the Qt 5 code does

Building of Tracing, QmlProfiler, etc. with Qt 6 depends on the Qt
Shader tools being installed.

Fixes: QTCREATORBUG-20575
Change-Id: I9aba5a777da9a549da0cdd0a217dfcb346c72e58
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2021-08-11 08:05:22 +00:00
Alessandro Portale
84a0170516 Tracing/QmlProfiler: Prepare for porting of shaders to Qt 6
This change touches up the shader handling code in Tracing and
QmlProfiler in order to pave the way for the pending porting of
the shaders to Qt 6.

- Use QSGGeometry::Attribute::createWithAttributeType instead of
  QSGGeometry::Attribute::create
- Undefine some fields that are unused in Qt 6
- Add a couple of comments to document the relation between C++
  variables and shader attributes
- Extract some code into functions

Change-Id: I0e7119484b6190a415a5c2d2a0bbd6465088cf19
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2021-08-11 08:04:32 +00:00
Alessandro Portale
5c37fb1f65 QmlProfiler/PerfProfiler: Restore support for Qt >= 6.2
First (try to) add the target as Qt Creator plugin, *then* check whether
it exists.

Amends: 5aff1419fa

Change-Id: Ia7c318c0ffb7bbaa21159ddf9de88b80ad0033cb
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-07-16 09:23:35 +00:00
Alessandro Portale
f29d7b896f Restore support for CMake < 3.11
Prior to CMake 3.11, the SOURCES could not be omitted when
calling add_executable.

This change ensures that SOURCES are passed, at least when
building against Qt < 6.2.

Change-Id: I83bd82fe12364523ce6954d145b632df7210d118
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-15 19:29:14 +00:00
Tim Jenssen
40d03d1896 Avoid size_t to (u)int warnings with auto, where it is possible
Change-Id: I1ec7454ebce59d99bc828bfd5086907eb0905632
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-07-07 17:39:46 +00:00
Alessandro Portale
f43ac65ccb Don't call qt_add_qml_module with inexistent TARGET
If the passed TARGET does not exist (because it had been disabled in the
CMake configuration), qt_add_qml_module will create it for the user.
That created target is by itself incomplete and breaks the build.

So, don't call qt_add_qml_module with inexistent TARGET.

Fixes: QTCREATORBUG-25960
Change-Id: I646eb2176befb0fd5fe06e184ebd0cee32e18ab2
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-07-02 15:35:24 +00:00
Alessandro Portale
9624d2cd69 QmlProfiler: Add qml, register types via qt_add_qml_module
Use the CMake-based qml API to create the "QtCreator.QmlProfiler"
module.
This uses qt_add_qml_module, which was introduced with Qt 6.2.

For Qt 6.1 and below, everything compiles and runs like before this
change.

Change-Id: If381059bbf2a0a2b92c7f62e6da3142036ac6bbc
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2021-06-28 15:06:45 +00:00
Alessandro Portale
a56ce4e450 Tracing: Add qml, register types via qt_add_qml_module
Use the CMake-based qml API to create the "QtCreator.Tracing" module.
This uses qt_add_qml_module, which was introduced with Qt 6.2.

For Qt 6.1 and below, everything compiles and runs like before this
change.

Change-Id: I4d63f9f724d0628cfaab9d1164c0d575f15d15aa
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2021-06-22 11:58:05 +00:00
Alessandro Portale
43c5944571 Tracing/QmlProfiler/CtfVisualizer/PerfProfiler: Compile with Qt 6
This makes the tracing lib, its tests and the three plugins which depend
on the lib compile with Qt 6.

The rectangles are not yet shown most likely because some OpenGL
specific code was #ifdef-ed for Qt 6. That code needs to be
reimplemented on top of the new Scenegraph API, using the RHI instead of
direct OpenGL in a follow-up patch.
An assertion failure in QQuickWidget::createFramebufferObject() needs to
be fixed as-well.

The code still builds and runs assertion free (and the autotests pass)
when built against Qt 5.

Task-number: QTCREATORBUG-20575
Change-Id: I47ebb477823de2f0d27329dac7c292a466cea1d7
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2021-06-09 15:30:21 +00:00
Alessandro Portale
b730aa6405 Tracing/QmlProfiler/Perfprofiler: Merge modules
Move Tracing Qml Types into the "QtCreator.Tracing" module.
Move QmlProfiler Qml Types into the "QtCreator.QmlProfiler" module.
Move PerfProfiler Qml Types into the "QtCreator.PerfProfiler" module.
And tst_flamegraphview ones into QtCreator.TstTracingFlameGraphView.

... in preparation to register the types declaratively.

Change-Id: Ic0e3863d09b3426fa5b7419116625ad49b817dcf
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2021-06-08 06:46:28 +00:00
hjk
f2f40efa03 Utils: Move process arguments class out of QtcProcess
The main QtcProcess interface is nowadays a CommandLine, with no
explicit references left to QtcProcess::Arguments and related static
helper functions, so it only clutters the QtcProcess class interface

So move these items out of QtcProcess, later potentially to a separate
file pair.

Change-Id: I45c300b656f5b30e2e2717232c855fdd97c2d1d7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-05-11 09:45:24 +00:00
Eike Ziller
b3a893e9b8 Merge remote-tracking branch 'origin/4.15'
Change-Id: I75ffc79eeb8d73296a2271a636fae48e35427947
2021-05-05 11:46:19 +02:00
Jarek Kobus
564d2666c3 Fix build with GCC 11: include <limits>
Task-number: QTBUG-90395
Change-Id: Ic6d3fde59bd44d364ca1c1fe48b094bb9768b43c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-04-29 09:55:51 +00:00
hjk
38b4536090 Utils: Introduce a BaseAspect::setEnabler(BoolAspect *)
A convenience method to tie the enabled state of an aspect to some
other bool aspect, to be used e.g. when settings item availability
depends on some check box.

Makes it harder to miss one of the three necessary steps.

Change-Id: I8c120bb6846aea2a503614f7c73fa57a149cab41
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-04-13 09:59:58 +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
8eb74080ab QmlProfiler: Aspectify settings
Only four simple values.

Adapting qmlprofilerconfigwidget_test did not seem desirable,
as in the aspectified state this is hidden in the base aspects
implementations.

Change-Id: I933a8ca065169c61b7f25f109e0b7a0e6d21cb33
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-04-12 11:29:16 +00:00
Eike Ziller
30da5aafd7 CMake build/Qt6: Automatically disable build of profilers
Tracing library does not build with Qt 6. Disable that automatically
and also the plugins that depend on it. Add some feature info for
the Tracing library, though we usually do not add feature information
for libraries in general.

Change-Id: I51b6993e30ec69d63a031c7bf404ea3887e14d84
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-03-05 12:29:57 +00:00
Alessandro Portale
72d91dc94a Use qAsConst with non-const Qt containers in range-loops
... in various places

Change-Id: Ic6c0c1b9437a1ed402105c7a14a1f5f9454a68d4
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2021-02-17 14:43:29 +00:00
Ulf Hermann
1455eae9ac QmlProfiler: Be more patient in FlameGraphViewTest
Apparently 5s are not enough to show a window on the screen ...

Change-Id: I8da65d0d8b8b9bbb7ba80396045551d46590ff61
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-01-15 13:53:39 +00:00
Eike Ziller
eaefcbd8f0 Use new, more evocative MessageManager API
At various places where semantics doesn't change.

Change-Id: Ib4d4a5c9f067e109126c6de88257f9e198a71447
Reviewed-by: hjk <hjk@qt.io>
2020-12-16 09:30:44 +00:00
Jarek Kobus
d42f38cc96 Use Q_ENUM instead of obsoleted Q_ENUMS
It fixes the following warning:
Use Q_ENUM instead of Q_ENUMS [clazy-qenums]

In addition, it amends 8588cf268f
where WidgetStyle got removed.

Change-Id: I4d72dd762a2f18ba8886360b3581b4ef19bf4c5e
Reviewed-by: hjk <hjk@qt.io>
2020-12-11 14:16:42 +00:00
Jarek Kobus
e9ef83f4c6 Don't call non-const method on temporary container
...as it may detach. Fix the following clazy warning:
Don't call QList::first() on temporary [clazy-detaching-temporary].

Change-Id: I667c122c42ccfc1344508154466d9c1dc6ae6166
Reviewed-by: hjk <hjk@qt.io>
2020-12-08 14:44:18 +00:00
Alessandro Portale
a3857a996a Don't access static functions/fields via instance
Courtesy of readability-static-accessed-through-instance

Amends: b2a766a79a

Round #2: This time done with Qt Creator's Analyzer, which
found other occurences than run-clang-tidy.py

Change-Id: I479e280c7abcf2d24baccbb0af69ae4bda05198e
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2020-11-27 13:26:07 +00:00
Christian Stenger
1eb0b02ce9 QmlProfiler: Fix flamegraph test
Change-Id: I27d7067a844e614334a5faedcb2915b3a24ae5e0
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-11-16 05:29:50 +00:00
Jarek Kobus
2b414508b7 Remove unneeded includes
Change-Id: I67fee9303509b7080e123a2a5826e200ce498ce2
Reviewed-by: hjk <hjk@qt.io>
2020-11-12 12:14:11 +00:00
Eike Ziller
8add61b216 Merge remote-tracking branch 'origin/4.13' into 4.14
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri

Change-Id: Ia779a511d73d86d79dbcecd8cc3763cf3d605a87
2020-10-09 16:35:27 +02:00
Dominik Holland
db4b3641f5 qmlprofiler: Fix a crash in the rangeFilter
Always check the stack before popping an element.

Fixes: QTCREATORBUG-24730
Change-Id: I7dc6363137ef002219fbc49b7343cff8112a58c2
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-10-09 11:38:28 +00:00
Christian Stenger
ddc5afc4ec QmlProfiler: Replace QRegExp by QRegularExpression
Task-number: QTCREATORBUG-24098
Change-Id: I98bc7a6561c8e19da984d2efbf36d890b1f48ebf
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-07-14 11:30:54 +00:00