Commit Graph

66382 Commits

Author SHA1 Message Date
Orgad Shaneh
eb6a2f2b89 Git: Enable Show for file in a specified revision
Fixes: QTCREATORBUG-24689
Change-Id: Ic4ceb1c59f39009c28be7f34ee62f65fd41506c1
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2020-09-29 07:09:18 +00:00
Orgad Shaneh
91d3800ec3 VCS: Prompt to add file when creating from locator
Fixes: QTCREATORBUG-24168
Change-Id: I797f55935a8023c38bb7a57f3b2e015ea2895659
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2020-09-29 07:09:15 +00:00
Eike Ziller
3ca4544869 UpdateInfo: Include package versions in update notification
Fixes: QTCREATORBUG-24692
Change-Id: I5e3327b92b533dd21eabbd14402b81c1c5ad8d92
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-09-29 05:48:28 +00:00
Eike Ziller
bbe95b5733 Qt6: Various include, QPrinter, and QFlags adaptations
Task-number: QTCREATORBUG-24098
Change-Id: I7aca7d25a063c84d6eec14c2c5789357ce56a7b3
Reviewed-by: hjk <hjk@qt.io>
2020-09-28 15:51:21 +00:00
hjk
bc4e76f76b Revert "Utils: Remove the text option for LayoutItem"
This reverts commit 5154e1eb02.

For some yet unknown reason, this renders the whole sublayout read-only.

Change-Id: Ide1587382392a57643bed1b3cdd7d8987dbdab57
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-09-28 15:11:49 +00:00
Christian Kandeler
a5026d7a2f Project Tree: Delay syncing with editor when using the context menu
When "Synchronize with Editor" is enabled, every focus change in the
application causes the current node in the project tree to be reset to
the one corresponding to the current document. In order to still be able
to use the context menu, there is a flag in the project tree suppressing
this behavior for as long as the context menu is open. However, some
actions offered by the context menu open an additional dialog, and it is
confusing to users if the current node changes at this point.
We therefore extend abovementioned hack so that the suppression of
automatic syncing is extended for the lifetime of the function called
from the context menu.

Fixes: QTCREATORBUG-24699
Change-Id: I209150aee76e534a966efc4d0afe5261d6dcd521
Reviewed-by: hjk <hjk@qt.io>
2020-09-28 14:48:30 +00:00
hjk
84bbab1c97 ProjectExplorer: Simplify ProjectTree:aboutToShowContextMenu()
Only one user that doesn't use one of the arguments.

Change-Id: I72c1360b23edf88e8de733542bde608f84d8de0b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-09-28 11:32:08 +00:00
Christian Kandeler
4c1c11b7b6 QmakeProjectManager: Fix crash on reparsing
After a re-parse, the existing IDocuments need to be updated with the
new QmakePriFile object, as the old one may no longer be valid and thus
cause a crash on the next re-parse.
Amends f3bd07efd1.

Fixes: QTCREATORBUG-24683
Change-Id: Ib03d3005cb7831f1e05cb116aa3cdfe6cf5e72ad
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-09-28 11:29:41 +00:00
Christian Kandeler
2d1805a378 ProParser: Fix crash when starting a QProcess
QProcess modifies the internals of its QProcessEnvironment object in a
manner that is not thread-safe.
We therefore force a detach, so each QProcess instance gets its own
QProcessEnvironment.

Fixes: QTCREATORBUG-23504
Change-Id: I7fc1fda5e7bc11ac4e9a59596a5bdb0ac420a315
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-09-28 09:58:00 +00:00
David Schulz
62e7d7eb49 Editor: Highlight cmake configure_file input files
Usually cmake configure input files have the *.in suffix, so if we can
not find highlight definitions for a filename and it has the .in suffix
try again without that suffix.

Fixes: QTCREATORBUG-24465
Change-Id: I7a132eb407c299eb1670e89e2d043a924aed1ede
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-09-28 09:23:03 +00:00
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
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