Commit Graph

60741 Commits

Author SHA1 Message Date
Nikolai Kosjar
e6d16b6747 ClangTools: Support loading exported diagnostics
Add a new toolbar button to load diagnostics exported with

   $ clang-tidy -export-fixes=/path/to/file
   $ clazy-standalone -export-fixes=/path/to/file (master version)

Change-Id: I8316fe0706a18222e68220ef4fbfdc7ae8d09804
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-09-03 09:39:48 +00:00
Sona Kurazyan
82bcf4e9f5 Remove usages of deprecated APIs
Replaced:
  QPalette::ColorRole::Background -> QPalette::ColorRole::Window
  QPalette::ColorRole::Foreground -> QPalette::ColorRole::WindowText
  Qt::ItemDataRole::TextColorRole -> Qt::ItemDataRole::ForegroundRole
  QFontMetrics::width() -> QFontMetrics::horizontalAdvance()

Task-number: QTBUG-76491
Change-Id: I1302e6b569e725daa6f7be1428ffe055657fc644
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-09-03 09:15:30 +00:00
Sona Kurazyan
6f4aa0458c Remove usages of deprecated APIs (part 2)
Replace the uses of deprecated APIs listed below, while keeping in mind
that compatibility with Qt 5.12 (the latest LTS) must be kept. This
means that the new alternatives must be used only when compiling with
Qt versions where the replacement is available.

Replaced:
  QLineF::intersect() -> QLine::intersects() (since 5.14)
  QComboBox::activated() -> QComboBox::textActivated() (since 5.14)
  QWheelEvent::pos() -> QWheelEvent::position() (since 5.14)
  QList::swap() -> QList::swapItemsAt() (since 5.13)

Task-number: QTBUG-76491
Change-Id: I62adc4f0826607b0156bf4bc5648ffb0e41cd895
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-09-03 09:15:24 +00:00
hjk
d39d26a54f iOS: Avoid use of RunControl::runConfiguration() in QmlProfiler support
Change-Id: Id296ddb364c7503506e32c01d594cdca15715859
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-09-03 09:10:46 +00:00
hjk
524a1f431c QmlProfiler: Use standard setup for runner setup
Code-wise no immediate advantage, but removes the need for the
unusual 'started' signal.

Change-Id: Ie1d99127e8fe1561c35e035894ee5dd4639d3f12
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2019-09-03 07:09:05 +00:00
Eike Ziller
d9d18ee393 CMake build: Add some more feature info
About script Locator filter and helpviewer backends

Change-Id: If371ff824d16715f16ec9b245f42efe0d506c665
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-09-03 07:05:27 +00:00
Cristian Adam
05ce7a6774 CMake build: Build fix for automoc compilation failure
Compiler (MSVC, MinGW) got confused while trying to compile automoc's code
generated files for autotest/quick/quicktestparser.h

Autotest::TestTreeItem moved from Autotest::Internal::TestTreeItem, but
a few forward declarations remained in Autotest::Internal, which
resulted in errors like:

error C2555: overriding virtual function return type differs and is not
covariant

Side effect of commit 03b80025a9

Change-Id: I6e12526abc7e8f8a9562e7f2502e070e379117f4
Reviewed-by: hjk <hjk@qt.io>
2019-09-03 06:59:31 +00:00
Eike Ziller
4b8ec5ffb7 Help: Fix rendering images with litehtml
Creating the document parses it, which also populates the pixmap cache,
so we may not clear the pixmap cache afterwards.

Change-Id: I1e6d1669db898b1e50d59d135e52807afb307d09
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2019-09-02 15:18:15 +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
hjk
11badef44e QmlProfiler: Work around incomplete setup
Amends 3844f59806.

Some

    RunControl::registerWorkerCreator(ProjectExplorer::Constants::QML_PROFILER_RUN_MODE,
                                      [this](RunControl *runControl) {
        auto runner = new QmlProfilerRunner(runControl);
        connect(runner, &QmlProfilerRunner::starting,
                &d->m_profilerTool, &QmlProfilerTool::finalizeRunControl);
        return runner;
  });

hunk disappeared. This here has the same effect.

Change-Id: Ib81a78944145cc2075bfcb931691adf214f3560d
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2019-09-02 13:04:50 +00:00
Sona Kurazyan
66435024a4 Replace the deprecated QWheelEvent::delta() -> QWheelEvent::angleDelta()
Replaced the usages of deprecated QWheelEvent::delta() with
QWheelEvent::angleDelta().y(), assuming that it's acceptable to use only the
vertical component of angle delta.

Task-number: QTBUG-76491
Change-Id: I4aa0a5a0e9ba7f33321bdb879b66ffb589b53e42
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-09-02 13:01:30 +00:00
Sona Kurazyan
8e31932c29 Remove usages of deprecated APIs of QLayout
Replaced:
  QLayout::setMargin() -> QLayout::setContentsMargins()
  QLayout::margin() -> QLayout::getContentsMargins()

Task-number: QTBUG-76491
Change-Id: If28ef6910b3afe5d04e4746b74f9362a3e3b3c8e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-09-02 13:01:07 +00:00
hjk
228f5fc319 iOS: Remove unused IosRunConfiguratoin::profilePath() declaration
Probably unused since the invention of buildKey().

Change-Id: I1bddd5f790e6dfdd509fd47bc5f5209cbaac091c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-09-02 12:17:31 +00:00
hjk
e3184cfd6d Debugger: Inline/Remove rarely used argument handling
Change-Id: Ibe97f3e406a4fc01569aa8e1325531ce4764adca
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-09-02 11:16:45 +00:00
hjk
ee23dcba23 Debugger: Move toFileInProject to QmlEngine
The only user.

Change-Id: I443cbfab20739fb43a45848355110f879b0f3041
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-09-02 11:09:17 +00:00
Eike Ziller
6ad670a980 AutoTest: Remove bogus forward declaration
Change-Id: I1fa61786357840a05388797bc21ab106fcb9d60f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-09-02 10:41:06 +00:00
Nikolai Kosjar
6e0697cb58 AutoTest: Fix endless timer timeout
Change-Id: I6222e9b2102e5cc65b940c25ac0c877c07a48462
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-09-02 10:26:19 +00:00
hjk
2399e4476b QmlProfiler: Reduce code size for feature menu setup
Change-Id: Ied31be4c880f2e38935830e35afb20435d7f74b2
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2019-09-02 10:10:33 +00:00
Tim Jenssen
a34d84fa4d QmlDesigner: small file path fixes
- add missing path separator
- add missing bracket add save file name dialog file filter

Change-Id: I45b1893f4d10cf5b030883a4dcd73d97a4a863b2
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2019-09-02 09:51:42 +00:00
Tobias Hunger
8bfe0da2f7 Ios: Silence warnings about unnecessary ';'
Change-Id: Ie77d1f49da7eaf970a508f316034741b5d7b94b7
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-09-02 09:35:36 +00:00
Christian Stenger
265498cadc AutoTest: De-noise code a bit
Change-Id: I4585ebfb53623221c713ab0e8e254ba59a4e5920
Reviewed-by: hjk <hjk@qt.io>
2019-09-02 09:04:28 +00:00
Christian Stenger
03b80025a9 AutoTest: Shuffle namespaces for clearer separation
Change-Id: I6ac440c6d72c3d0dbcd75907f8a6ae756f3cf5ee
Reviewed-by: hjk <hjk@qt.io>
2019-09-02 09:04:16 +00:00
Christian Stenger
df93c6c5a7 AutoTest: Pimpl plugin
Change-Id: I36c1ec242e29b9d06c1c2304960b445833fb9ebb
Reviewed-by: hjk <hjk@qt.io>
2019-09-02 09:04:01 +00:00
Christian Stenger
d12f90047a AutoTest: Allow run after build per project
It might make more sense to be able to enable this
per project instead of globally.

Task-number: QTCREATORBUG-16704
Change-Id: I2e29d3af62c428bcbb534b72b5eb13f1fbd83973
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-09-02 07:08:50 +00:00
Christian Stenger
51382a846d AutoTest: Add automatic run after build
Add an option to automatically run tests if the build
succeeded and the current project has tests.

Change-Id: I1fe028be84279b9b488f78590565c6d4b0449e34
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2019-09-02 07:08:38 +00:00
Christian Stenger
43e27f76b3 AutoTest: Add project based {en|dis}abling of test frameworks
Provide integration into the 'Project' view which allows to set
some settings on a per project base.
For now only enabling or disabling of test frameworks.

Task-number: QTCREATORBUG-16704
Change-Id: Iedd9a300164931e07a21cbb4e5a222be3266c81e
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-09-02 05:49:52 +00:00
hjk
edcd955aad QmlProfiler: Remove some dead code
Change-Id: I5f13797044e2c80d4a651bb91bf6e722552566f6
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2019-08-30 15:50:21 +00:00
Thomas Hartmann
27d82a1758 QmlDesigner: Cleanup checks
This patch consolidates the checks we do in the callbacks.

Task-number: QDS-1029
Change-Id: I64adb399ebd3ccd939d4412bee3c0e78290dabac
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-08-30 15:02:48 +00:00
Tobias Hunger
ac8fe14508 Ios: Fix spelling in id
Change-Id: I96b4a19615560c5d22afca9f07ae715e7ff4e646
Reviewed-by: hjk <hjk@qt.io>
2019-08-30 14:31:54 +00:00
hjk
7cd3bda4c0 iOS: Fix/add RunWorker ids
Easier to debug worker setup errors.

Change-Id: I1d050c715488db2bcce323f4efcd9808d1770eaa
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-08-30 12:25:53 +00:00
Milian Wolff
5f494e2e0c Fix CMake build by adding missing library dependencies
This patch fixes the following compile errors when using CMake:

lib/qtcreator/libSqlite.so.4.10.82: error: undefined reference to 'dlerror'
lib/qtcreator/libSqlite.so.4.10.82: error: undefined reference to 'pthread_join'
lib/qtcreator/libSqlite.so.4.10.82: error: undefined reference to 'pthread_mutexattr_settype'
lib/qtcreator/libSqlite.so.4.10.82: error: undefined reference to 'pthread_mutexattr_init'
lib/qtcreator/libSqlite.so.4.10.82: error: undefined reference to 'dlopen'
lib/qtcreator/libSqlite.so.4.10.82: error: undefined reference to 'dlsym'
lib/qtcreator/libSqlite.so.4.10.82: error: undefined reference to 'dlclose'
lib/qtcreator/libSqlite.so.4.10.82: error: undefined reference to 'pthread_mutex_trylock'
lib/qtcreator/libSqlite.so.4.10.82: error: undefined reference to 'pthread_mutexattr_destroy'
lib/qtcreator/libClangSupport.so.4.10.82: error: undefined reference to 'pthread_create'

Change-Id: I7bf4a9f173622c36ac3ea0c7bde5a0999e9b0edf
Reviewed-by: Tim Henning <tim.henning@kdab.com>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-08-30 12:19:12 +00:00
hjk
ee98d3a0a8 Nim: Work around deprecation warning
Amends 67349baded.

Change-Id: Id1e7c455932c8cbf6f89601502a8c3ef049d2d6f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-08-30 11:28:41 +00:00
Eike Ziller
0f8aa10df1 CMake build: Add missing script
Change-Id: Id22c29368adec84854a2d9d67fee36417e59e43b
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-08-30 11:27:42 +00:00
hjk
3d954477a4 QtSupport: Move qtSoPaths from Android
Also add QT_INSTALL_IMPORTS, which is used in a so-called "copy" of
the code in the QtApplicationManager plugin. More is better in this
case.

Change-Id: Ie705d95a24664d3627875ee0463e83a13b830260
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-08-30 11:21:52 +00:00
hjk
eec6fbe61a ProjectExplorer: Remove traces of previous attempt
... to access runconfig aspect data in a generic way from the
runcontrol.

The plan is now to use a Kit-style variant map with some
helper functions for type-safe(r) access.

Change-Id: Ia3855758be3fce4efd423b83f185d0df88d266f3
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-08-30 11:20:44 +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
Christian Kandeler
8b4344f2a2 ProjectExplorer: When running in the terminal on macOS, make it close
... after the application has finished and the user pressed the return
key as requested.

Fixes: QTCREATORBUG-15138
Change-Id: Id5b9fce553eb96b10aa76ccbd87fb66f02218110
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-08-30 08:55:38 +00:00
Christian Kandeler
5f845a02cd FancyLineEdit: Make completers triggerable via Ctrl+Space
In particular, this allows to trigger the completer without providing a
leading character, thus showing all history entries.

Task-number: QTCREATORBUG-17891
Change-Id: I8ae900d196de2e5083a626faa757648637b325ae
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-08-30 08:53:20 +00:00
Nikolai Kosjar
0ba729e527 Import YAML-Parser yaml-cpp
Version: tags/yaml-cpp-0.6.2
  License: MIT

yaml-cpp requires c++11 and since yaml-cpp 0.6 there is no dependency on
boost anymore.

A YAML parser is needed for the ClangTools plugin to parse exported
diagnostics from clang-tidy/clazy:

  $ clang-tidy -export-fixes=/tmp/tidy.yaml source.cpp

The imported source is stripped of unneeded files as documented with

  src/libs/3rdparty/yaml-cpp/patches/0001-yaml-cpp-Strip-unneeded-sources.patch
  (generated with "git format-patch -D")

Change-Id: Ib0a521b5aff4b1cd058eb480bfb99fde4b320dc7
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-08-30 08:42:22 +00:00
hjk
d663b8e406 Android: Avoid a direct use of RunControl::runConfiguration()
Change-Id: Ib9b6533bb00446107150946c431b31cdc601a2da
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2019-08-30 08:15:38 +00:00
hjk
335ea0c831 iOS: Avoid double-indirection between DeviceTypeAspect and run config
No need to leave the aspect context.

Change-Id: I96a93f7c85d8bbb1fdc28352a4c70a29bc510e4c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-08-30 07:11:45 +00:00
hjk
c343d98215 CMakeProjectManager: Work around deprecation warning
Change-Id: I2e2281395ca030ba76334fba8a574c145bc1dbf5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-08-30 07:07:10 +00:00
Tim Jenssen
b77bce63e3 QmlDesigner: add a generate resource menu entry
The result can be used with the Webassembly qmlprojector.

Change-Id: I69ed21561c05fcbb9552bf74217e3546c489d4a6
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2019-08-29 14:40:23 +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
Tim Henning
41361047b4 Tracing: Add hasMixedTypesInExpandedState property to TimelineModel
If the property is true, it disables the functionality to select the
type of row by clicking on the row label.
This is required by the CtfVisualizer plugin that shows more than one
type of events per row in the expanded state which would make the above
mentioned functionality meaningless.
This change doesn't change the current default behavior.

Change-Id: I20d42404a4cd3c9142bf0b59b57f4de083be07f3
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2019-08-29 13:36:52 +00:00
The Qt Project
96ecbf363c Merge "Merge remote-tracking branch 'origin/4.10'" 2019-08-29 11:09:16 +00:00
Ulf Hermann
8e60467d8b Update perfparser to latest master
Change-Id: I5a7c68168b5e76c2da32a42f6e840ce1a6ae7fb9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-08-29 10:25:11 +00:00
David Schulz
587dc52119 Editor: accept common text edit short cut override events
see QWidgetTextControl::processEvent and
QInputControl::isCommonTextEditShortcut. This will break assigning
shortcuts to for example Shift+a.

Change-Id: I4f97c27a47e2a7a44bf06b3ca949a6de74d4bb64
Fixes: QTCREATORBUG-22854
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-08-29 08:12:48 +00:00
Tim Jenssen
8463ade7e0 Merge remote-tracking branch 'origin/4.10'
Change-Id: I82fe9d3d37081cfca2c3408984279ed944ffe807
2019-08-29 10:06:26 +02:00
Christian Kandeler
5d706eff7e QmlDesigner: Fix warnings about unused functions
Change-Id: I5dd9619dd4cc8c17bac9f824cb56d39b0fa5c6b4
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-08-29 07:54:09 +00:00