Commit Graph

57165 Commits

Author SHA1 Message Date
Vikas Pachdha
5cd1bb6f73 iOS: Fix incorrect device type in run configuration
Task-number: QTCREATORBUG-20413
Change-Id: I5b96273161401e83567da80770f0f1c3482b7311
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-05-16 07:08:27 +00:00
Vikas Pachdha
23ac1d18e1 Android: Fix the android include path
Task-number: QTCREATORBUG-20340
Change-Id: Ie1d7c15bf8b38b5141868149684e026ba9666630
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-05-16 06:37:57 +00:00
hjk
1773b4d8b5 CPlusPlus: Fix some crash
Change-Id: I8b98d86e7d5321e2420d388abba159474d7ad799
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-05-16 06:36:37 +00:00
Thomas Hartmann
5912a93fd5 QmlDesigner: Disable shortcut if document did not change
Change-Id: I95f67379d507ab599d2435cc042f96fc28d8d7cd
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2018-05-15 15:26:50 +00:00
Sergey Morozov
57edd22d11 AutoTest: Add action to run all tests from current file
Run specific test functions since one test case can be implemented in multiple files.

Task-number: QTCREATORBUG-20329
Change-Id: I07f435c264f18e9608caa5b7ee20dff2d33ee9c0
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-05-15 14:41:53 +00:00
Ulf Hermann
f7895e272b QML Debugger: Don't hang if there are no scopes to be retrieved
Qt 5.11.0 contains an optimization that does away with call contexts for
simple inline bindings. Also, it doesn't report QML contexts as scopes
in the "frame" and "backtrace" commands. Therefore, in those cases
"this" is the only thing to be retrieved.

Check if we are done when "this" has been retrieved and no scopes have
been found.

Change-Id: I9e0f545777bc38333938b65a934d42701ec4f807
Task-number: QTBUG-68218
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2018-05-15 13:31:01 +00:00
Nikolai Kosjar
887a0538cd CppTools: Allow filtering issues with line edit
...matching diagnostic text/description. Child items are excluded.

Change-Id: Ie7c50af59e0836f60b2ca3bbe50b11eb19398c61
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-05-15 13:29:53 +00:00
Christian Stenger
e3fb057397 Valgrind: Add clear button to callgrind tool
Callgrind runs can spread TextMarks across files. Only way to
get rid of them would be to start a new analyze and stop it
before it can add new TextMarks.
Be user-friendly and allow clearing the data including the
TextMarks explicitly.

Change-Id: If8d5c5f789414709a110249377ce907466c0fdf1
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2018-05-15 12:03:57 +00:00
hjk
a86eda329e Qnx: Fix persisting of deploy steps
While the deploy steps re-used from RemoteLinux were created ok when
creating a new QnxDeployConfiguration, they did not survive a restart
(or rather a toMap/fromMap cycle, as the restoring insisted on having
a RemoteLinuxDeployConfiguration).

Since sharing DeployConfiguration*Factory*s is not yet possible, this
patch here creates additional DeployConfigurationFactories creating the
same steps, but insisting on a QnxDeployConfiguration parent.

Task-number: QTCREATORBUG-20248
Change-Id: I70666f79993a1332cd1959ab5e3665797d2401ca
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-05-15 11:25:38 +00:00
hjk
0031dbb667 Android: Remove AndroidRunnable::intentName
It was only uses to pass the intent from the Runner to the RunnerWorker,
use a normal stand-alone QString member and setter instead.

Change-Id: I0fde87b0177d4ed013f9599600929070362ea09c
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2018-05-15 10:36:48 +00:00
hjk
2d13e94f5b Android: Remove AndroidRunnable::environment()
Not used.

Change-Id: I7741f9ddb22ec472cfd31762e54832fae10db659
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2018-05-15 10:22:35 +00:00
David Schulz
e18001ad89 AutoTest: Prevent possible nullptr access
... by making sure TestConfiguration::outputReader always return a valid
output reader.

Change-Id: I6606b1fcfb632d0fb9a68dc0b4a149f74f539100
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-05-15 08:17:38 +00:00
Nikolai Kosjar
9b74948a61 ClangTools: Allow selecting diagnostic config for project
When starting the Clazy/Tidy tool, allow to select the diagnostic
configuration for the run.

As a side effect, fix a race condition where the runner could end up
with no diagnostic config (removed during run) - copy the diagnostic
config instead of referencing/querying it by the id.

Change-Id: Iedafa8f31a3bbd233d65818fe8de16add1e4d443
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-05-15 07:26:22 +00:00
Ulf Hermann
2522275b69 Tracing: Untangle some includes
Forward declare in the header and include in the implementation where
possible.

Change-Id: Iea54f52fbf1deecab5f5a257821cd6383cf69a91
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-05-15 07:20:41 +00:00
Christian Stenger
e5e493c291 AutoTest: Fix construction of results tree
Set an appropriate identifier for the output reader
to ensure that children are correctly appended to their
parents.

Change-Id: Id51c16fdd2e50e1ba11d7fbd1f7abbef386bdae0
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-05-15 05:28:49 +00:00
Christian Stenger
78bd3f9ec3 AutoTest: Rename results executable
Rename member to better reflect its meaning. It is used
as an identifier and might be something else than an
executable.

Change-Id: I082e3caaa3d94fcd7ab26ebc43bb0eb6da136d57
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-05-15 05:28:45 +00:00
hjk
1f3381a3c2 ProjectExplorer: Create a RunWorkerFactory class
This paddles back a bit on the RunWorker creation setup mainly
to get a more flexible setup when it comes to share RunWorkers
between different setups.

Change-Id: I263742cb1df3689f133a2f6f948ed59a2a52d383
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-05-14 16:47:20 +00:00
Alessandro Portale
7b3ed7799d QmlDesigner: Use a less expensive QColor constructor
Change-Id: Ib49bd177cc8106c3995401e93f816a4ec052b4e7
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2018-05-14 16:04:31 +00:00
Ivan Donchevskii
5288f35523 Clang: Enable Clazy fix-its
Only extra command-line options were required.

Change-Id: Id67b0cb29db4539ebec7facd07b53942f5900099
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-05-14 13:31:52 +00:00
Christian Stenger
2653cb229c Utils: Fix manual usage of PathChooser
When manually typing inside a PathChooser that expects an
existing command it was no more possible to type a trailing
slash without tricking the PathChooser.

Change-Id: Ie30e7b0de030f4a3d64fce89ed799c03a594261d
Reviewed-by: hjk <hjk@qt.io>
2018-05-14 13:07:25 +00:00
Ivan Donchevskii
d5ffac83e7 ExtensionSystem: Forward setEnabledBySettings to PluginSpec
Private part of PluginSpec is not accessible from plugins.

Change-Id: Id5b8099777b58895b37b5a57c65ecc11a5228143
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-05-14 12:50:46 +00:00
Andre Hartmann
607a3dd678 QtOutputFormatter: Handle QML output with braces
For example the function f:

function f()
{
    console.assert(false, "console.assert() did not pass");
}

gives the following output:

  console.assert() did not pass
  f (qrc:/main.qml:19)
  onClicked (qrc:/main.qml:14)

which was not handled correctly previously because of the
closing brace.

Task-number: QTCREATORBUG-20406
Change-Id: I0d63393027cfdb72629007bd9b273b5bb83d392f
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-05-14 09:57:42 +00:00
Nikolai Kosjar
20d2d76824 Clang: Do not flash issues pane when switching editor
Previously, when swichting to a file with errors, the Issues pane button
would flash.

Stop this for the clang code model issues as it is rather annoying since
the issues pane is updated for the current document.

Change-Id: I403a8b8cd0deef586c53769d0b646855a7fc9278
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-05-14 09:32:28 +00:00
Nikolai Kosjar
6afd9ecaf3 Clang: Improve diagnostic tooltips for tidy/clazy
Introduce the header for tidy/clazy issues showing "Clang-Tidy Issue" / "Clazy
Issue" and the option that led to the warning, as for normal clang
diagnostics.

Having that, chop off the option in the text to avoid redundancy.

Change-Id: I30a87dc739faa38c51d9e1fb5b9dfc7ffb7055c5
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-05-14 09:32:09 +00:00
Ivan Donchevskii
53d7906061 CppTools: Merge diagnostic selection widgets together
QComboBox, QLabel and QPushButton are always used
together. Therefore it makes sense to put them in one
custom widget.

Change-Id: Ie21675530fbadd7071f2a362567dadb6f09bb68d
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-05-14 09:05:37 +00:00
Nikolai Kosjar
f46fb39f3c Clang: Reduce diagnostic visualization for non-project files further
We already avoided showing inline annotations for diagnostics in
non-project files. But given many diagnostics the visualization is still
quite noisy. E.g. consider opening not self-contained header files or
files for which we do not have any project open, as it can happen if the
debugger jumps to such a file.

So leave only the text mark icon on the left and avoid all the rest:
underlines and refactoring icons in the editor, marks in the scrollbar
and task hub issues.

Change-Id: I05245981b21b38be650489a006593922dcb6896d
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-05-14 09:04:42 +00:00
Eike Ziller
1fce7ff4f5 Fix code signature on macOS
We build packages with extra debug info, but sign the application before
removing the debug info for the release package.
We have to codesign (potentially again) between copying and packaging.

Task-number: QTCREATORBUG-20370
Change-Id: I5549ca5045eb995e5a61794473c2d0180b778711
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2018-05-14 08:48:30 +00:00
Christian Kandeler
ae26a16a85 QbsProjectManager: Fix the "Enable QML debugging" checkbox
Once it was enabled, the value passed to qbs would never get reset.

Task-number: QTCREATORBUG-20377
Change-Id: I366cba77ef56d81dcdaf619c697c60396eeec651
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-05-14 08:36:30 +00:00
Eike Ziller
e7123b140e Merge remote-tracking branch 'origin/4.7'
Change-Id: I9d433fa6ce4f60a2acfbdb21da9f727cac8d7526
2018-05-14 09:52:58 +02:00
Eike Ziller
2278ebed1e Merge remote-tracking branch 'origin/4.6' into 4.7
Conflicts:
	qbs/modules/qtc/qtc.qbs
	qtcreator.pri
	src/plugins/clangstaticanalyzer/clangstaticanalyzerruncontrol.cpp

Change-Id: I873a2fa112321225e7b478739fc017b01d24ce18
2018-05-14 09:44:43 +02:00
Ivan Donchevskii
f6d1d5b41e CppTools: Change QComboBox in diagnostic settings to QListWidget
ComboBox gives an impression of selecting one of
the entries which is not the case for this widget.

Change-Id: I83f94def7553d4ceaec5ba957765f4494dc3d610
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-05-14 07:03:29 +00:00
Ivan Donchevskii
92fdbdc404 ClangTools: Use separate diagnostic settings for ClangTools
Share diagnostic configuration profiles between
ClangTools and ClangCodeModel but keep the unique
configuration index for each of them.

Change-Id: I86d95f7f220e929d60a53f3633167adfcd62a2da
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-05-14 07:03:04 +00:00
Ivan Donchevskii
3737b6a124 CppTools: Split diagnostic settings and selection
Now selection is only consists of combobox and
a "Manage" button to diagnostic configurations.
Diagnostic configurations are moved to the modal dialog
which is shown by clicking the mentioned "Manage" button.

Change-Id: I607fb923c97e8730448548708f3aaf32ce1983c8
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-05-14 07:02:53 +00:00
Nikolai Kosjar
6b70c27e3b Clang: Do not show diagnostic category in inline annotations and issues pane
For build system diagnostics they are not displayed either.

Also, the error/warning is already encoded in the icon and the color.

However, the category is still shown in the tooltip.

Change-Id: I190ab17691c32786cefc20d058010c65cda5ace9
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-05-14 07:01:46 +00:00
Christian Stenger
851d56cda2 AutoTest: Fix debugging of QuickTests
When using XML as output for QuickTests we get a special
message coming from QmlDebug before the XML document and
we are failing when trying to handle this as XML.
Ignore this message if it occurs before we have read anything.

Change-Id: I090aa33079bff99468b8ecd1abeac7ee7e948314
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-05-14 05:58:52 +00:00
Tobias Hunger
63ef88d015 Utils: Consistently use nullptr
Fixed by clang-tidy modernize-use-nullptr.

Change-Id: I93edae67271a521e3b2a1f97f486e5fa97009836
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-05-13 19:53:14 +00:00
Tobias Hunger
ebf2d6f4e2 QtSupport: Consistently use nullptr
Fixed by clang-tidy modernize-use-nullptr.

Change-Id: I534c782f9ef047a307ef440335fd7fc0a7979e08
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-05-13 19:47:14 +00:00
Tobias Hunger
79aa48e9a4 QmakeProjectManager: Consistently use nullptr
Fixed by clang-tidy modernize-use-nullptr.

Change-Id: Ie03a95647d66b97782663b9ff87dbac595496326
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-05-13 19:45:06 +00:00
Tobias Hunger
07e67b2188 Utils: Use override consistently
clang-tidy fixes from modernize-use-override check.

Change-Id: I89d27f359b6ee507153cb3712f61f81471ff0858
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-05-13 19:42:50 +00:00
Christian Kandeler
b67db8bc22 QbsProjectManager: Don't turn on QML debugging in release mode
By default, that setting should not be enabled in release mode. That's
also how the QmakeProjectManager behaves.

Change-Id: Ifc5ed93b37b3f3f13ee19c5072f327794ea88144
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-05-11 15:55:14 +00:00
Ulf Hermann
86b368f912 QmlProfiler: Rename all the timeline model data structs to Item
This allows us to define a template for filling a
QmlProfilerTimelineModel without spelling out all the type names.

Change-Id: I97870287a795d95f58a949729afa715f145817bb
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-05-11 15:41:55 +00:00
Ulf Hermann
9685711cb3 QmlProfiler: Remove accepted() methods
The only place where we used them was handlesTypeId(), and there it was
wrong. Each QmlProfilerTimelineModel has exactly one main feature it
subscribes to. It might additionally accept events of some auxiliary
features for context, but it doesn't really "handle" the respective
types in the sense that you could, for example, attach notes to them.
Therefore, just checking for the main feature is the right thing to do.

Change-Id: If0c00444084b957f3b99d3456cdbf703ae4afc3d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-05-11 15:41:45 +00:00
Ulf Hermann
3ce528d6af Tracing: Simplify saving and loading
We don't need the success and canceled signals from TimelineTraceFile,
as the future produced by runAsync tells us when a job is finished or
canceled. Also, we can just create the QFile inside the runnable to save
some code.

Change-Id: I7d91c60c1f798077573712cf624243e9f5969fd6
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-05-11 15:41:03 +00:00
Orgad Shaneh
f615c9aa42 QmlDesigner: Remove outdated Qt version conditions
Change-Id: I7fa3147afbdc07814f8710a44140072e7bbd8511
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2018-05-11 12:41:20 +00:00
Nikolai Kosjar
1251eb87bb ClangTools: Go to location on enter/space
Change-Id: I865a445207bf161213761b607f1f447b79ef7359
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-05-11 12:18:31 +00:00
Nikolai Kosjar
23df884f4a ClangTools: Remove clang static analyzer
...since it's superseded by the tidy integration.

Change-Id: Idafa5e1fb5129b1af8e42231a664684d4b90821f
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-05-11 12:17:55 +00:00
Nikolai Kosjar
aa65c7e5f3 ClangTools: Fix build
Change-Id: Ifba563d37a81ce5bc5e009a673ec940b6ed59f02
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-05-11 12:15:50 +00:00
Nikolai Kosjar
5b5ff37b6f ClangTools: Add next/back buttons also for tidy/clazy
...copy/pasted from the static analyzer tool, which will vanish soon.

Change-Id: I33b6fb8519f9b84d0af3b5ca12c33d66d510c6bb
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-05-11 12:08:27 +00:00
Nikolai Kosjar
a10cd337c7 ClangTools: Rename some classes and files
...to some more generic names since they are not anymore specific to the
clang static analyzer.

 * ClangStaticAnalyzerDiagnosticView --> DiagnosticView
 * ClangStaticAnalyzerDiagnosticFilterModel --> DiagnosticFilterModel
 * ClangStaticAnalyzerPreconfiguredSesssionTest -->
    PreconfiguredSessionTests
 * clangstaticanalyzerprojectsettingswidget.* -->
   clangtoolsdiagnosticwidget.*

Change-Id: Ifd34f207d31dc24d6a97654aca76ff27b5025547
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-05-11 12:08:20 +00:00
Nikolai Kosjar
92ea3c93af ClangTools: Allow suppressing diagnostics for tidy/clazy
...copy/pasted from the static analyzer tool, which will vanish soon.

Change-Id: Ibbdd402b66af35b268896eff420bd1c6597d9ced
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-05-11 12:08:10 +00:00