Commit Graph

57165 Commits

Author SHA1 Message Date
Nikolai Kosjar
de751e5b69 ClangTools: Move CSA's project settings into ClangToolsProjectSettings
Change-Id: I830c280e718aae416cd487eb5d02caf1e873f7c1
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-05-11 12:08:02 +00:00
Nikolai Kosjar
ba6f6f41d0 ClangTools: Preselect all files for first invocation
Change-Id: Iddc4f66bd35927161d2ad83234b099836a970281
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-05-11 12:07:55 +00:00
Nikolai Kosjar
947ea4a051 ClangTools: Remember selected files
Change-Id: I53227d0ada37b613b7312149bb8e7c15f6bf2bcc
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-05-11 12:07:48 +00:00
Ivan Donchevskii
fae0e18334 ClangTools: Fix ClangTools unit-tests
clangtidy_clazy project could not be built due to
the missing main().

Change-Id: I6a47658c51b1915e329559bff30f6578274cf1e9
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-05-11 11:30:04 +00:00
Nikolai Kosjar
1bc605d050 ClangTools: Prompt for files to analyze
If the run button is clicked, the user is prompted to select the files
for analysis.

Change-Id: I21e4ee6b7c14392a8c1a901ac7aa1c9c16e30f0d
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-05-11 10:48:53 +00:00
Orgad Shaneh
668e8262c7 QmlProfiler: Fix implicit fall-through
Detected by GCC8.

Change-Id: I59d55322eaef631163a56b619ffbf09671758caa
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-05-11 09:21:31 +00:00
Orgad Shaneh
ef528e1801 QmlProfiler: Avoid memcpy for non-POD object
Replace with assignments/memcpy for members.

Detected by GCC8.

Change-Id: I9866ea0215cf5d43b55ed10d21e4efa371315365
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-05-11 09:21:04 +00:00
hjk
52e0b47c3f Android: Flatten then AndroidRunnerWorker hierarchy again
The difference was the selection of findProcessPID vs
findProcessPIDPreNougat functions, done by a flag now
passed to and used inside a combined findProcessPID function.

Change-Id: I738cdac1a81302c2207f9bc3c74c7cf916ca4089
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2018-05-11 08:44:38 +00:00
hjk
3cfc715d7d Debugger: Try harder to find a usable device
In remote setups without proper run configuration (e.g. attach
using the menu) there was no device available. In some situation
there's access to a kit, though, containing the right device.
Use it.

Task-number: QTCREATORBUG-20331
Change-Id: I54523f71fc10c9959901f36f3d62872d139279e5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-05-11 07:56:33 +00:00
Eike Ziller
2c5e8e8d64 Support out of source support libraries
It was not possible to use QTC_LIB_DEPENDS if the library is not
in the Qt Creator source tree.
Provide a QTC_LIB_DIRS variable, similar to QTC_PLUGIN_DIRS.

Task-number: QTCREATORBUG-20382
Change-Id: I9120d221b6567f699881c0ad00d1f1e49ef3b920
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-05-09 13:16:14 +00:00
Nikolai Kosjar
5c8d49a3f6 ProjectExplorer: Split SelectableFilesModel into two classes
...for easier re-use.

Change-Id: I36a2788f628e99f0ca9b028844575c121dbc44c8
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-05-09 13:15:43 +00:00
Tobias Hunger
b6a4a7d5b1 Modeling: Use override consistently
clang-tidy fixes from modernize-use-override check.

Change-Id: Ie28a397afb27ada1b26a127828dccd623a2543bc
Reviewed-by: Jochen Becher <jochen_becher@gmx.de>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-05-09 12:31:41 +00:00
Tobias Hunger
b554c761fb CppTools: Consistently use nullptr
Fixed by clang-tidy modernize-use-nullptr.

Change-Id: I951627ba3543faa357f67ee76527518290efe3f1
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-05-09 12:15:01 +00:00
Tobias Hunger
fb71cac07b Android: Consistently use nullptr
Fixed by clang-tidy modernize-use-nullptr.

Change-Id: Ib0a73a06f6aea5284a93ee1e6c1b4411588a4ea1
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2018-05-09 12:14:46 +00:00
Tobias Hunger
7bd94b1db2 Android: Use override consistently
clang-tidy fixes from modernize-use-override check.

Change-Id: I06c9c0b27e178695328dc139a83203aec79528e4
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2018-05-09 12:14:21 +00:00
Christian Stenger
9ebfda4c03 PythonEditor: Fix history completer for interpreter
Change-Id: I14e67e585e06adc926b052b625701b3fbe7fca94
Reviewed-by: hjk <hjk@qt.io>
2018-05-09 12:01:28 +00:00
Christian Stenger
9d33acfe88 Core: Fix compile with MSVC2015
Change-Id: Iee38712c6bafe3f55e993ef7edaf94db47c7ccf8
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-05-09 11:59:48 +00:00
Vikas Pachdha
ee8b4f3512 Android: Do not deploy when missing build config
Fixes deployment on Android

Change-Id: Ie32407afc2151d7fdae62f69b4a1eecd1618da30
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-05-09 10:49:56 +00:00
hjk
ded34daa2b QmakeAndroid: Introduce two new functions in QmakeAndroidQtSupport
... and use them to remove direct dependency of the QmakeAndroidBuildApkStep
on qmake, so it can be merged into the base AndroidApkStep, leaving
less build system dependent code in the QmakeAndroid plugin.

Change-Id: Id7c6a9cb0e51d6b38850a0ad0e0e83a602f53338
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2018-05-09 10:36:37 +00:00
hjk
8e7c1bf1ab Android: Remove m_extraAppParams and m_extraEnvVars from Runnable
The idea was actually to make AndroidRunnable and "everything else",
i.e. StandardRunnable more similar over time to lessen the impact
of the "matrix" problem. The two removed items are avoidable.

Change-Id: I8ef011d76e2ad0154194ff5141ef8eb92cf235f3
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2018-05-09 09:27:37 +00:00
hjk
ba01d8729e Android: Remove m_deviceSerialNumber and m_apiLevel from Runnable
It's nothing that can be chosen freely, rather a feature of
the current setup/device.

Change-Id: I39460e22dab56adcce9da44f61a895923fb8c2a0
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2018-05-09 08:54:09 +00:00
Christian Stenger
9c1f47399e Squish: Stabilize selectFromLocator()
Calling it several times inside the same run results in
unexpected behavior. The list of items inside the Locator
gets filled asynchronously, so give it a chance to populate
before trying to click something.

Change-Id: I542a9fda37ae09e98e496d12a40d507a040bb247
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2018-05-09 08:51:15 +00:00
Robert Loehning
1ac527d8f6 Squish: Don't configure Windows firewall when we don't need to
Task-number: QTCREATORBUG-20316
Change-Id: Ibec253f15a39dc22ab8bd1693eab38b0ab7b44fb
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-05-09 08:46:39 +00:00
hjk
cf94c35f68 QmakeAndroid: Remove unused function declaration
QmakeAndroidBuildApkStep::setProFilePathForInputFile was declared
but not used.

Change-Id: I2314f4625c2babd6af3c9c0d0f52999972ae3194
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2018-05-09 08:15:05 +00:00
hjk
2487768388 Android: Make runconfiguration use aspects
Change-Id: I6d89de901e64b2f29d62073e458eb6cd86c44acd
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2018-05-09 08:14:02 +00:00
Christian Stenger
54d6e3ad7b Valgrind: Fix unit test
Change-Id: I270aaf2fd2b74a6d1ec067555a9f65ecbab2ffad
Reviewed-by: hjk <hjk@qt.io>
2018-05-09 07:13:34 +00:00
hjk
79ef359a6e QmakeAndroid: Remove androidpackageinstallationfactory.cpp
It was moved to Android base in 1f3ba4ce15 and apparently
not deleted here.

Change-Id: I0f16857873c98582e4f8ed3957f1a463512497df
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2018-05-09 07:05:11 +00:00
Vikas Pachdha
02c7e76762 Android: Fix memory leak
Delete the toolchain instance if not used

Change-Id: I213f11d6f5e9ab3ffa98641d0a774a19e11849b3
Reviewed-by: hjk <hjk@qt.io>
2018-05-09 06:39:48 +00:00
Alessandro Portale
768f0a6209 Core: Icon-only option for the mode selection bar
This adds an icon-only mode to the mode selection bar (and action bar).
A newly introduced Action can cycle between icon+text, icon-only and
hidden.
Also, the "Window" Application menu gets a submenu with the three
styles.

Task-number: QTCREATORBUG-18845
Change-Id: I4e0c453f6d920dfbfd795b8b054f6ff392a8700a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-05-09 06:00:27 +00:00
Orgad Shaneh
4e3fd9363a Modeling: Add a missing break
Detected by GCC8.

Change-Id: Id9a76b6b635350911008d77273424e6d28ef2f98
Reviewed-by: Jochen Becher <jochen_becher@gmx.de>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-05-08 20:29:20 +00:00
Tobias Hunger
904d6c1e6f QmlDesigner: Consistently use nullptr
Fixed by clang-tidy modernize-use-nullptr.

Change-Id: Ia2ba90d137365292e95ac340166ed5d1f66a2a56
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2018-05-08 18:20:16 +00:00
Ulf Hermann
916883e70f Tracing: Move event storage out of trace manager
This is a step toward making the trace manager non-virtual. It should
just juggle the storages for types and events, and manage the threads to
access them. It doesn't need to know what exactly it stores.

Change-Id: I45093c60d8ae921e68aeb09bd48d24d5877ce306
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-05-08 16:26:55 +00:00
hjk
e6d583913e iOS: Use run arguments more directly
This also treats the arguments list as an arguments list for running,
not as a single argument.

Change-Id: Ia95e02c6324947081147b8bf8084cdd3a7d1eaf0
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2018-05-08 16:18:02 +00:00
hjk
900cbf857b iOS: Remove RunConfigWidget base from IosRunConfigurationWidget
Despite its name, it's not the base for RunConfig (main) widgets, but
one for the "true" extra aspects (debugger, valgrind, perf, ...)

Change-Id: I45f3339ab2620fe4c55d77bd464f7770b51c30dd
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2018-05-08 16:17:11 +00:00
Ulf Hermann
6e0373adb3 Tracing: Move the type storage out of the trace manager
When we replay events we want to keep this constant and pass it to the
event receivers as separate entity. This way we can move the replaying
to a separate thread.

When loading we will have a similar situation, but then the loading
thread will create a new type storage and later assign that to the trace
manager.

Change-Id: I11402ed1e0663da6da5b61b15bba40e1a62adc4b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-05-08 16:11:25 +00:00
hjk
447befac61 iOS: Remove dependency on QmakeBuildConfiguration in run config
The base ProjectExplorer::BuildConfiguration carries enough information
nowadays.

Change-Id: Ia5ce243aef68a109e70809f385c2c2ce2f072c2a
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2018-05-08 16:01:02 +00:00
hjk
a67b1e97de Android: Merge run configuration into base class
The base AndroidRunConfiguration as such is buildsystem agnostic now,
it is, however not usable with other buildsystems as the apk build
step relies on qmake specific information, so the run configuration
factory stays on the buildsystem specific side for now.

Change-Id: I00538846028cc060aceea15ffd2e63068450f1e8
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2018-05-08 15:54:04 +00:00
Ulf Hermann
95d7be1b28 Tracing: Generalize event filtering
This allows us to not only filter by ranges, but potentially also by
other criteria.

Change-Id: I7349ceeabbb2781473a3a4c803dab1006b7b8e50
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-05-08 14:13:43 +00:00
Ulf Hermann
7e9b6f62c6 Tracing: Drop restricted start/end times from trace manager
The only thing we need is a flag for QML profiler to decide if it should
show the "full range" option.

Change-Id: I2437c44c2443d9389239e9af79d0672ee1cadbd2
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-05-08 14:04:39 +00:00
Ulf Hermann
4d8707afa4 Tracing: Don't restore notes for events that have been filtered out
Change-Id: I4dc13e579e7994bb970d121a2baa8169a8dd1b2b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-05-08 13:19:07 +00:00
Ulf Hermann
aa3c9fc135 Tracing: Make sure we cannot create a bare TraceEvent or TraceEventType
Copying only the TraceEvent part of, for example, a QmlEvent and then
casting it back to QmlEvent would be desastrous. In general the bare
TraceEvent and TraceEventType classes are meant as base classes for
concrete events.

Change-Id: Idd498af129344cd595750a07d17b8c43b6e00986
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-05-08 13:07:35 +00:00
hjk
4ca54d86ff Enhance IRunConfigurationAspect base interface
Move some commonly used functions to the base,

The plan is to identify aspects by Id instead of type more often,
so avoid casts proactively.

Change-Id: I1b94b858a4491a0e31cedc788ded643a82242b2a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-05-08 12:57:03 +00:00
hjk
736f7f89d1 Android: Hide process deleter a bit
This also avoid a spurious(?) code model warning about
"function 'deleter' is not needed and will not be emitted"

Change-Id: I76372866ec1a51b3adc350d83b8efcd497b02cb5
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2018-05-08 12:52:49 +00:00
Ivan Donchevskii
dd57d0b49d Core: Fix crash after second showOptionsDialog call
Do not destroy QEventLoop until it's exec() call
is over. Instead only call exit() for all loops
when the settings dialog is closed.

Change-Id: I9598270ee5f4d294ffcad9b45dda4543e15d63f0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-05-08 12:07:18 +00:00
Nikolai Kosjar
2dde82112e Clang: Fix -Wswitch warning regarding OverloadedOperator
gtest-creator-printing.cpp:493:12: warning: enumeration value
   'OverloadedOperator' not handled in switch [-Wswitch]

Change-Id: Ic28dcbcc402a8f5c0f2bd284cc9b6fd560221208
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-05-08 11:32:20 +00:00
Ivan Donchevskii
97fc02b247 ClangTools: Add settings for build project dependency
All Clang tools get support for running project build
before themselves or skipping that step.
Before this change static analyzer always ran it and
ClangTidy+Clazy tool always skipped.

Change-Id: Idb9fbc27f0589472abb0f9d207857eb79c0079fd
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-05-08 11:29:19 +00:00
hjk
c4e3cda26a Android: Remove traces of special debugger setup
Change-Id: Ibf85a6e6e7c025287dd388bc5908cefc30fbaa2f
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2018-05-08 09:56:09 +00:00
Robert Loehning
5a54a813d3 Squish: Remove code for querying information about Qt
Task-number: QTCREATORBUG-20337
Change-Id: Ib99d3bb45297b766ac1797a2a364350d96ce0056
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-05-08 09:06:02 +00:00
Robert Loehning
06c2e69301 Squish: Use Locator instead of menu hack
Change-Id: I4e84a52fb6ad4c93ef53bb1a17639fd8b263b987
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-05-08 09:05:25 +00:00
hjk
ce20bde99c ProjectExplorer: Pass id directly to BuildConfigurations
It's what the base class wants, and follows run and deploy precedence.

Change-Id: I26eff43337851702417e7e4284fc390b904060f6
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-05-08 08:13:00 +00:00