Commit Graph

37 Commits

Author SHA1 Message Date
hjk
118b84ffd6 Use simpler Plugin::initialize() when feasible
Change-Id: I567965d266f20526bda9f823e31a04b354d53fb1
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-20 12:13:10 +00:00
hjk
e7c536011f Prefix Tr::tr contexts with ::
To make outliers better visible in Linguist

Change-Id: Ic35ea2a858b7e3576d9a416fb494fddb616eaaa1
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-13 12:00:17 +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
Eike Ziller
55fa109b59 CMake build: Use version-less Qt targets
Since we do not support Qt < 5.15 anymore, and as a first step
for getting rid of our special FindQt5.cmake.

Change-Id: Icc5dbaf9b0a3a622b1f609ff114b9decb6d2856c
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-01-05 10:13:16 +00:00
Eike Ziller
8db0d3b0ff Fix lupdate issues
- missing Q_DECLARE_TR_FUNCTIONS
- some full qualifications needed for confused lupdate
- avoid breaking some translations from former TaskListPlugin,
  VcsCommand and highlighter settings refactoring

Change-Id: Ia3b34095512a7bad6903f0aff6095313ee39e3e4
Reviewed-by: hjk <hjk@qt.io>
2022-10-14 13:26:45 +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
Alessandro Portale
58b0f2d8f9 CtfVisualizer: Convert to using Tr::tr
Change-Id: Ide0c6556642c20a200fd72ec8e9596950af823b4
Reviewed-by: hjk <hjk@qt.io>
2022-09-22 06:52:42 +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
Alessandro Portale
8cb1775ba8 Tracing/Qml|PerfProfiler/CtfVisualizer: Move QML modules to :/qt/qml
We don't want to dedicate the whole resource file system to QML.

Change-Id: I4c7e4af7aeeab00f44c5244e99949a90abb032cf
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2022-07-20 06:53:14 +00:00
Alessandro Portale
34213f5717 Tracing/QmlProfiler/PerfProfiler/CtfVisualizer: Remove pre Qt 6.2 code
- Remove code for Qt below 6.2 from c++ sources and CMakeLists.txt
- Remove Qml code from .qrc files
- Qbs: Add qt.core.resource_data Groups for Qml code
- Remove OpenGL shader .frag and .vert files
- Remove Qml import version numbers

Change-Id: I3bd1cd95381e66c98ee3af4259e89b0b1eff0709
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2022-07-18 07:11:06 +00:00
hjk
9e363c6421 Add plugintr.h files to all plugins
Except FakeVim, which had it before.

for i in [a-eg-z]*/*.json ; do
    upper=${i##*/}
    upper=${upper/.json/}
    lower=${i%/*}
    trfile=$lower/${lower}tr.h

    cat << EOT > $lower/${lower}tr.h
/****************************************************************************
**
** Copyright (C) 2022 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3 as published by the Free Software
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/

namespace $upper {

struct Tr
{
    Q_DECLARE_TR_FUNCTIONS($upper)
};

} // namespace $upper
EOT

    git add $trfile

    perl -pi -e "s/(${lower}_global.h)/\1\n    ${lower}tr.h/"  $lower/CMakeLists.txt

    perl -pi -e "s/(\"${lower}_global.h\",)/\1 \"${lower}tr.h\",/"  $lower/$lower.qbs

done

Change-Id: I15ebbaaa9443c57b391b9e143f592d8a0c9208a9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-06-27 13:34:57 +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
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
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
Jarek Kobus
cf010911f7 Don't allocate unneeded temporary containers
Fix clazy warnings: allocating an unneeded temporary container
[clazy-container-anti-pattern]

Change-Id: I4b4c2c634eea650bbdf3c12d982a17f899fc94ec
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2020-12-14 12:35:47 +00:00
Christian Kandeler
48be20cf48 Fix clang warnings about copies in range-for constructs
Change-Id: If50553964483626e72a816b1d23fa81b45ed9ca7
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-06-15 12:38:17 +00:00
Alessandro Portale
0be309bcf1 Various places: performance-for-range-copy
Change-Id: I475990d32a5211d31a77782667a2dfedba134137
Reviewed-by: hjk <hjk@qt.io>
2020-06-15 05:58:46 +00:00
Eike Ziller
5b364de168 Use dialogParent() instead of mainWindow()
There are very few reasons to use mainWindow() directly.
Especially for modal dialogs, using dialogParent() is important, since
that guarantees the stacking order in case of other dialogs currently
being open.

Change-Id: I7ad2c23c5034b43195eb35cfe405932a7ea003e6
Reviewed-by: hjk <hjk@qt.io>
2020-06-02 11:44:53 +00:00
Eike Ziller
35c5c09c38 Remove unused QTC_PLUGIN_REVISION macros
These were used when the plugins were in separate repositories

Change-Id: Iba06bb1e197e96271f6157b70ffb382b016147f1
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-04-09 11:26:51 +00:00
Leena Miettinen
268a61d530 CTF Vizualizer: Fix UI text according to the guidelines
https://doc.qt.io/qtcreator-extending/qtcreator-ui-text.html

Task-number: QTCREATORBUG-23683
Change-Id: I9778dd6af9322d068ac1715876774d4ff5efe161
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-03-16 11:54:08 +00:00
hjk
a44bfdd779 Provide an empty default IPlugin::extensionsInitialized()
And remove all empy re-implementations.

Change-Id: I19f0b4e55c042c96693ecb89766f97f0a97b54ae
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-02-07 10:21:34 +00:00
Eike Ziller
646c7860cb Merge remote-tracking branch 'origin/4.11'
Conflicts:
	src/plugins/genericprojectmanager/genericprojectplugin.cpp
	src/plugins/projectexplorer/environmentaspect.cpp
	src/plugins/projectexplorer/environmentaspect.h
	src/plugins/projectexplorer/environmentaspectwidget.cpp

Change-Id: Id21d62cf14419febd1e06c9b429fcdf4501c0eaf
2019-11-11 12:58:11 +01:00
Eike Ziller
34e8f58c47 Fix lupdate issues
Change-Id: Ib0cbb96a1a4857db5724f9d1e316b97bf2827dbd
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-11-04 14:06:09 +00:00
Tim Henning
8d91258cfa Tracing: CtfVisualizer: Add percentage of total time to statistics
Adds a column for the percentage of the time of an event to the total
measurement time in percent.

Change-Id: Ic3298b4ef6f34cb893edd987e645c7cfb67458b5
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2019-10-24 08:48:10 +00:00
Tim Henning
1673e692c5 Tracing: CtfVisualizer: Apply thread restrictions to statistics, too
The statistics are now also filtered by the selected threads. If no
thread is selected, the statistics are presented for all threads combined.
This fixes a bug with double counted events, too.

Change-Id: I9afa0bf5bc85ccf363e00600e75001c0ab3f2e8a
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2019-10-24 08:47:57 +00:00
Tim Henning
b90200cb19 Tracing: CtfVisualizer: Add menu to restrict view to certain threads
Add a new dropdown menu to select which threads should be displayed.
If no threads are selected, all are shown (this is why the word
'restriction' was chosen). At the moment this only affects the
timeline view, see the follow up for the statistics view.

Change-Id: Ib3b08ea895e852189156e23feb8dea5f843cceb3
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2019-10-24 08:47:39 +00:00
Tim Henning
ee7aad5719 Tracing: CtfVisualizer: Fix and extend counter details
Add more information in the details popup for counters
(e.g. CPU usage) like current value, min and max values.
Also fixes that the start time of a counter element wasn't
displayed.

Change-Id: If6e605205c680efe0f1be9a97b1cc01a762276ff
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2019-10-24 08:47:24 +00:00
Ulf Hermann
b4bc204a7d CtfVisualizer: Avoid compile warning
Column::COUNT should not show up as actual column, but the compiler
doesn't know.

Change-Id: I68eea5c73a95bd45378f88c505f0cefed62ce8ab
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-10-21 12:26:56 +00:00
Milian Wolff
be61acffe7 Don't link against QtSupport in CTF Visualizer plugin
Change-Id: I03e4e3d4a2c687ba5841987318eee569c3fa15c4
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2019-09-30 20:23:52 +00:00
Milian Wolff
7d1b48f5ee Compile ctfvisualizer plugin with CMake too
Change-Id: I746bda8bae7104dc79ebe0873cb75b052500174d
Reviewed-by: Tim Henning <tim.henning@kdab.com>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2019-09-19 07:16:28 +00:00
David Schulz
b4dd2ea2cc CtfVisualizer: Fix qbs build windows
Change-Id: I6be07728475e8bf3197babbeff548ef86a5d6a11
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-09-03 12:32:06 +00:00
hjk
6cb1268f49 CtfVisualizer: Remove unused signal
Change-Id: I29c47b279dcf1002fa1ffabcb0cd1f2865d4c683
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
2019-09-03 12:30:29 +00:00
Christian Stenger
c7b84d821b Add Qbs build file for CtfVisualizer plugin
Change-Id: I90de2ebbcd7e8fae351b7a4a6241bf64b45a7904
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2019-09-02 13:13:17 +00:00
Tim Henning
7fec418205 Tracing: Add Chrome Trace Format Visualizer plugin
This new plugin adds a viewer for Chrome Trace Format (CTF) files
(aka Trace Event Format). It uses the same UI components as the
QML Profiler timeline and the Perf Profiler.

The Trace Event Format is generated by different kinds of tracing tools.
Usually the files are display with the trace-viewer, built into Chrome
(chrome://tracing). This plugin was developed because of the high memory
usage of trace-viewer, which makes it difficult to use with trace files
bigger than 100 MB.

The plugin fully supports all event types used in data generated by
LTTng, converted to CTF by https://github.com/KDAB/ctf2ctf.
Some of the more advanced event types used for example in Android system
traces, though, are not supported. The viewer will silently ignore
unsupported event types.

Supported Event Types:
- Begin, End, Duration and Instant events
- Counter events (graphs)
- Metadata events (process and thread name)

The plugin uses nlohmann/json instead of QJson because of the ~128 MB
object size limit by QJson.

[ChangeLog][Tracing][CtfVisualizer] Added Chrome Trace Format Visualizer plugin

Change-Id: I5969f7f83f3305712d4aec04487e2403510af64b
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2019-08-29 13:37:04 +00:00