Commit Graph

57165 Commits

Author SHA1 Message Date
Christian Stenger
f129ed9d96 AutoTest: Fix timeout handling
Qt5.5 introduced a hard limit of 5 minutes for the test
case run.
If the timeout configured inside the settings is higher
and the test case runs longer than the the internal
default the test would crash ignoring the timeout set
by the user. Qt5.6.1 fixed this by adding a capability
to raise this limit.
Handle the hard limit used inside QTest appropriate.

Task-number: QTCREATORBUG-20439
Change-Id: I33f1d9bce4e503be7175228dde50b4484e57d337
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-05-18 12:33:44 +00:00
Christian Stenger
a1a78c4c69 AutoTest: Redo running tests
Removing the event loop and the costly internal
infinite loop to reduce CPU load.
We need an event loop for on-the-fly processing
of the results, but the main event loop is good
enough for this. There is no need to add another
one.
There is also no need to put all this into an
asynchronous job as all of this happens
asynchronously anyway by using signals and slots.

Task-number: QTCREATORBUG-20439
Change-Id: I126bf0c1be3e49fd0dd477e161e4fe7a10a080c9
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-05-18 12:33:37 +00:00
Christian Stenger
2557e685e5 AutoTest: Extract code into function
Part of a later refactoring.

Change-Id: I8321b344ff333195905be68131aab508d1a87aee
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-05-18 10:29:13 +00:00
Christian Stenger
21974a4bcb AutoTest: Simplify internal function
...and silence a krazy2 warning.

Change-Id: I72efc50baa53f03250813cae646da0f7c07a83f5
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-05-18 10:28:49 +00:00
Tobias Hunger
10005e35b9 CMake: Report an error when project can not get parsed
Report an error when a project can not get parsed.

Change-Id: I659a5ffb465b4a2de39910b05e7eef2481b9ad70
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2018-05-18 09:11:30 +00:00
Eike Ziller
a2fe4087ff Rename files for QmakeMakeStep
Change-Id: Iff0f3f08fff7a5e25ed309891e54d3c02dbb8713
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-05-18 08:48:15 +00:00
Tobias Hunger
e8040081a6 ProjectExplorer: Don't register targets that are restored to empty state
Don't accept targets that get restored to an empty state. This un-confuses
the Projects page:-) Note that DeployConfigurations are not tested:
I see no use-case where a target with only a deploy configuration makes
any sense.

This can be triggered, e.g. by opening an existing cmake project after
making sure there are no more kits with cmake tool set up.

Change-Id: Iaf14f70e4e0d4206a88a08b47b0eccc666653f76
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-05-18 08:29:13 +00:00
Tobias Hunger
1bffb72417 ServerModeReader: Fix crash when filtering out known headers
Task-number: QTCREATORBUG-20412
Change-Id: I9e58b099ef002b3139576b15507f191e1c5a5ced
Reviewed-by: Jan Kundrát <jkt@kde.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-05-18 08:26:16 +00:00
Christian Kandeler
7252b50922 Fix qbs build
Amends 0db5f13dd1.

Change-Id: I1bfdc2f7f7ede8c4027fe345f15c62a9954bfb6d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-05-18 07:35:51 +00:00
Nikolai Kosjar
e844853a73 CppEditor: Preselect Project Parts / Header Paths in the inspector
Previously, the tab "Snapshot and Documents" was preselected. However,
in most cases, especially nowadays with the clang code model, the most
important information is the one about the project tabs - so preselect
that one instead.

Change-Id: I5738e27483ba4389b016c0f2518086bc03b8a8b7
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-05-18 06:30:57 +00:00
Nikolai Kosjar
73d908bf2b ClangTools: Disable fixits checkboxes for diagnostics without fixits
Change-Id: Ie65fad3acd2a84bbb7ecb40e05d3a43cf89be11f
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-05-18 06:28:12 +00:00
Nikolai Kosjar
f083293c31 ClangTools: Adapt button state to checked fixits
"Apply Fixits" is disabled by default and enabled as soon as some fixits
are checked by the user.

Change-Id: I7e1345512b206f52d1e8628705c81c6b34dfb9ba
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-05-18 06:28:07 +00:00
Thomas Hartmann
92103a25a3 QmlDesigner: Adjust some margins and sizes
Change-Id: I9c0530b9b108277781dc937bd97cc2b7f68de122
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2018-05-17 18:18:38 +00:00
Eike Ziller
2e8d1d00ae Use make step base for qmake projects
There are two differences that get introduced by this change:
- The configuration widget checks that there is a build configuration,
  but not if this build configuration is a QmakeBuildConfiguration. This
  should not matter, since Qmake is still the only supported project
  type for the qmake specific make step
- It removes the automaticallyAddedArguments(). As far as I can see this
  never had any effect anyhow, though. They were never actually added to
  the arguments.

Change-Id: I73be227a32117e462def38bdd040dbd7cbcc113f
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-05-17 14:19:46 +00:00
Eike Ziller
96959e93d8 Generic/Base make step: Improve details text
The new summary is similar to the one in the qmake make step, adding the
working directory to the summary text, and adding checks for tool chain
and build configuration etc.
Different to the qmake variant is that it doesn't restrict to any
particular build configuration type, and that it needs to show
allArguments() instead of just userArguments().

Change-Id: Ie79264267a2ce834a3d3ffe2e4c066786642adc1
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-05-17 14:19:31 +00:00
Nikolai Kosjar
319daa2612 Clang: Require LLVM/Clang >= 6.0.0
Adapt versions and tests, remove code assuming clang < 6.0.

Switch also to our custom repositories instead of dealing with patch
files.

LLVM/Clang 6 was released on 09 Mar 2018.

Task-number: QTCREATORBUG-18535
Task-number: QTCREATORBUG-18552
Change-Id: I0ec2c2f56265e161ae7cbb5b03e7b8a182ba6cc6
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-05-17 12:46:37 +00:00
Nikolai Kosjar
c49854f423 ClangTools: Fix build for Windows/qbs
Apparently qbs does not pull in the dependencies of the declared
dependencies.

Change-Id: Ib15b883462c74436403dcc56e69786ec3b7fb6dc
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-05-17 10:56:05 +00:00
Ulf Hermann
5763bd6995 Tracing: Correctly handle custom mininum row values
Change-Id: I3aa9ac116307f6e2c089399f7c1c40f4f0fc0ec1
Task-number: QTCREATORBUG-20433
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-05-17 08:00:48 +00:00
hjk
a5d987bb8a ProjectExplorer: Prepare RunWorkers for more flexible setups
A RunWorker can in theory (and will in practice) support several
run modes. Also, it has turned out to be beneficial to specify
restrictions on a fine grained level, so re-use the idea from
the RunConfigurationFactory etc. constraints setup here.

Creation of RunWorkerFactories can be made protected at some time.

Change-Id: I9e2a84abfd7377c5bf0bbe84e0c7940b1317dc10
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-05-17 07:08:12 +00:00
hjk
8580e32e88 ProjectExplorer: Start transferring RunWorkerFactory ownership
... to the plugins providing them.

To allow this being done one-by-one in the plugins, allow both
central and per-plugin ownership, and clean up the central instances
centrally. This step will be removed again once the transition
is complete.

Change-Id: Ica7786012e05ab83a0784448f2f8b3b781fe2167
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-05-17 07:05:59 +00:00
hjk
f2a5932674 Debugger: Remove a too strict error handling
There's seems to be the possibility to actually trigger the assert
this patch removes with MinGW and mixed debugging.

While the reason for that is not clear yet, there's no need to
force the debugger to abort. The observer wrong state was InferiorRunOk,
so just continuing on the selected path will do the right thing
(i.e. attempt to interrupt the debugged process)

Change-Id: I534cedd71522e73d5f1097ddd472efbeb3b4d97f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-05-17 05:59:41 +00:00
Jarek Kobus
df50dd7353 HighlightScrollBar: Always show the current line
Also when the scrollbar handle occupies the whole scrollbar area.

Change-Id: I124950e3f0898f853a187ea393731ddb0800aa99
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-05-17 05:57:50 +00:00
David Schulz
d4c7814e9e Utils: remove Clang from ClangCodeModel_*_TextMarkColor
They are also used by the qml code model, and may be used by additional
code models in the future.

Change-Id: If216cbeb7b77be0f3b6f31671c71d913206315cb
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-05-17 05:55:53 +00:00
hjk
f68f3c0112 ProjectExplorer: Remove unused BuildStepFactory::clone method
Change-Id: I559441a6160e288b647bdb45b759992df26227d1
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-05-16 13:16:41 +00:00
Eike Ziller
69d45b7371 Generic/Base make step: Add variable chooser
Variables are already supported, just the chooser was missing.

Change-Id: I3a0d64c6a954a8180a388b6dda8c94af11a6daba
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-05-16 13:12:54 +00:00
Eike Ziller
e073d23ea1 Generic/Base make step: Use path chooser for make command
Change-Id: Ib926305104379ae5af6e1a859e5e482711cb39e3
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-05-16 13:12:45 +00:00
Eike Ziller
032dd4a340 Add effectiveMakeCommand to MakeStep base
Similar to the make step from qmakeprojectmanager.
There is an internal semantic change when there is no C++ toolchain: Now
the effective make command will be empty in that case. Before this patch
it was defaulting to "make", but init() was never using that because it
also checks for an existing C++ toolchain, so there is no visible
change, and actually more consistent now.

Change-Id: I31157fee63c465b4b61701d76152f3ad172c29e8
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-05-16 13:12:38 +00:00
Thomas Hartmann
64c48933c8 QmlDesigner.PropertyEditor: Always set current model on context object
We just set the first model once.
This means that many functions only worked on the file that was
the first one opened.

This bug was undetected for some time, because the checks were silent.
Replacing all related checks by proper QTC_ASSERTs.

Change-Id: If46cb7fb7d0d3ae2bb9772a93eece5fcf1fe450b
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2018-05-16 12:49:10 +00:00
Eike Ziller
7adbdf050e QMake make step: Remove unused signal
User arguments could not change behind the configuration UI's back, so
no need to inform it about changes.

Change-Id: Id03d61c6f0b5abcd9bed50504a518554d08eae78
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-05-16 12:40:23 +00:00
Eike Ziller
0db5f13dd1 Move generic make step to project explorer
As a first step of creating a generic base for the 3 existing
implementations.

Change-Id: I2456db74cb635316f97a247e2a2b6bdb34931440
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-05-16 12:04:40 +00:00
Jarek Kobus
b2a1c189e0 DiffEditor: Keep horizontal scrollbar policy in sync
Task-number: QTCREATORBUG-14330
Change-Id: I4c45089f10a9b59cd1bc5b5368f14e0bb0738f22
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-05-16 11:59:47 +00:00
Alessandro Portale
850a35aae5 QtSupport: Improve the qtquickcompiler feature detection
Check for qtquickcompiler.prf instead of for the binary. That is
compatible with (commercial) Qt < 5.11 with the original
qtquickcompiler, and now additionally with Qt >= 5.11 with qmlcachegen.

Task-number: QTCREATORBUG-19993
Change-Id: Ie0ba30a590828f13b330a62acb9d1d5c84a5916b
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-05-16 11:39:14 +00:00
hjk
2dccf95e49 Android: Remove AndroidRunnable
Not used anymore.

Change-Id: Iad4fd894c389b310d11cac2fe49b96ded39b0677
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2018-05-16 11:28:56 +00:00
hjk
9ff7664ec2 Android: Add a key name constant for the package name
For later use in the GammaRay integration plugin.

Change-Id: Ib3221f4cc09c75d1d961792da07ac579848c3a7e
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2018-05-16 10:47:10 +00:00
Eike Ziller
01dd22dc08 Version bump for 4.8 beta
Change-Id: Ib61d6d6d6f2433299fe7867576a7c7d8558011ac
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-05-16 10:40:54 +00:00
hjk
130b08925d Android: Use packageName directly in AndroidRunnerWorker
That was the only remaining field of the AndroidRunnable, passing
the packageName as single string is sufficient.

Change-Id: I73333e58a0719df09d6905eb212007ce421f600e
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2018-05-16 10:34:01 +00:00
hjk
099f8c7e80 Android: Remove AndroidRunnable::{beforeStart,afterFinish}AdbCommands
We have nowadays two ways to pass data from run configurations to
tool that do not require intimate knowledge of the sender:

1. Using RunConfigurationAspects, accessible for all workers in a
   RunControl
2. Using RunWorker::recordData for an individual worker.

This removes the need to use specific fields in a runnable and
means that a tool plugin can be better separated from target plugins.

The approaches are not mutually exclusive, both use an string-ish
id, I chose here to use the same string when using both.

This patch here uses approach 2. for the GammaRay/Android combo.
It also fixes a (harmless) typo (s/POSTSTART/POSTFINISH).

Change-Id: I4048693ca73b17253a39bfcacc9e1880ecf25736
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2018-05-16 10:18:27 +00:00
David Schulz
33aaf36138 Utils: add hash function for MimeType
Change-Id: I4ba86887a4ed575e4aee0cbe1157254e8cd5abb8
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-05-16 09:51:42 +00:00
Eike Ziller
64d601def3 Merge remote-tracking branch 'origin/master' into 4.7
Change-Id: I1801c96cb7881092cbb7448aebe95c00de30d141
2018-05-16 10:38:30 +02:00
David Schulz
07d3f80b54 Utils: make nullopt_t available in the Utils namespace
Change-Id: I7e8084b4fce5cdda88435453e096ef0b9530d00d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-05-16 08:34:50 +00:00
David Schulz
d79c0ed575 Utils: add has_value to optional
Change-Id: I73af682c98d3fd9e97c169ffb3930950e2b0addb
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-05-16 08:34:33 +00:00
Eike Ziller
a0c02b50da Merge "Merge remote-tracking branch 'origin/4.7'" 2018-05-16 08:29:19 +00:00
hjk
6585edf143 Android: Pass RunWorker to AndroidRunnerWorker
The RunWorker will carry the amPreStart/amPostFinish commands later,
and the run control is still accessible via worker->runControl().

Change-Id: Ieac1a1d2a5a8689025a7707b218df44ef2485b16
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2018-05-16 08:22:38 +00:00
hjk
cf01d20f95 Android: Remove AndroidRunnable::amStartExtraArgs
It was only set up in AndroidRunner from the run configuration
and passed to AndroidRunnerWorker, instead get in in the
AndroidRunnerWorker from the run configuration directly.

Change-Id: I52fc793f07ca766a80a1b06f216f850da0b563ed
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2018-05-16 08:22:06 +00:00
Eike Ziller
3f2c8a55b1 Merge remote-tracking branch 'origin/4.7'
Change-Id: I0ef2f6ac30fb0c020e0f59d2a014d0dd3bab7d81
2018-05-16 10:18:40 +02:00
Eike Ziller
ccefc5cf47 Merge remote-tracking branch 'origin/4.6' into 4.7
Conflicts:
	src/plugins/qnx/qnxplugin.cpp

Change-Id: I8ede5fa9c8daf3001e41fcba7cbee68edb9db3a6
2018-05-16 10:09:15 +02:00
Nikolai Kosjar
7d97f4ce2d ClangTools: Make diagnostic config combo box use full width
Change-Id: Id3cca8f93e9abe74ce959d8c443cbb8840ba5866
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-05-16 07:20:47 +00:00
Nikolai Kosjar
e287a7c6dd CppTools: Remove unused function
Change-Id: Ida0def5702bf17551f6e51e2715cee36c768683e
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-05-16 07:16:43 +00:00
Nikolai Kosjar
5cb3c694fa ClangTools: Remove outdated TODO
Change-Id: I7c95c80147b948293bbd9484a4252323ab98dd2d
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-05-16 07:14:18 +00:00
Nikolai Kosjar
26b09af277 ClangTools: Allow applying fixits
Add a new column to the view that allows to check diagnostics with
fixits. The checked fixits can then be applied with the also new "Apply
Fixits" button in the toolbar.

Some corner cases are not yet handled:
 * File is open in editor
 * File changed in the mean time

Change-Id: I3d3f353a4150699a0d082f2a4348e331a4213bcf
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-05-16 07:10:39 +00:00