Commit Graph

67787 Commits

Author SHA1 Message Date
David Schulz
5cd057d9fe Debugger: Prevent calling windows lldb on startup
The LLVM package on windows contains an LLDB linked against python but
misses a python library. Calling this lldb to get the version number
results in an ugly error message that python36.dll cannot be found. Use
the file version info instead.

Fixes: QTCREATORBUG-23848
Change-Id: I6d8e6cac07b427de564eaaedf7de369391aed37e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-11-24 13:52:58 +00:00
Eike Ziller
3e00fd1ed0 Fix qtcreator_process_stub on Windows
When building with CMake, this is compiled with `-DWIN32_LEAN_AND_MEAN`.
This reduces the number of headers that are included by default,
and lead to e.g. malloc and exit not being available:

..\src\libs\utils\process_stub_win.c(149): warning C4013:
'malloc' undefined; assuming extern returning int

And therefore reading the environment file was failing.
Include the needed stdlib.h.

Fixes: QTCREATORBUG-24829
Change-Id: I24722dfd17ecf0e4e6c9059e2cececbb5923a976
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-11-24 13:14:18 +00:00
Jarek Kobus
3b93ade234 Don't call virtual method from c'tor
This patch fixes the following issues:

1. The c'tor of NonInternalLibraryDetailsController
called slotLibraryTypeChanged(), which called in turn
virtual updateWindowsOptionsEnablement(). This method
is reimplemented in subclasses, so we can't easily
make this method final.

The solution is to reorganize the code so that we don't
call anymore updateWindowsOptionsEnablement() from the
NonInternalLibraryDetailsController c'tor, but instead
we rely on the fact that it will be called indirectly through
updateGui, called for each leaf subclass from its c'tor.

2. Don't call multiple times updateGui when constructing
the subclass of NonInternalLibraryDetailsController or
when changing library type (from combo box). Before, each
time that happened, the updateGui was called three times.

3. Provide an ugly hack to nicely resize the wizard when
showing more widgets (if needed). This also eliminates flickering
between transitioning from Type to Details page.
It makes the layout much better, as it respects the reasonable
minimum size (when resizing to smaller size by the user).
The request to unhack addressed here: QTBUG-88666.

4. Mark all virtual methods with final for all
subclasses of LibraryDetailsController, where appropriate.

Change-Id: Ief7e5e9e1efdbfca5a06eaeeb1528018c29c39ca
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-11-24 13:04:35 +00:00
David Schulz
8f4be88eea ClangTools: prevent creating duplicated diagnostic marks
If we already have marks from the analysis for the open file we do not
need to create marks for the explicit analysis.

Fixes: QTCREATORBUG-24955
Change-Id: Id550566c6e9a2dbd4e4eb3e9b9460a7778e39a50
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-11-24 12:48:31 +00:00
Richard Weickelt
ff74a945be Update Qbs HEAD of 1.18
Change-Id: If19fd189b09ab09643d3f65ef7daddfb71e47197
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-11-24 12:42:08 +00:00
David Schulz
c5c3214cfb TextEditor: add action to paste without autoFormat
Fixes: QTCREATORBUG-20887
Change-Id: Iedc6b584c9c1cc48804025653d0749e054a406f8
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-11-24 12:20:05 +00:00
Alessandro Portale
dc8edcefba WebAssembly: Fix WebAssemblyPlugin::testEmSdkEnvParsing for non-Windows
The ':' in "c:\" got confused with the paths list separator ':' on
Linux/Mac.

Let's add a non-Windows specific emsdk_env output to be parsed by the
autotest.

Change-Id: I900e13065237bc0d68eca5582b286177e90cc0af
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-11-24 12:18:06 +00:00
Christian Kandeler
baaccc87ba clang support: Adapt some version checks in qmake/qbs files
Change-Id: Ic1ea0e10586c5ab33f7fad87f76d742e13a55834
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-11-24 12:16:47 +00:00
Eike Ziller
ee6b329f10 Fix Qt deployment on Windows
Broke with 07128078b9

Change-Id: Icfc1ef7766017abf983115b20428931214a2a7c5
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-11-24 12:02:13 +00:00
Christian Kandeler
bcf900e29b ClangCodeModel: Prevent outdated fix-its from getting applied
The code locations might no longer be correct.

Fixes: QTCREATORBUG-21818
Change-Id: I866a29d2fd63ff65cf33168024f7788c5f6e3547
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-11-24 11:24:08 +00:00
Eike Ziller
eaec56e6b6 cmake build: Fix issue with tests and CMake < 3.14
For the CPlusPlus target the target sources contain
"$<TARGET_OBJECTS:3rd_cplusplus>" with older CMake versions.
Looks like that was fixed in CMake 3.14.
Work around it by removing TARGET_OBJECT entries, which we definitely
don't want.

Change-Id: I036720f122aa2d0727e85b611f1e32c65fae57ae
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-11-24 09:55:11 +00:00
Eike Ziller
07128078b9 Integrate deployqtHelp_mac.sh into deployqt.py
For now this is a dummy integration by just calling the former from
the latter, which has the advantage that
- only one script needs to be used for all platforms
- passing just qmake instead of individual install paths is enough
  also on macOS

Change-Id: Ie05077ada950addd287b87d88045605d3bddb48f
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-11-24 09:36:56 +00:00
hjk
1c244bd623 Debugger: Adapt dumper helper for embedded QString members for Qt6
This fixes the QUrl dumper.

Task-number: QTCREATORBUG-24098
Change-Id: I2dbc2f477c33bc0c7337e8a925dd0a35d15aa31f
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-11-24 08:52:44 +00:00
hjk
8f338eb04f Debugger: Adapt QVarLengthArray dumper to Qt6
Task-number: QTCREATORBUG-24098
Change-Id: Ic93e15bd474d42be49de34c87d56ffbc07757bdb
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-11-24 08:52:38 +00:00
hjk
56b2158500 Debugger: Adapt QRegion dumper and test to Qt6
Task-number: QTCREATORBUG-24098
Change-Id: Ie9c75c779595a981e75f20e73bfaccb5d24cf16b
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-11-24 08:52:31 +00:00
hjk
0ede48270f Debygger: Adapt QLazilyAllocated dumper test to Qt 6 changes
Task-number: QTCREATORBUG-24098
Change-Id: Id5dde3089af8bffdc7b8d9ebfaf9e6748257fd9f
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-11-24 08:39:40 +00:00
hjk
5ad9b00cf7 Debugger: Adapt QImage and QPixmap dumper to Qt6
Task-number: QTCREATORBUG-24098
Change-Id: Ib9b6c824df67d18d9b4282340f2ab0d4a5bae837
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-11-24 08:21:15 +00:00
Jarek Kobus
4c9361124d Fix compile warnings about missing overrides
Add missing overrides.
Remove validateCurrentPage() completely,
since it didn't do anything useful.
This method is not overridden in any superclass up to QWizard.

Task-number: QTCREATORBUG-24098
Change-Id: Iffa335c471469c56e830b6160da49359fc5d6bc2
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-11-24 08:10:41 +00:00
Leena Miettinen
5d602466a5 Doc: Update info about Form Editor
Describe move, resize, and rotate cursors.
Add and update screenshots.

Change-Id: Id309b7ccc2221192813814d917e018f78971d60b
Reviewed-by: Brook Cronin <brook.cronin@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-11-24 08:01:18 +00:00
Leena Miettinen
c9b53add47 Doc: Describe new and changed Navigator functions
- Locking
- Reversing
- Arranging

Fixes: QDS-3082
Change-Id: If1a246661219d8d55b66efa4cf16f5cad0c086af
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-11-24 08:01:02 +00:00
Assam Boudjelthia
b52ad29f3a Android: fix logcat not fetched when app exits/crash at start
Application output from logcat might not work if an app
crashes at the start, so with this patch we avoid that by
making logcat process fetch logs faster by not getting
the full logs but only the logs starting from the moment
we start the app (using -T arg).

This can be very annoying bug, because when starting the
app from QC it usually only prints "app_package_name died."
which forces the user to go into the logcat manually and
search for an error from thousands of lines.

Change-Id: Ic5ac0389cb28e7c80586490877a697272f3648af
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-11-24 07:51:26 +00:00
hjk
d0991ae5ae Debugger: Simplify user side of QString dumper code
Move the version dependency into the dumper base instead.
This also fixes the QFileInfo display, but not yet QFile.

Change-Id: Ia2cb75b2a74cbbd4bb2d6ede2178d96792883912
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-11-24 07:13:39 +00:00
Tim Jenssen
ec202c82a3 cmake: fix no libclang builds
Change-Id: Id5ce15851bf1cdbd3661adcf5751e66a4cf96930
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-11-23 19:57:25 +00:00
Assam Boudjelthia
bc5ffdb56b Android: fix copy gradle files button function
The the value was being set before the checkbox is connected, which
is useless.

Change-Id: Ifdbbccc1fe190e4dd646e77303af78757fadebb2
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-11-23 19:31:31 +00:00
Christian Kandeler
0d12c8cba8 clangbackend: More cursor adjustments
Fixes: QTCREATORBUG-21534
Change-Id: Ia8a6f277b186bd6decdfec26bfca30b36802c1c2
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-11-23 13:03:34 +00:00
hjk
c80313f777 Debugger: Adapt QHash dumper for Qt6
This is a completely new structure, also effective order when
iterating is completely different.

QHashIterator doesn't work yet.

Task-number: QTCREATORBUG-24098
Change-Id: I917cacf7952d9d54a31d14a0691213ab944d0d8f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-11-23 12:26:24 +00:00
Tim Jenssen
5267efc234 cmake: disable reuse pch files for static libs with MSVC
Was not able to build something against these libraries
from another "cmake project".

Change-Id: I3876d102a320b4f5324e25fd8e840c181010c2a7
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-11-23 12:26:23 +00:00
David Schulz
a8ceeaf7df ClangTools: remove already existing temporary files
If we already have a temporary saved file for a modified document in the
VFSO remove the old one.

Change-Id: I748cd05a45dc74e5d84faa48a574983a628b050f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-11-23 12:23:47 +00:00
Christian Stenger
6b62a99a8a cmake: Fix building debug with release libclang
Parts of QC cannot be linked against a release build of clangTooling
libs and vice versa when building on Windows.
Check whether the provided libs match the current build mode and
disable respective parts if necessary.
Re-use this information to decide whether unittest should be build
or not.

Change-Id: Ibc2aab0d7886e78ebbf8f15a43152efad49f1eff
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-11-23 11:07:49 +00:00
Eike Ziller
05a1b2a6e8 cmake build: Remove unused component "Dependencies"
We don't use it for packaging, nor for github anymore, it duplicates a
whole lot of logic, and that only partially (as an example fixing the
RPATH for clang tools on macOS is missing), and the Clang part only
works with CMake >= 3.14 ("file(READ_SYMLINK"), which was the final
trigger of this patch.

Change-Id: I21ff6b01297009eff15bda36963e729dea4927c8
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-11-23 10:46:39 +00:00
Christian Kandeler
d3fafcde0f CppEditor: Support decl/def switch for conversion operators
Fixes: QTCREATORBUG-21168
Change-Id: I515fe146a679e007c96fa8d23f1457dadf07db3c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-11-23 10:07:20 +00:00
Christian Kandeler
b0dd6b748f clangbackend: Try harder to get the proper cursor
... in cases where it appears that clang_annotateTokens() did not do
what we wanted.

Fixes: QTCREATORBUG-21522
Change-Id: I272061cb6c4b51a5d779ace5b4e06912c0a386e5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-11-23 09:59:27 +00:00
Christian Stenger
fc216b4838 QmlDesigner: Fix compile on Linux
Change-Id: I44c0899ff65aa640c7bb2f94ea8084fb200d191b
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2020-11-23 08:33:07 +00:00
Assam Boudjelthia
34a7f6f9f2 Android: remove newline chars before adding output in error/warning pane
The output of androiddeployqt that is picked by QC, can contain newline
char at the start of the received line like:
"\nNote: Recompile with -Xlint:deprecation for details."
Such output is sould be only a warning
and not an error, that's we try to remove the newline from the start to
avdoid this behavior.

Fixes: QTCREATORBUG-24881
Change-Id: Iad7556917cb0f53dc691dfb316f999ad504976e9
Reviewed-by: hjk <hjk@qt.io>
2020-11-23 07:23:07 +00:00
Jarek Kobus
8cee978e55 Don't declare override when final is declared
Amends: eccebe41dc

Change-Id: I93c5be09fd47a591a5b797f529c74f76bd975b50
Reviewed-by: hjk <hjk@qt.io>
2020-11-23 07:04:00 +00:00
Leena Miettinen
50456e8a92 Doc: Add hardware and software recommendations for QDS
Fixes: QDS-3032
Change-Id: Ia11963a006141d2f53a8154faf7db6edccc5ea4a
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-11-20 17:36:40 +00:00
Christian Kandeler
f4450c4b72 MCU: Fix qbs build
Change-Id: Ie235f0242d7d67130031ad342695ae38edda79a1
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-11-20 17:27:24 +00:00
Eike Ziller
f534624fce Fix build with newest Qt 6
No implicit casts from QString to QFileInfo anymore, and a few more
QChar(int) fixes.

Task-number: QTCREATORBUG-24098
Change-Id: I3326fc0701a9259c7bdd2d8c3025de0a4774f8aa
Reviewed-by: hjk <hjk@qt.io>
2020-11-20 15:43:25 +00:00
Jarek Kobus
01331893ad Don't call virtual method from Exception c'tor
In case a static s_shouldAssert is true, we were calling
virtual description() method from the c'tor of base Exception
class, which was reimplemented in subclasses.
This could cause a crash, since reimplementations
were using not initialized yet private fields.

We fix it by de-virtualizing the description() method
and instead we pass the description in overloaded, protected
c'tors. Original c'tors still use the default description
that was used for base Exception class.

In addition we make all private fields const, and
make showException method non-virtual, as it didn't have
any overrides.

Change-Id: I7ebae1809ab423e990276e500f9c0db569d10e2d
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-11-20 15:09:48 +00:00
Leena Miettinen
2241e45891 Doc: Update some icons and move them to icons folder
Change-Id: I06867460704b6ff085cd2f06042c0dce81d26377
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-11-20 14:46:51 +00:00
Jarek Kobus
d97f663e3b Fix includes
Change-Id: I8eeade519a874df0c1dc3c2c6213c66d1df001f6
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-11-20 14:25:32 +00:00
Jarek Kobus
6b588d7227 Remove unused variables
Mark some of them with Q_UNUSED, since it looks like
sometimes the copy is done on purpose, to force detach
or used for some hack with memory management.
In one case make unused variable used again.

Change-Id: I3825cd3399fa63bf6e12173c64509287d4a125e5
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-11-20 13:58:46 +00:00
David Schulz
06bc4203cf CDB: fix signed char container dumper
"signed char" might be reported as a template type but cannot be found
when looked up, so just strip the "signed" from the typename and lookup
char.

Change-Id: I70e3b27d5c3bfd9e65da0a9f14b6a2df2c7e8dde
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-11-20 13:44:38 +00:00
Alessandro Portale
6108479040 McuSupport: Fix CMake build
Baremetal -> BareMetal

Change-Id: I083c75a03513b8b8f8635e2e60212e6f600b1a34
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-11-20 13:19:37 +00:00
hjk
c2090d101b EditorManager: Introduce a DoNotRaise EditorManager::OpenEditorFlag
In some situations it might be beneficial to set up the editor
as usual but do not raise the application window.

This is opt-in, existing behavior is not affected.

Task-number: QTCREATORBUG-12769
Change-Id: If9826717bba06283187d10073c02a748b638c3f8
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-11-20 13:13:22 +00:00
Dawid Sliwa
3929917ecb McuSupport: Add support for kits with IAR compiler defined
- added IAR toolchain factory similar to ARM GCC one
- extended kitName with used compiler name
- added Unsupported toolchain type to fix crash after creating kit with not
  recognized toolchainID

Fixes: QTCREATORBUG-24898
Change-Id: I28b8376ca4bc88d3d75e17bd242ac49f0ee09845
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <christiaan.janssen@qt.io>
2020-11-20 12:50:11 +00:00
Jarek Kobus
c9f5ce51e0 Don't use iterators to temporary containers
Fix a clazy warning, like:
Don't call QVector::begin() on temporary [clazy-temporary-iterator]

Indeed, we may pass begin and end iterators for 2 different
instances of temporary vector (shared though).

In addition: use const iterators.

Change-Id: Iac1055d9fc226f1b48ca72ee4f3aab433addfe7f
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-11-20 12:25:31 +00:00
Eike Ziller
8d67dd57e8 Merge remote-tracking branch 'origin/4.14'
Change-Id: I5e138bb7883c0436fee14ca6af20e99396676af1
2020-11-20 13:00:37 +01:00
Thomas Hartmann
f7fa53d29b QmlDesigner: Track usage of graphical views
Change-Id: I0631816980178100dcd61b65d792fc38504199d5
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2020-11-20 11:36:54 +00:00
Thomas Hartmann
83036eff4c QmlDesigner: Add more trace points
Change-Id: I618e027785676de8492cd698f109579abb9b053a
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2020-11-20 11:19:45 +00:00