Commit Graph

65865 Commits

Author SHA1 Message Date
Eike Ziller
c8d565563d Improve IEditor documentation
Change-Id: I63b1e560c067bb5bf6613dc0f1642b75f8596966
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2020-09-28 08:46:26 +00:00
hjk
5154e1eb02 Utils: Remove the text option for LayoutItem
This is converted to QLabels on the Qt side anyway, so we can can
just do that and avoid the special casing later for form layouts
later and gain the functionality for grids.

Use the opportunity to make the all mouse-selectable.

Change-Id: I37830b028b8d2987ea4925f364c79e905be725c8
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-09-28 08:40:29 +00:00
Assam Boudjelthia
9dcbb8ca01 Android: add prepare_apk_dir CMake target by default
Qt 6 CMake build doesn't execute prepare_apk_dir by default (this is
the equivalent of install step in qmake). Since we have the target
for installing the build artifacts to android-build already present
in the CMake targets list, it's better to just use it, instead of
using another custom step just for that.

Task-number: QTCREATORBUG-24679
Change-Id: I369d6ce513f9aaf917c5fcbb3f6aa44e36b97af8
Reviewed-by: hjk <hjk@qt.io>
2020-09-28 07:31:48 +00:00
hjk
e685bb3b11 Debugger: Fix QVector dumper for Qt 6
QVector is a template alias to QList in Qt 6 and gcc creates insufficient
type information for template aliases:

g++ (Ubuntu 9.3.0-10ubuntu2) 9.3.0:

 <1><91>: Abbrev Number: 8 (DW_TAG_typedef)
    <92>   DW_AT_name        : QVector
    <96>   DW_AT_decl_file   : 1
    <97>   DW_AT_decl_line   : 5
    <98>   DW_AT_decl_column : 29
    <99>   DW_AT_type        : <0x2d>
 <1><9d>: Abbrev Number:

clang version 10.0.0-4ubuntu1:

 <1><86>: Abbrev Number: 8 (DW_TAG_typedef)
    <87>   DW_AT_type        : <0x67>
    <8b>   DW_AT_name        : (indirect string, offset: 0x4a): QVector<int>
    <8f>   DW_AT_decl_file   : 1
    <90>   DW_AT_decl_line   : 5
 <1><91>: Abbrev Number: 0

In order to not regress on what the user sees we generate the full
type name for the common case in the dumper.

Task-number: QTCREATORBUG-24098
Change-Id: Ic0b70b1b87ee027fc3fcc0409ea23f56a175bcc3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-09-28 07:31:42 +00:00
Christian Stenger
20883d9f5f ProjectExplorer: Fix setting up test terminator
When setting up the test terminator the used line parser
has been setup already.
Ensure the test terminator has the same search directories
set up to avoid an assert.

Change-Id: Ic881533f7735f769dd49d22860141c9213e77e09
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-09-28 04:27:01 +00:00
Cristian Adam
1e8f19e274 GitHub Actions: Add ability to clear ccache
By specifying "ccache: clear" or "ccache: clean" in the commit message,
the workflow will issue a ccache --clear command before building.

Change-Id: I9e45ebcd8dc4b05cef9d6d7ea70bef67602d1223
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-09-27 20:05:07 +00:00
Fabio Falsini
63dc880b9f Add control for set Android manifest screenOrientation param
Android manifest have a param called screenOrientation for
instruct Android to show the app in landscape mode, portrait
mode and so on. This patch add a control allowing to set
the preferred one by selecting from the list of all currently
availables.

Change-Id: Id53dd8aa1efaa603bc30b02c8a5a8db55e97e75b
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-09-26 07:59:51 +00:00
Fabio Falsini
e6a0babab6 Add support for Android xhdpi, xxhdpi and xxxhdpi icons format
Current Android Qt Creator plugin allow to convert a single
icon to the basic format ldpi, mdpi and hdpi. However Android
guidelines require to add xhdpi, xxhdpi and xxxhdpi icons
size also. This patch add conversion of the master icon to
these additional formats

Change-Id: Ie330d6ac146194eb06e6e8896b3af85b6bdab492
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2020-09-25 18:19:21 +00:00
hjk
950aa580ab Debugger: Make QList test pass with Qt6
QStringList is a typedef now

Task-number: QTCREATORBUG-24098
Change-Id: I0f12655a9b86e4813245fbb08cc0a1c3e21d2dcf
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-09-25 14:17:40 +00:00
hjk
60c4dfb5e5 Debugger: Fix QString dumper test for Qt 6
QStringRef gone etc.

Task-number: QTCREATORBUG-24098
Change-Id: I416f274bccc19c73e226dbf809729c3b72b565a8
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-09-25 13:05:13 +00:00
Christian Stenger
03a459708b Utils: Fix build on Windows
Amends d97c431a00.

Change-Id: I6a806048772a1e94a20d391723ad5c41886b601e
Reviewed-by: hjk <hjk@qt.io>
2020-09-25 13:00:13 +00:00
Cristian Adam
828266d8a1 GitHub Actions: Mark compiler errors, and test failures as annotations
The annotations are visible for everybody, and very convenient for looking
after errors / test failures.

Change-Id: Idb7d1e63b3611063268b4e6e490195ccb9d2b221
Reviewed-by: hjk <hjk@qt.io>
2020-09-25 12:42:59 +00:00
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
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
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
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