Commit Graph

69993 Commits

Author SHA1 Message Date
Christian Kandeler
58f0f3928c Clangd: Fix tooltip test
- We require the "full AST" feature from clangd 13.
- QSKIP does not work like QEXPECT_FAIL.

Change-Id: Ie1c417013d668ace600fad76e83276ca961b8327
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-07-02 07:08:57 +00:00
Leena Miettinen
51e5616a28 Doc: Update info about generic highlighting
- You can select from several applicable definition files and
  save your selection
- Update Definitions was renamed as Download Definitions
- Reload Definitions and Reset Remembered Definitions we added
- Fixed a broken link to Kate docs

Task-number: QTCREATORBUG-25642
Change-Id: I7b3b62f4e4e7935e2e008f974036aaa5177229bf
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-07-02 06:29:53 +00:00
hjk
9287b1a3be Utils: Introduce FilePath::is{Relative,Absolute}Path
To operate correctly with remote target files systems that do not
match the host OS.

Change-Id: Ia4ea284dc38399deacb50410c9618e1e139f4e13
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-07-02 06:29:12 +00:00
hjk
9a35983b09 Utils: Make FilePath::isNewerThan work remotely
Change-Id: Ic293abd5be6b1dc35d32f470a55686a41d70cab1
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-07-02 06:17:52 +00:00
Nodir Temirkhodjaev
7bb7debb5c styles/inkpot.xml: Add definition for "Parameter"
Task-number: QTCREATORBUG-25619
Change-Id: Iebf1710f3bb75e022a8267993ab8cfa37eaff847
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-07-02 05:59:59 +00:00
hjk
4ba07d05c4 Utils: Make a FilePath's osType publicly accessible
Will help with proper is{Relative,Absolute}Path implementations.

Change-Id: Icad90b5a55d9cf733f6ee66dbbe273ec9682d387
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-07-02 05:36:36 +00:00
hjk
1db9dd058e QtSupport: Use FilePaths in BaseQtVersion::isInSourceDirectory
... and isSubProject.

Take the opportunity to rename them into isInQtSourceDirectory and
a isQtSubProject to make its limited scope clearer.

An open question is why this is only used for qmake projects.

Change-Id: If36f9457583eac17e149624ec46e5de10dd4a5a5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-02 05:30:41 +00:00
David Schulz
18b98a85eb Editor: only remove one scheme at a time
Since the delete button has already the accept role the delete was
triggered twice. First time by the role and second time from the connect
of the button clicked signal to QDialog::accept.

Change-Id: I9bd6104d36f286ec8bd0b25ee4ab6e7c8306d51a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-02 05:28:38 +00:00
David Schulz
8bef120f14 Editor: fix duplicating color schemes
Core::ICore::userResourcePath seems to have returned a string
with a trailing slash before it returned a Utils::FilePath.
This allowed us to just concatenate the resource path with the pattern.
Use FilePath::pathAppended to make sure the styles end up in the correct
directory.

Fixes: QTCREATORBUG-25944
Fixes: QTCREATORBUG-25910
Change-Id: I6ac735e3746e4328b5bbae4e55d91ef642277886
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-02 05:28:30 +00:00
hjk
39707a4258 Docker: Add a README for the manual test
Change-Id: I588d525d06be33ebb5eb1b9b927c4488aeba0120
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-02 05:14:05 +00:00
hjk
a58dd22f2d Utils: Use FilePath in TemporaryDirectory API
This helps to lower impedance in the using code.

Even though TemporaryDirectory will very likely always stay on the local
host, this is one of the entry points into path related string
manipulation
that we want to base on FilePath nowadays.

Change-Id: I302016b8d65e54df94296659a54a93935d9e4627
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-07-02 05:05:12 +00:00
hjk
92904480f0 Utils: Merge FileUtils::removeRecursively() into FilePath
This simplify the interface by removing a possibly wrong choice
ensures it works also on remote paths.

Change-Id: I01e198958900a91b99dcf2dbb491a593485493ba
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-07-02 04:57:24 +00:00
Cristian Adam
8ed5836746 Project: Remove knowsAllBuildExecutables feature
This is feature is no longer needed.

Change-Id: Ia0798402fcb4c06fb4dd38225359738306211176
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>
Reviewed-by: hjk <hjk@qt.io>
2021-07-01 15:49:01 +00:00
Ivan Komissarov
befe84f8d2 Update Qbs submodule to the top of 1.19 branch
Change-Id: If47a7abf972258a389b2af36eb73fd0ce2852b8a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-07-01 15:36:33 +00:00
Miikka Heikkinen
18f24ffd68 QmlPuppet: Fix multiselection fit object in 3D editor
Multiselection is now properly fit to the view when fit object is used.

Fixes: QDS-4608
Change-Id: Ia80133fc861bd177b9102423ebef37b592c74758
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2021-07-01 14:29:35 +00:00
Christian Stenger
111f1465c8 Wizards: Fix QtQuick Stack wizard
Amends 1e80ed9b78.

Change-Id: I2a30c38ff84a9793452a66265b584d47938444a7
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-07-01 14:08:12 +00:00
Eike Ziller
b1171f83c1 CMake build: Enable BUILD_WITH_PCH for builds with Qt 6
The issues have been fixed in the meantime

Fixes: QTCREATORBUG-25950
Change-Id: I22cf765acd3008a5b216a9e6afe5854589c7b515
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-07-01 14:04:20 +00:00
Jarek Kobus
4aaae4939a Simplify the assert condition
Change-Id: I59d6fe1bcfeabc33b24efc68c6e691d4e549faf7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-01 13:22:44 +00:00
David Schulz
8ff74cc46c LanguageClient: prevent sending symbol request to unreachable server
Change-Id: Ie7b7ee2a89b3e7e7d55b2ef1714b574c87a2897e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-07-01 11:43:09 +00:00
Tim Jenssen
a894d4e07b Fix build with Qt 6.2 after components were renamed
Some have a "Private" suffix now.

cherry picked from commit 77fd87a545
cherry picked from commit c29d4e09a2
cherry picked from commit a803d04c17

Change-Id: Ie53d253b4fc9364b452e3eb1fe01345b6d8073d3
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-07-01 10:56:12 +00:00
Leena Miettinen
79ca424782 Doc: Describe code indentation options
- Describe the related menu options in Edit > Advanced
- Describe showing (context-sensitive) right margin in editor

Task-number: QTCREATORBUG-25642
Change-Id: I6377488d2417faedb58ae7dce65158b7d62c3f9d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-07-01 10:51:00 +00:00
hjk
6f5d78a297 QtSupport: Use FilePath for several BaseQtVersion members
uicCommand(), designerCommand(), linguistCommand(), qscxmlcCommand(),
qmlsceneCommand(), qmlplugindumpCommand().

No change in functionality intented.

Change-Id: I43121de559019f96c2c1ff3b423974dddfc37124
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-01 09:30:29 +00:00
Christian Kandeler
c0a44be27b ClangCodeModel: Provide outline via clangd
Note that we used to encode the information about symbol visibility and
static-ness in the icons, which we can't do anymore, because clangd does
not provide this information.
On the upside, this change likely fixes a ton of bugs, as our own outline
was rather "quirky".

Change-Id: I099f11ec4e3c6f52cd461fb43080bbdde3bed5e5
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-07-01 08:36:20 +00:00
Christian Kandeler
f4a3310059 Clangd: Handle settings changes
Users no longer have to re-load a project for settings changes to take
effect.

Change-Id: I86dccccac14a30514c8dac292c7765ee4806f6ba
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-07-01 08:34:51 +00:00
hjk
b52f2d198a QtSupport: FilePathify BaseQtVersion::qmlsceneCommand()
Change-Id: Ia0bc3fcb40bbda31cd114503ab599b65d7597e70
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-01 07:37:00 +00:00
Alessandro Portale
2bc7f6603c WebAssembly: (Win) Use python.exe from EMSDK_PYTHON instead from Path
This affects Windows only. Instead of searching python.exe in the Path,
use the executable name which is stored in the "EMSDK_PYTHON"
environment variable (which is set by emsdk_env).

emsdk_env also prepends entries to Path, but not the one pointing to the
emsdk-shipped python interpreter. I believe that earlier versions of
emsdk_env used to add the python location to Path, else this is an old
bug.

Fixes: QTCREATORBUG-25897
Change-Id: I9b5bc43f865d19a862f8c6cd45105be54286a549
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-07-01 07:02:58 +00:00
hjk
c6dc02313d Core: Filepathify SessionManager::sessions()
Change-Id: I68b6a9f597d3a4f568653e7201a81909053df83e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-01 06:36:02 +00:00
hjk
2ceb105323 Utils: FilePathify BuildableHelperLibrary
Change-Id: I18791de1ed69e598b6c35cbae4ba28ac8129e9de
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-01 06:33:38 +00:00
Kama Wójcik
1a5c15b3e3 QmlDesigner: Add new constant value for qtquick3d
Change-Id: I57126c7fb9a20b2970addbf55d979f1e72c6e533
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-06-30 16:27:38 +00:00
Cristian Adam
c347534b42 QtSupport: Hide empty warning icon for qml debugging
Change-Id: Ic7c2981235946763417c2aed701f4da921cdbe90
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-06-30 15:13:17 +00:00
Christian Kandeler
fbb804c442 Clangd: Add per-project settings
Users might want to use clangd for certain project, but not for others.

Change-Id: Id29ce3349f0acd359cf7c824ece073b147ed2280
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-06-30 15:09:56 +00:00
Cristian Adam
b3c83b79f7 CMakePM: Project settings widgets grouping
Group together Initial CMake Parameters and Re-Configure button.

Change-Id: Ieb7d5d65b9465f3e77f1e350bc003777817f1af2
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-06-30 14:37:33 +00:00
Cristian Adam
2d8cd0c90c CMakePM: Update missing expandable CMake variables at project load
The following variables:
    "CMAKE_C_COMPILER",
    "CMAKE_CXX_COMPILER",
    "QT_QMAKE_EXECUTABLE",
    "QT_HOST_PATH",
    "CMAKE_PREFIX_PATH",
    "CMAKE_FIND_ROOT_PATH",
    "CMAKE_PROJECT_INCLUDE_BEFORE",
    "CMAKE_TOOLCHAIN_FILE"

will be checked to see if the existing values have the same values
from the initial cmake parameters list.

Only the CMakeCache.txt values that do not exist on the file system
will be updated.

If not, the updated value will be presented in the dialog for upgrade,
or marked as bold in the settings dialog.

CMAKE_PROJECT_INCLUDE_BEFORE is dependent on Qt Creator version / path
and needs to be updated.

Fixes: QTCREATORBUG-24443
Change-Id: I1eeb44df3a7914051084ef405af5f5621cc5a4e2
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-06-30 14:36:41 +00:00
hjk
a2790ac95b Utils: Implement FilePath::withExecutableSuffix()
Change-Id: Ibf6919991b229eb91953b3c5b5cbb75a1be7ff5d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-30 13:24:59 +00:00
Leena Miettinen
28abf32b30 Doc: Describe new refactoring actions
Task-number: QTCREATORBUG-25642
Change-Id: I5aeb72ce81d82d72627720145947172135533995
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-06-30 12:33:17 +00:00
David Schulz
813c4b807a Clangd: add quick fix factory
Change-Id: Idea71364b0e3f528e9dd366d46a2797f5056dfed
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-06-30 12:29:58 +00:00
David Schulz
1d39465a1b LanguageClient: export code action quick fixes
Change-Id: I571378580a1f56bc649662c68eb306a081c0c091
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-06-30 12:29:52 +00:00
Christian Kandeler
f9083cc6ad ClangCodeModel: Keep a QPointer to the ClangdClient in ClangdTextMark
Apparently, the pointer might already be invalid when
addToolTipContent() is called.

Change-Id: I649bdca0945247b2b8ce4f709721c4d0bf96a11b
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-06-30 12:29:44 +00:00
Jarek Kobus
6a142dfd95 Fix the "Cannot remove a null widget" warning
After the 867c0b8d8a53974074b1fff5b132f3ae9f150066 got integrated
into qtbase, Qt started issuing a warning on Creator shutdown.
The reason is that mode's widget might be deleted before the
mode's destruction. Deleting the mode's widget removes it automatically
from the contained stacked layout of the mode manager. This
means that the indices inside the stacked layout and those inside
the ModeManager's d->m_modes list are now out of sync.
FancyTabWidget::removeTab() can't find the right widget for the
passed index now or returns wrong widget for it.

The fix is to remove removeMode() method (and in turn some more
unused now). The context objects don't need to be removed on
shutdown, and the remaining mode's widgets will be deleted
by Qt itself when the main windows is destroyed.

Fixes: QTCREATORBUG-25925
Change-Id: I70c2773eea2984c5d06ce3bf71a4271b267efbe0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-06-30 11:41:34 +00:00
hjk
4a8c222c18 Utils: Add FilePath::symLinkTarget
And implement it for the docker device.

This replaces the previous unused and not really implemented
FilePath::resolveSymLinkTarget.

Change-Id: I9dcb4f8276dbb88b21959276da0d50135742fba0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-30 11:11:10 +00:00
hjk
4c3bbba75c Debugger: Fix typo (target-remote vs target extended-remote)
Change-Id: Iec25998654c32652d42d1ef3f82e474646c16424
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-30 11:09:27 +00:00
Christian Stenger
7fd4691a7a CMakePM: Try to improve file information for ctest
The ctest information regarding the test case itself cannot be as
adequate as the information coming from the code model.
Nevertheless depending on the used mechanism we might end up in
places that will not be helpful when using the test tree to open
files of ctest. Try to get closer to the real declaration source
if we can.

Change-Id: Ia9d217f0cdc6de6230d89dd342b60856cf1312b8
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-06-30 09:48:45 +00:00
Christian Kandeler
673d596c84 ClangCodeModel: Provide tooltips via clangd
Note that we temporarily lose the ability to hover over an include and
get the full path of the header file. This is a valuable feature that we
need to restore, preferably by fixing clangd itself.
Fixing the remaining few test failures would likely require more
complicated code as well as additional LSP round-trips, and as of now
I'm not convinced it is worth the effort.

Change-Id: I08c72c4bd1268bbd67baeb57bbfd29d9b11303a5
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-06-30 08:49:24 +00:00
Christian Stenger
eef0769d7a Docker: Remove unused lambda captures
Avoids warnings.

Change-Id: I9bf836ff24fa6524571d0303e544189340dede32
Reviewed-by: hjk <hjk@qt.io>
2021-06-30 07:18:37 +00:00
Eike Ziller
bb195a95c7 Remove ExtraCompilerFactoryObserver
Was only used by PchManager.

Change-Id: I610c1d4215613eb494e48225329660c1e2680d49
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-06-30 07:06:11 +00:00
hjk
d97c10a42e TextEditor: highlighter.cpp code cosmetics
static, namespaces.

Change-Id: Id824f6979ce6c6ec6bbe4847c808c7ae47d26695
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-06-30 06:49:23 +00:00
hjk
bce19b73c5 TextEditor: FilePathify Repository *highlightRepository()
Change-Id: I66ed44e199fa26b28e23497c2650224e6331baa7
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-06-30 06:48:58 +00:00
Leena Miettinen
0df21e8f1b Doc: Update supported design tools and versions
Change-Id: I15eb3a1f395b485a3ca19ae73bdf6815fd0d5935
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2021-06-30 06:45:11 +00:00
Leena Miettinen
85df898958 Doc: Add descriptions of concepts and terms
Fixes: QDS-3475
Change-Id: I82b9c10fe506c0bdc4890e0a53fdd442a80ddb49
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2021-06-30 06:44:52 +00:00
Leena Miettinen
0ef56472b7 Doc: Describe the properties of Animation components
Fixes: QDS-4465
Change-Id: I42cdad8694feb612946a95d1bca77ddd1d6f5982
Reviewed-by: Johanna Vanhatapio <johanna.vanhatapio@qt.io>
Reviewed-by: Brook Cronin <brook.cronin@qt.io>
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2021-06-30 06:44:00 +00:00