Commit Graph

65842 Commits

Author SHA1 Message Date
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
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 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 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
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
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
Miikka Heikkinen
31ec38dba5 QmlDesigner: Add navigator tooltip for 3D Components with Node root
This enables showing preview tooltip for all imported 3D models.

Also moved the preview image handling out of the model and into
NodeInstanceView, where it fits more naturally.

Change-Id: I48135d06aa8d9313525dae618e22692563da78fd
Fixes: QDS-2807
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-09-22 13:35:20 +00:00
Miikka Heikkinen
762addfbd0 QmlDesigner: Add navigator tooltip for 3D Model nodes
Only the source and geometry properties of the model is taken from the
node, rest of the properties are always same for consistent style.

Change-Id: I2355ce91c3e3d6f23b9f27ecf31430e3e13d0c80
Fixes: QDS-2764
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2020-09-22 13:35:10 +00:00
Christian Kandeler
ed3aba3626 Unit test: Fix use-after-free
The bind() function takes a view, so we can't pass in a temporary.
Amends 3b0de99cf5.

Change-Id: Ic11b47688ff37699a1a56e978780a610c969d3b7
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2020-09-22 12:46:21 +00:00
Eike Ziller
6fe11f80d6 Export QmlDesigner plugin directory for use by plugins
Change-Id: Idf46c28aa9c6b4a4c9ae6a097a598abf7cf8b6c4
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-09-22 12:29:23 +00:00
Andre Hartmann
2921b94785 QtTestParser: Fix switching back to Status::NotHandled
Every Application Output occurrence of

 "FAIL!  : test1::test_case1() Hi there!"

made the QtTestParser handle all subsequent lines until
the platform depending closing pattern

 "   Loc: [../Test/tst_test1.cpp(13)]" (UNIX)

or

 "..\Test\tst_test1.cpp(13) : failure location" (Windows)

was found. If that pattern did not follow, or if the
wrong platform pattern followed, all subsequent lines
were not handled by other output parsers.

Fix that by returning NotHandled if the locationPattern
does not match one of the next lines after the triggerPattern
(only actual/expected lines may appear in between).

Fixes: QTCREATORBUG-24353
Change-Id: If28af6738d6b01751c0c916d1a5d8a31dcea9ff4
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-09-22 10:46:32 +00:00
Eike Ziller
fd5f0e6819 Remove Core::Id
Moved to Utils in 4.13, and the compatibility typedef is ugly.
Remove it now.

Change-Id: I0d80165b427448eaf7ee6cc1c0a6a34a85b7083b
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-09-22 09:47:56 +00:00
Jacek Nijaki
08541305b6 McuSupport: Add support for desktop backend JSON file
Starting from Qul 1.5 json kit file will be shipped for desktop platform.
This change is backward compatible with previous Qul version - if no
desktop specific json file is found a legacy code is executed.

This change removes "desktop" toolchain, instead "msvc" and "gcc"
toolchains are introduced.

Additional parameter was introduced to the josn kit file: "platformName"
which enables using different strings in kit name and in QUL_PLATFORM
cmake variable.

Change-Id: Ie0a212aaad47a8033e9a81467f60a23c2bc19a51
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-09-22 08:32:00 +00:00
Eike Ziller
698a0dd8c8 Bump version to 4.13.2
Change-Id: I5566275aceb3161d04c89c6d6ef5603d8de03994
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-09-22 06:26:46 +00:00
Leena Miettinen
49d20960b9 Doc: Show "Managing Sessions" topic in QDS Manual
- Moved the topic from the creator-only folder to the
  howto folder root to have it included in the doc builds.
- Added the topic to the toc and fixed the navigation links
  around it.
- Used defines to hide text that does not apply to QDS.

Fixes: QDS-2805
Change-Id: I583324a1d0bc60c1b6448a52e48b3f09b1039b7f
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-09-21 14:04:04 +00:00
Eike Ziller
5cb5d8e585 Remove usages of Core::Id
It moved to Utils.

Change-Id: Ia4d12bb07db2d59b1cb084b2ebdea20e6e3b40ad
Reviewed-by: hjk <hjk@qt.io>
2020-09-21 13:06:21 +00:00
Kai Koehne
71e2138517 Fix copyright/license of vcsconfigurationpage.cpp
The copyright and license was changed as part of the 397e7f48
mass change, arguably by erroneously copying it from
imageviewer/imageview.h or imageviewer/imageview.cpp.

Fixes: QTCREATORBUG-24620
Change-Id: I1f6a631c3b0a437af862d929a921693db367cef2
Reviewed-by: Denis Mingulov <denis@mingulov.com>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-09-21 12:33:35 +00:00
Kai Koehne
87cf6400fc ImageViewer: Change license of files to Commercial/GPLv3
Task-number: QTCREATORBUG-24620
Change-Id: I8c76b312d4e93346ca70eec92b8b7ac8dfa455d1
Reviewed-by: Denis Mingulov <denis@mingulov.com>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-09-21 12:33:29 +00:00
Christian Kandeler
781a4484a1 ProjectExplorer: Remove replacement kits
... for which the original kit has turned up again. Otherwise we'd have
more than one kit with the same id.

Fixes: QTCREATORBUG-24589
Change-Id: I7ce16615694d3d2c5a5441f676ecb7dc85c2239c
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-09-21 11:57:03 +00:00
Christian Stenger
3b0de99cf5 Unittests: Fix test
Change-Id: I45669bd31497655b6c8a9f8c03fd20cae703042f
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2020-09-21 11:51:46 +00:00
Eike Ziller
3f42c989ee Fix Qt 6 build of ProjectExplorer and targets & build systems
QStringRef is gone.
qsizetype vs int.
QMultiHash::insertMulti is gone.
QXmlStreamWriter writes UTF-8 by default.

Task-number: QTCREATORBUG-24098
Change-Id: Id217e40a1f17993a84fc725976e9cb84618b0580
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-09-21 11:31:54 +00:00
Alessandro Portale
dc1439dedd CMake build system: Propagate less target dependencies and includes
...and thereby have less include paths per compile unit.

Change-Id: I70de8db12d881ea827595ca0cacaea13b5c0f3bd
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-09-21 10:53:12 +00:00
Cristian Adam
de580388bb CMake Build: Enable PCH for tests
Because the tests were missing the visibility flags, and PCH targets
that didn't have the visibility flags were skipped, tests were build
without PCH.

Change-Id: I56ddc81fadcb9e1004032a7e6096ea2c0a480a19
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-09-21 10:45:02 +00:00
David Schulz
c8a3571426 Snippet: show mangled replacements in snippets tooltip
Fixes: QTCREATORBUG-24317
Change-Id: Ibaeacc13f49a933836ccf9c906309219e3533564
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-09-21 10:36:47 +00:00