Commit Graph

69993 Commits

Author SHA1 Message Date
Christian Kandeler
964aefd4ec CppTools: Consider CUDA and OpenCL sources
Fixes: QTCREATORBUG-25742
Change-Id: If2ecd5344c3af6398bb70a9f0bfcbe3d3593026d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-05-18 10:49:48 +00:00
Christian Stenger
2e24d4b0cc Wizards: Fix generation of dynamically populated models
This was implemented for QAbstractItemModel based classes, but
forgotten for QAbstractListModel and QAbstractTableModel based
classes.

Change-Id: I807f445e48d2906580abd0a65bb794d6e766c1a7
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-05-18 09:41:11 +00:00
Christian Kandeler
6dc3c1f156 ClangCodeModel: Support access type categorization
... with "Find Usages", as we do in the built-in code model.
Note 1: This is very slow, so it's for now only enabled if the
        search results come from a small number of files.
        Possible ways of speeding up the operation
        to be investigated.
Note 2: All test cases from the old code model also pass here,
        but checking with non-trivial real-world projects
        shows a lot of mis-categorizations.
        Well will fix them one by one.
Note 3: This functionality requires clangd >= 13.

Change-Id: Ib3500b52996dbbf9d7d9712d729179bcbd3262fc
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-05-18 08:42:04 +00:00
hjk
11f574fef9 Core: Unify INavigationWidget creation a bit
Move toolbutton creation/listing closer to the widget.

Change-Id: I0e1342ede40fada1c5c9fb0b11d77852b78cc053
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-05-18 08:35:28 +00:00
Cristian Adam
b504bef7a4 CMakePM: Add support for QNX 7.1 and Qt 6
By setting CMAKE_TOOLCHAIN_FILE to the qt6 toolchain file all the
needed bits to compile agains Qt6 get resolved automagically.

Change-Id: I43084842f98a4385acedd4865aaf7e26f25a351e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-05-18 08:26:06 +00:00
Leena Miettinen
1362f96c87 Project Explorer: Replace "Qt Quick Compiler" with "qmlcachegen"
The latter is now used to compile Qt Quick projects. Also update
the docs accordingly.

Task-number: QTBUG-93766
Change-Id: I22a928bc1acfd3c58ed068fc2d07c36fb57b0a09
Reviewed-by: Vladimir Minenko <vladimir.minenko@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2021-05-18 07:48:54 +00:00
Eike Ziller
b87c3cc03e Fix Qt Creator plugin wizard's GitHub action
for the changed location of build_plugin.py

Fixes: QTCREATORBUG-25727
Change-Id: I6bda26b1820b86ac4cf12a55821eed879ee818bc
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-05-18 07:27:49 +00:00
Christian Stenger
b3ad100016 Core: Fix build on Windows
Amends 06fd916348.

Change-Id: I143cc60d3f7b0a6ba16c2e341e4cd170b54914de
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-05-18 06:05:27 +00:00
hjk
85d685ccea Debugger: Allow selection of "target extended-remote"
... when attaching to a running gdbserver.

This enables use of gdbservers that have been started with --multi,
by adding to the "Init Commands" something like

   run /path/to/binary <args>

Change-Id: I498b2287f8ab1dee68edf6f29a1b7261b17897ca
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-05-17 14:17:28 +00:00
Tim Jenssen
5bf162a26f qmldesigner: add PLUGIN_RECOMMENDS QmlPreview
QmlPreview should be initiliazed before qmldesigner

Change-Id: I43f093e9af0728068e939a95a40c9405ff585283
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-05-17 14:17:01 +00:00
Eike Ziller
06fd916348 Do not show pane if external tool output is ignored
Fixes: QTCREATORBUG-25728
Change-Id: I85650abb0227bdabe014ba324c1b3a3f35de4916
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-05-17 13:40:37 +00:00
Christian Kandeler
32653e1a7b CppTools: Fix possible crash when testing
Change-Id: I9ade8c861c44329376c8f1dcc9506561b7689de5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-05-17 13:40:34 +00:00
Christian Stenger
c79a4fab6e Revert "ProjectExplorer: Remove ClangClToolChain::m_clangPath"
This reverts commit 7a2e49435c
as it broke handling clang-cl toolchains on Windows.

Fixes: QTCREATORBUG-25690
Fixes: QTCREATORBUG-25693
Fixes: QTCREATORBUG-25698
Change-Id: Idfc7bc86ad8dd97f645908d4fe9530c760085347
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-05-17 13:39:42 +00:00
hjk
3d092b8c28 Utils: Show remote FilePath also on qDebug
Change-Id: Ic437279115a7393c6bea4f84db6e0e5552c22d31
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-05-17 13:23:45 +00:00
Tim Jenssen
99cc306e0f qdoc: no need to use ssh here
Change-Id: I09b1995cb1d029158a808afd54f4842ced4350f5
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-05-17 12:14:35 +00:00
hjk
9e832e3fb9 CMake: Minor code cosmetic
Drop top-level static of consts, namespaces.

Change-Id: Ibc902e41278b78843a8f5aeced8321e76296ca1b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-05-17 11:49:17 +00:00
hjk
6830328ecf Utils: Drop SynchronousProcessResponse
Move the remnaining two members into QtcProcessPrivate, its
only user.

Change-Id: I8e0c23e1a56b36b750b5b4bd4e88d762260e42a1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-05-17 11:49:11 +00:00
Christian Kandeler
2182993b97 clangbackend: Add another exception to our "find real cursor" heuristic
Leave preprocessor directives alone.

Fixes: QTCREATORBUG-25692
Change-Id: I1c31f4120e9b86a58123f8877cebd354e800fb8b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-05-17 11:44:49 +00:00
hjk
31dc479fa5 Utils: Avoid extra output copy for SynchronousProcess
The data was present in the ChannelBuffer

Change-Id: Ica645ba58bb2e86d0ef4cf5387f0a228f132e07d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-05-17 11:24:15 +00:00
hjk
49864a8155 Utils: Remove ChannelBuffer's QObject base
Not used anymore.

Change-Id: If149abbced43b0b476715073cafa5ad4fe918c24
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-05-17 10:35:57 +00:00
David Schulz
ba83b852b6 Editor: Close function hint proposal on destroyContext
Fixes: QTCREATORBUG-25691
Change-Id: I2cb1b52fdda386cbfe3ca7f54746edd3e5562ea0
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-05-17 09:57:52 +00:00
hjk
75032a4e1f QtSupport: Allow remote qmakes in some places
Useful for Docker support.

Change-Id: I9eba01e14c23dc704bfdf531ecfda86174d44b0b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-05-17 09:51:09 +00:00
hjk
79e02202d3 Utils: Use a setter for QtcProcess::run(.... writeData)
Change-Id: Ic56f8ecc158374251f89bb62c4b3d62168ae8409
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-05-17 09:42:00 +00:00
Miikka Heikkinen
1608fa5265 QmlPuppet: Fix warning about extra argument to function call
MouseArea3D::applyFreeRotation only takes four arguments, so remove
the unused _targetPosOnScreen property.

Change-Id: I10940f6954de89cb7a01bdbea6a0a55e69cb9c65
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2021-05-17 09:20:12 +00:00
hjk
73c0175f4b Vcs: Simplify VcsCommand::runCommand interface
The timeout and exit code interpreter properties are already
accessible via the SynchronousProcess parameter.

Change-Id: I1ba9c768a781009df65b5070a1d017c41d7e2663
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-05-17 09:10:49 +00:00
hjk
b2dc771d80 Utils: Simplify QtcProcess::exitMessage() interface
This was requiring parameters the process object already knows.

This is a slight behavior change in most cases, it now includes
always the command line arguments, which previously only happened
in gcctoolchain.cpp and iarewtoolchain.cpp.

Change-Id: Id25a68c397e2f1d8bf52ab29210e215b1de46c6d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-05-17 08:59:48 +00:00
Christian Kandeler
3113b0e6d6 clangbackend: Fix token length calculation
This was broken for tokens with characters that take up more than one
byte.

Fixes: QTCREATORBUG-25715
Change-Id: Ic9842b960af8d6f12487f582b100cb2edcf48cc1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-05-17 08:35:32 +00:00
Alessandro Portale
0c5427c642 Utils: Build fix for Windows
"C2375: 'Utils::operator <<': redefinition; different linkage"

Change-Id: Ieeed2adbd0d216ce47c81ec671f7e353ce70947e
Reviewed-by: hjk <hjk@qt.io>
2021-05-17 06:30:52 +00:00
hjk
286efd58e8 Utils: Simplify internal ShellCommand::run* function interface
No need to pass some QtcProcess properties in parallel with a
QtcProcess object.

Change-Id: I0c04e5d7db5fd27d8855e661547ec45f417f0fd5
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-05-14 15:09:05 +00:00
Christian Kandeler
b1dbeafd44 clang-format: Add more default statement macros
To prevent unwanted indentation of Qt code.

Change-Id: I9dac81c3bbda5e1e7635f93f096b49df9ee92265
Reviewed-by: hjk <hjk@qt.io>
2021-05-14 14:11:15 +00:00
hjk
55f768e1b0 Utils: Make process results accessible through QtcProcess object
The result is fully stored in the object anyway. Using the extra
SynchronousProcessResponse structure only causes copies of
the data and complicates access on the user side in
a lot of cases.

The result bits are now also accessible individually.

There's obvious room for follow-up changes on the topic, e.g.
ShellCommand::runCommand's parameter list could shrink to
just a SynchronousProcess parameter.

Change-Id: I45aa7eb23832340be06905929280c012e1217263
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-05-14 13:19:01 +00:00
hjk
f23b27ded6 Utils: Remove two of the Environment::setupEnglishOutput overloads
We standardize on Utils::Environment nowadays.

Change-Id: Icaf2fac21d237686a63cb60fdaf1b5900bf9fe1c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-05-14 12:42:52 +00:00
Christian Kandeler
5139c04c21 ResourceEditor: Do not lose the compress-algo attribute
...when editing via the UI.

Fixes: QTCREATORBUG-25706
Change-Id: I6ffef2d79188e42182dcb680a22f8b3b933a61e2
Reviewed-by: hjk <hjk@qt.io>
2021-05-14 12:10:36 +00:00
hjk
c81c648834 ProjectExplorer: Use more Utils::Environment in GccToolChain
Change-Id: I46b1990b30e8086dfc7b59ff5bcdb8081c443eee
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-05-14 09:57:15 +00:00
Jarek Kobus
da27ac457f Do QFutureWatcher::setFuture() after connecting to watcher's signals
Otherwise we may have race condition.
Reference: documentation for QFutureWatcher::setFuture()
and the implementation of
QFutureInterfaceBasePrivate::connectOutputInterface(
QFutureCallOutInterface *interface).

Change-Id: I5b483baaf1b844871a162f47ce7683e9ff495acb
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-05-12 22:09:03 +00:00
Jarek Kobus
91f136ef3a Use Utils::FutureSynchronizer instead of QFutureSynchronizer
Change-Id: Iecfa676f58e5ca82be7c9c94233dcc8d3654c2d7
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-05-12 22:08:02 +00:00
Eike Ziller
3823b0af5f Merge remote-tracking branch 'origin/4.15'
Conflicts:
	src/libs/languageserverprotocol/workspace.cpp
	src/libs/languageserverprotocol/workspace.h

Change-Id: I739ae6642b1e2a505e351903f19df2550ef01629
2021-05-12 15:27:30 +02:00
Christian Stenger
0cef9a8554 AutoTest: Fix crash in gtest support
If the parser processes a test with an empty test name
it crashed QC.

Change-Id: Ic377f609ecdd74724ee7a272be3d5b60f0101afa
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-05-12 13:11:28 +00:00
Christian Stenger
5574deebe0 LSP: Fix MinGW build
While at it correct a typo for the inner class name.

Change-Id: I9026f4c35ccf43744e64b1337f056b5e43669502
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-05-12 12:43:07 +00:00
hjk
edf6178896 Utils: Simplify QtcProcess::run{,Blocking} for remote processes
No need to wrap another QtcProcess.

Change-Id: I27e8bf454605f70e99d9c37de09e0332337eb739
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-05-12 12:25:21 +00:00
David Schulz
0ab08e8574 LanguageClient: fix semanctic token delta data manipulation
Make sure that multiple edits are in order.

The SemanticTokensEdit start is relative to the start of the data and
not to the position of the previous edit.

Do not try to be smart when calculating the start of the modification,
but assume that start is always a preedit index.

Change-Id: I3e1513f5fe631aac21fecb5e0611d987355e2c21
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-05-12 12:14:54 +00:00
Jarek Kobus
671b71406b Fix a crash in Find Usages
Set the current index of SearchResultWindow to a valid one
_before_ deleting the last SerachResultWidget inside the m_widget
QStackedWidget, as this triggers the call to
updateFilterButton() which uses in turn the current index of
SearchResultWindow (out or range in case it's not adjusted beforehand).

Fixes: QTCREATORBUG-25713
Change-Id: Ie155c5f9bacee8d647e4fa7f622ff403192cb6bc
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-05-12 11:31:56 +00:00
hjk
cb39e2404c ProjectExplorer: Use run device as fallback for build device
This is not necessarily a permanent solution, but does something
sensible and suppresses warnings about non-existent build devices.

Alternatives would be to always enforce the existence of a build
device (fallback to "Desktop") as done for the run device, or
enforce a build device only and consider "no run device" as
"same as build device.

Change-Id: Ib84670c63a6c416524ab4740419ede6b99981c43
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-05-12 11:17:47 +00:00
Jarek Kobus
492f13578e Fix a possible crash in FindReferences on shutdown
Cancel and wait for all threads started by FindReferences
in its destructor.

Task-number: QTCREATORBUG-25711
Change-Id: I83c3ea832a173a7fff5c52e0c0136dfff2234afe
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-05-12 11:12:45 +00:00
Jarek Kobus
c4236da9d1 Introduce Utils::FutureSynchronizer
The API is nearly the same as QFutureSynchronizer.

The differences are:
1. We don't make this class a template class, however,
   we are leaving some template methods, like addFuture().
   For the scope of future synchronizing there is no need
   for QFuture<T> API, the QFuture<void> is sufficient.
2. Renamed cancelOnWait() getter to isCancelOnWait()
   in order to conform more to Qt API naming rules.
3. Removed futures() getter and provided isEmpty() instead.
4. Removed c'tor that takes a future and setFuture().
   These 2 methods were superfluous and may easily be
   substituted with other methods from the existing API.

The additional feature is about flushing finished futures.
This can be done on demand by a call to flushFinishedFutures(),
or is done automatically on every call to addFuture().

Change-Id: I6a323c9481eeeea9235e6b6e3048cef02873da08
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-05-12 11:06:42 +00:00
Eike Ziller
1c8395fca9 Fix build with Qt 6
Amends 1e26327472

Change-Id: Ibbd1a71e46f6b4ea6feb81983a2bc9a49661cc3d
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-05-12 10:24:53 +00:00
Cristian Adam
ce9d884652 QNX: Use canonicalPath for device detection paths
The QNX paths are constructed from a base path, if the base path
is ending in / you can have a path with two // as delimiter.

When doing some comparisons the path with / is not the same as
the path with //.

Change-Id: I335a50d8a9d381a886eb0c3d24b5dca610bd98df
Reviewed-by: hjk <hjk@qt.io>
2021-05-12 10:08:59 +00:00
Aleksei German
c3fa16be09 QmlDesigner: Fix for Assets View scrolling
Task: QDS-3103

Change-Id: Ief24109c1feae28bd5a9960320de2f7709b33276
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-05-12 09:39:01 +00:00
Christian Kandeler
67cc5c3883 Locator: Show template parameters
Otherwise, locator results for template specializations appear to be
duplicates when they really are not.

Change-Id: Ief20c876ec6e7d41a7d4c9dc8e35bcf1e7e60ced
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-05-12 09:25:23 +00:00
Christian Stenger
78e1260d05 Tests: Fix compile
Amends f18ac508e8.

Change-Id: If958606a06f0e86f9f8ff0a47a640566c885e018
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-05-12 08:01:50 +00:00