Commit Graph

66760 Commits

Author SHA1 Message Date
Christian Stenger
dba75f3d2c AutoTest: Improve matching test results to tree item
...when using Boost UTF. We need to take parameterized and
templated tests into account differently and we may have
results that do not provide file information at all, so try
to find a matching tree item from what we have got.

Change-Id: Ia0b1894d5dd729d39e5724d9fdeadd574a9cfde5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-09-25 12:35:27 +00:00
hjk
0d6e2454d6 Debugger: Fix enabling/disabling breakpoints
Fixes: QTCREATORBUG-24669
Change-Id: Id468f57df7978aab6b888d3a026c578b172f2f0e
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-09-25 11:28:32 +00:00
Christian Kandeler
4b8635052f OutputFormatter: Run line parsers also for empty lines
Empty lines can be relevant semantically, e.g. to mark the end of a
block of messages.
Amends 5cb74af166.

Change-Id: I31cb32dcbf6a69f03324e0d2c00f95547c994d85
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-09-25 10:03:15 +00:00
Cristian Adam
94008aa71e CMake: Fix compilation error when QmlPlugin is not built
Ammends 6fe11f80d6

Change-Id: Ifa909d8e2946c4fdd8e2a5301bab2686a615d89a
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2020-09-25 10:00:47 +00:00
Christian Kandeler
ac3337c557 Update perfparser submodule
Change-Id: Id9ecfc2f538fc9ccef55851fe6a4070c9918d51a
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-09-25 09:35:53 +00:00
hjk
d97c431a00 Utils: Add some documentation for LayoutBuilder and BaseAspect
... and some related classes and an enum.

This is not a complete documentation for all aspect classes.

Change-Id: I2d98aec012394cc4016e571884b861db7a498b1b
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2020-09-25 09:20:05 +00:00
Johanna Vanhatapio
1d60300446 Doc: Describe using Simulink plugin
Fixes: QDS-2606
Change-Id: I3c6e444b6817836b2bc5783cdbb43d86e485a2ad
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2020-09-25 08:44:49 +00:00
hjk
4efad1716f ProjectExplorer: BuildStepsPage code cosmetics
Superfluous declarations, includes, namespaces.

Change-Id: Ie456b1488b6563e9eadaa679b55d21eaad52f642
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-09-25 08:44:48 +00:00
Christian Stenger
b1af27d14a Squish: Fix handling of shared folders
If the respective option is omitted we should not
use all python files of the current working directory
as this may lead to bad side effects.

Change-Id: I23d3c97971e40ecbc4c585b7fd12b58953b0f623
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2020-09-25 06:13:37 +00:00
Thomas Hartmann
f1c9f8e628 QmlJS: Do not change strings referenced by QStringView
QStringRef is stable under reallocations of it's string()),
while QStringView is not.

This adds the missing changes from qtdeclarative 1b10ce6a08e.

Task-number: QDS-2825
Change-Id: I120a34153424ea514abaa783f1a617ef2f8b4cf4
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-09-24 16:00:54 +00:00
Michael Weghorn
0ab97e1159 Debugger: Show actual type for 'gchar *' elements etc
When 'char *' typedefs (and the like) are used, this makes
the actual (i.e. the typedef's) type name shown instead of the
one that the type is a typedef for.
For example, 'gchar' is shown as type for all elements of a 'gchar*'
when expanding that one in the debugger's locals or expressions view.

Original display of text representation for 'char *' typedefs etc.
had been added with commit 70c4889ac9
("Debugger: Show text representation for 'char *' typedefs etc",
2020-06-26). Move the typedef resolution one level down so the
original type name is still available for display.

This also extends the existing 'gchar *' test case accordingly.

Change-Id: I9558360b3bf96906d6dc39a63706bb8ce28c2f1c
Reviewed-by: hjk <hjk@qt.io>
2020-09-24 14:31:43 +00:00
Christian Kandeler
a0af404faa C++ unit test: Fix another line endings issue
Change-Id: Ib25055ac73c25fa27253c424efe60bfdaaafe219
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-09-24 13:40:51 +00:00
Michael Weghorn
37ebbeb3a0 Debugger: Extend Bitfields test for GDB case
* add bitfield case for char as well
* add tests for expressions view

Task-number: QTCREATORBUG-24693
Change-Id: I716dcd0eae3002401c891b733440ea2c6acb32ff
Reviewed-by: hjk <hjk@qt.io>
2020-09-24 13:11:56 +00:00
Michael Weghorn
d86cf5e235 Debugger: Retrieve and remember int from native GDB value
When adding expressions for bitfield members in the
debugger's expression view, their corresponding 'gdb.Value'
does not expose the fact that those are actually bitfields,
so e.g. an 'int : 3' is exposed like a "normal" 'int'.

Previously, this would result in wrong values being
retrieved in the 'DumperBase::Value::integer()' function,
when trying to read the value from the corresponding
memory address.

To avoid this, retrieve the actual int representation
for numeric values from the corresponding native 'gdb.Value',
remember them and return that one, similar to how it
is already done for known bitfield members
(s. 'Dumper::memberFromNativeFieldAndValue').

The conversion from the 'gdb.Value' does not work
for integers of a size larger than 64 bits
(like '__int128' used in the "Int128" dumper test).
Therefore, just ignore conversion failures and don't
remember any value explicitly for those cases,
so the same handling as previously used is applied.
(At a quick glance, the reason seems to be that this
is because GDB's corresponding functions use 'int64'
as a return value of the relevant functions [1] [2],
but I did not look closer into what GDB does
internally.)

Corresponding tests will be added in a separate commit.

[1] https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=gdbsupport/common-types.h;h=f5b2f3d249177acea77231c21c5601f959c18d2f;hb=f3034e25fa98d44b775970f40c9ec85eeae096e6#l33
[2] https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=gdb/python/py-value.c;h=6e29284aad11ff344789152a4f601b3474d86bb5;hb=f3034e25fa98d44b775970f40c9ec85eeae096e6#l1706

Fixes: QTCREATORBUG-24693
Change-Id: Idfc3390115e8796f3c778070c23424c3dbdfeddd
Reviewed-by: hjk <hjk@qt.io>
2020-09-24 13:11:47 +00:00
hjk
4327ddf6c5 Debugger: Use new TextMark interface for Breakpoint
Simplifies usage.

Change-Id: I0df50fe703b2b67ead7f2e35b3a3952fa6d91dab
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-09-24 13:06:59 +00:00
hjk
94df9822f9 TextEditor: Add a mechanism to provide dynamic icons and tooltips
... to TextMarks more easily by allowing callbacks in addition to
fixed values.

Change-Id: Ica9e7d54dd1a53a59dc11812857402d0b7594d6c
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-09-24 13:06:55 +00:00
Eike Ziller
cc502e3667 Remove bool return value from IEditor::restoreState()
It's never used, and actually there wouldn't be any sensible thing to do
with it.

Change-Id: Id8a8df18c7db4b98e5abbc034240bb90dc1dcaa9
Reviewed-by: hjk <hjk@qt.io>
2020-09-24 13:02:56 +00:00
Eike Ziller
415365dcc3 Fix ModeManager documentation after move of Id
Change-Id: Idd08616fa8e40703ec040152ec51a294ed9740c7
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2020-09-24 12:33:57 +00:00
hjk
3e732396e7 Debugger: Recognize QChar as simple type
This avoids creating individual child items when expanding a QString.

Change-Id: I49382dcf947ee7ac0470415a71ab05ede5f71b29
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-09-24 11:55:01 +00:00
Christian Stenger
479f6c8129 AutoTest: Fix handling of summary
Avoid overwriting already gathered results and handle
special cases like parameterized boost tests correctly.
Beside this take into account that fatals on the boost
side are treated as failures when printing the summary.
Amends 6ab7013579.

Change-Id: I3815f79cbb4d16fd7b3d286617d79b30e94ccdd8
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-09-24 11:39:17 +00:00
hjk
2cabd2ceb5 Utils: Consolidate LayoutBuilder interface a bit
- the var args template for addItems was overkill creating a lot of
  instantiations. Use a temporary list instead.
- allow default constructed LayoutItems to be used for an empty cell,
  avoiding the use of a QLabel with empty text
- add an addRow({...}) overload as convenience shortcut for
  .startNewRow().addItems({...}
- rename startNewRow() to finishRow()

Change-Id: I6d49dacbac3d7acf140ca526884ba1ceeeca2e0d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-09-24 10:32:26 +00:00
Christian Kandeler
5cb74af166 OutputFormatter: Prevent consecutive newlines from being ignored
Amends b0cad9e9c7.

Fixes: QTCREATORBUG-24668
Change-Id: I19a2ea71be91ded8f2c458537dae62a3021afe52
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2020-09-24 10:15:32 +00:00
Christian Stenger
7bba76d0ff AutoTest: Fix file path construction again
b74ec90 fixed the cmake part, but broke the rest.
Redo the file path construction to make it work with
qmake, qbs and cmake on Windows when using Catch2.

Change-Id: Ic41e015458ccf750421c29b1a200115c13db3ccf
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-09-24 10:08:42 +00:00
Eike Ziller
c74714da04 Remove parent argument from IEditor constructor
Editors are owned by whoever created them via the corresponding editor
factory, usually the EditorManager.

Change-Id: I4432eab1a3a8c38ce1bba6bb10b0f9273695a524
Reviewed-by: hjk <hjk@qt.io>
2020-09-24 09:10:37 +00:00
hjk
aff11855f7 Debugger: Update breakpoint marker tooltip on enable/disable
Change-Id: I5166e58f038afc373a7baae22b85f7d93e25a583
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-09-24 07:52:02 +00:00
Christian Stenger
0158dfcfd2 LSP: Do not use FullyEncoded in QUrl::toString
Change-Id: I8f978327a1d12f7d418a77ac4bc70b135142f989
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-09-24 06:00:05 +00:00
Christian Kandeler
f87a7bebe9 Debugger: Make decoding hex-encoded floats more robust
Apparently, the values are sometimes transmitted without leading zeroes,
so insert them if they are missing.
This fixes a crash in the QV4 dumper test.

Change-Id: I7434c9c090524eecbf5c50e69ad49f5a6ca81e1a
Reviewed-by: hjk <hjk@qt.io>
2020-09-23 16:09:42 +00:00
Christian Stenger
822aa7b242 Help: Fix linking on Windows
Amends bf536a0441.

Change-Id: Iad9172f5062640ec84debfb2ba3c307fe765c770
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-09-23 16:02:38 +00:00
hjk
361b5e3530 Utils: Determine shell from $SHELL instead of hard-coding /bin/sh
Fixes: QTCREATORBUG-24659
Change-Id: Icafc001b681cc76af76b8759a4de84db51146fd4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-09-23 15:55:55 +00:00
hjk
f7201c0c8f Debugger: Add leading zeros to transfer a hex-encoded float
Change-Id: Ie9d9159af67c0ef49cd133ec399d50909b853227
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-09-23 15:55:46 +00:00
Assam Boudjelthia
014b90f780 Android: Fix CMake parsing for Qt 6.0.0 kits
Qt for Android 6.0 with CMake requires QT_HOST_PATH to be provided for
CMake to properly parse and configure the project.

Fixes: QTCREATORBUG-24660
Change-Id: Id5d77f900698ef4d19ec8e37b14e4e3234c74ea4
Reviewed-by: hjk <hjk@qt.io>
2020-09-23 14:12:10 +00:00
Alessandro Portale
fb9a600704 GitHub Actions: Bump Qt version from 5.15.0 to 5.15.1
The Qt Creator 4.13.1 builds use Qt 5.15.1, as-well.

Change-Id: I6e4c8bfc464f624bd1ab9bc27b479fec6edaeca3
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-09-23 13:58:11 +00:00
Christian Kandeler
efa6f2ee4b Update perfparser submodule
Change-Id: I977c4ec9972806309cc3ed7d6cbe213aebb28620
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-09-23 13:30:39 +00:00
Alessandro Portale
570f72b8f9 ProjectExplorer: Document source of test data for testAbiOfBinary_data
Change-Id: I2e9b59d5ac99de0bbb9cf1f64210439e41f403af
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-09-23 12:02:36 +00:00
Alessandro Portale
a001944321 WebAssembly: Fix the missing auto-detected "C" toolchain
By not setting the toolchain language twice.

Change-Id: Id7058662047f451dcc524151aa5ff7cec854b9d3
Reviewed-by: hjk <hjk@qt.io>
2020-09-23 11:11:16 +00:00
Christian Kandeler
569d5ca4da C++ unit test: Another clang 11 adaptation
This was probably a bug in clang 10: The amount of whitespace after the
operator should not matter.

Change-Id: If161a7b2f60ee932bef19edb9fe71aac31be3c8b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-09-23 10:28:48 +00:00
hjk
cc16187444 ProjectExplorer: De-virtualize ToolChain::toolChainUpdated
Never overridden.

Change-Id: I16fc1ad4225ed4ccd869575046cd29396b1385cf
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-09-23 10:27:03 +00:00
hjk
4907ad090a Utils: Fix warning when destroying a grid-based LayoutBuilder
Change-Id: I816133b6b26ecaf546484b93dbc95666910f992a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-09-23 10:21:07 +00:00
Christian Kandeler
019af2cc9a C++ unit test: Adapt to clang 11
Change-Id: I3ea6278147577899ea97032e17f0cd257423586c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-09-23 09:13:47 +00:00
Christian Kandeler
34291fb639 ClangTools: Increase timeout for a unit test
This one can take quite some time even outside the CI.

Change-Id: I0d57d536fb23a1fec6d4cc8c0709fb699afdf9a2
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-09-23 09:13:20 +00:00
Christian Kandeler
9e5fc953da ProjectExplorer: Skip testAbiOfBinary() for missing files
Change-Id: I530b78d6b52244430a5b464372f2b43fbf131773
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-09-23 09:12:30 +00:00
Lars Knoll
7574004df1 Cleanup ProString::append/prepend
Don't use evil hacks that make assumptions
about QString internals.

(Cherry-picked from qtbase/c4dbd1c)

Change-Id: Ibc7ab78cba29a8a0ad458087def4aea2ed2786e4
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-09-23 09:11:24 +00:00
The Qt Project
b3161544fc Merge "Merge remote-tracking branch 'origin/4.13' into master" 2020-09-23 08:12:36 +00:00
Eike Ziller
423ea729f8 Merge remote-tracking branch 'origin/4.13' into master
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri
	src/plugins/mcusupport/mcusupportoptions.cpp

Change-Id: I3fd0d0a6a3ff30bb990da3dc0f78e69f9e1247ef
2020-09-23 10:11:44 +02:00
hjk
cec468d78a Utils/ProjectExplorer: Move re-usabled bits of aspects to Utils
Classes involved are BaseAspect and some derived classes,
LayoutBuilder and VariableChooser.

This is mostly mechanical, with various include/using changes
to make it compile.

Change-Id: I624a457f3555f102e541c4c71e33a9423af32250
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-09-23 07:44:42 +00:00
Christian Stenger
834cb8d114 QmlDesigner: Fix compile when building without Quick3D
Amends 31ec38dba5.

Change-Id: I33156223023b4077581375b9f28cc5633dfdcfdb
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2020-09-23 06:30:56 +00:00
Eike Ziller
bf536a0441 Make qlitehtml a dynamic library
So it can be re-used by other plugins.

Fixes: QTCREATORBUG-24330
Change-Id: Ic9ff865f96c01a37584b02d1125717a307cc79ed
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-09-23 06:28:04 +00:00
Marco Bubke
a003a2e9f3 QmlDesigner: Fix construction order
The connections have to be destructed before the local server.

Change-Id: Ie1c349b72c67c4359eba78e9567e38f577c7bc10
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-09-22 16:04:29 +00:00
Eike Ziller
049941df44 Update IEditorFactory documentation
Change-Id: I3a10c8d6a414bc0f849a8678e53515845bffef04
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2020-09-22 15:22:47 +00:00
Alexander Mishin
229dfaab95 Add qmlImportPaths property to .pyproject file
Users should be able to add custom QML import paths for
Python/PySide2/PyQt5 projects in Qt Creator in order to
get syntax highlighting and code completion for custom
QML modules.

Fixes: QTCREATORBUG-23679
Change-Id: Iec7c691c4b8709c48a790cd27ac7c6e755967796
Reviewed-by: hjk <hjk@qt.io>
2020-09-22 13:43:21 +00:00