Commit Graph

71171 Commits

Author SHA1 Message Date
Leena Miettinen
1b24bd52b0 Doc: Update information about multi-cursor editing
Fixes: QTCREATORBUG-26459
Change-Id: I89ac09094fe707a5d432cfe84c8b3ee18887a424
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-25 06:46:36 +00:00
Jarek Kobus
474ce0399d Ignore the wheel event explicitly in order to propagate it further
Qt 6 brings a behavioral change regarding delivery of wheel events:
92df790f46b3a8b17aec2f385d6472fd3f8647f6 and
2a857ee28315c5bacfe2ecaf402ca9005b35c20e. If there is an event
filter installed and wheel event is being processed, the event
is now accepted by default, which means that after returning
true from eventFilter(), the event is not propagated anymore.
Since we want to redirect the event to the parent HelpViewer object,
we explicitly ignore the event prior to returning true.

This patch fixes the QTextBrowser backend.

Amends 0b96a1b76b

Fixes: QTCREATORBUG-26369
Change-Id: I7a0167c54f830fffab13d73eb91cb2ecbd730c86
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2021-10-25 05:48:56 +00:00
Christian Kandeler
404cf0f632 CppEditor: Mark generated setter as slot only for QObject-derived class
Fixes: QTCREATORBUG-25789
Change-Id: I79174bcd617eb54540009491031cfae380383c41
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-22 12:34:51 +00:00
David Schulz
86061fb44a LanguageClient: save document version for semantic tokens
Change-Id: Icd17e7f140cd172b2515711a3562c479f0ad488d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-10-22 09:23:27 +00:00
Christian Kandeler
9f7cdd6d3c CompilationDbProjectManager: Fix tree scanning
- We checked for the QFuture's canceled status at a time where it would
  always yield true.
- A pointless default value was used for the project root path.

Fixes: QTCREATORBUG-26356
Change-Id: I4d17c6ecb7e9e7e71df737d85b42feb37d3ead5d
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-22 09:06:09 +00:00
David Schulz
0a7935d449 ProjectExplorer: fix comparing toolchains on redetection
Use the specialized operator== of ToolChain when looking for priorly
defined autodetected tool chains.

Fixes: QTCREATORBUG-25697
Change-Id: I477d29695eef2acb1ba566d42df9b1e57d26eb07
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-10-22 08:12:52 +00:00
Christian Kandeler
2085e2ad0b CppEditor: Make sure fallback project part is up to date
... with regards to the session include paths.
Amends 0636238429.

Fixes: QTCREATORBUG-26323
(cherry picked from commit 8c86b9bca1)
Change-Id: I972a314db607d0b06859744dec4c83e885be3b5c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-22 08:01:54 +00:00
Leena Miettinen
75bdc64d44 Doc: Move images that only appear in QDS Manual
...from doc/qtcreator/images to doc/qtdesignstudio/images

Change-Id: Iaa49fbb4d620a833edd41b97874aad631b7c25b5
Reviewed-by: Johanna Vanhatapio <johanna.vanhatapio@qt.io>
2021-10-21 14:23:12 +00:00
Kai Köhne
c565846723 Update details about LLVM/Clang in acknowledgments
LLVM moved to github a while ago - the old svn repositories are dead.
Furthermore, (almost) all of the code is now under the "Apache 2.0
with LLVM Exception" main license
(see also https://foundation.llvm.org/docs/relicensing/)

Change-Id: I8319f8479357c6182c5bf78b1ee7fe202e666980
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-10-21 14:10:59 +00:00
Alessandro Portale
6fd8336b7f Wizards: Remove unused QtQuick.Controls-style preview thumbnails
These were never used. And updated ones are upcoming with the new QDS
application wizards.

Change-Id: I998c3c0b8cfa3033d8be46524db3ed978738e729
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-10-21 13:16:30 +00:00
David Schulz
bd4393a72c ProjectExplorer: use logging rules for debug output
Change-Id: Ia99286182cf75eedab920695f3186ca00100ae73
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-10-21 12:27:14 +00:00
Christian Kandeler
c3cee40411 QmakeProjectManager: Do not leak QmakeEvalResults
Fixes: QTCREATORBUG-26326
Change-Id: I2a4abf86e9dd607bf7a0bf0843b0c9bff943d704
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2021-10-21 12:21:32 +00:00
Christian Kandeler
d7c7089ff3 ClangCodeModel: Restart clangd fallback client
... on fallback project part change.

Change-Id: Icfc355443b4d6bb3c94eae27c2d23bbd9f681211
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-21 09:23:38 +00:00
Eike Ziller
ea1655881d CMake build: Force -fPIC for static libraries on UNIX
Usually that is done by Qt, but not if reduce_relocations is off.

Fixes: QTCREATORBUG-26435
Change-Id: Idd337d59555fd6e732215b9c753820672f63c91f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christophe Giboudeaux <christophe@krop.fr>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-10-21 08:33:31 +00:00
Johanna Vanhatapio
f40aa23d93 Doc: Update the Scene Environment Topic
Task-number: QDS-4888
Change-Id: I63d17e02054a2a475e43f1e0ac9c5691422cf703
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2021-10-21 07:55:15 +00:00
Jarek Kobus
0101808407 Refactor HighlightingResultReporter
In some unlikely circumstances it may happen that
HighlightingResultReporter might be destroyed before
returning from the HighlightingResultReporter::start()
function. This may lead to undefined behavior.

Refactor the HighlightingResultReporter so that instead
of using QRunnable subclass we define simple function
returning the QFuture object directly.

Change-Id: Ib833771a7e46e87c83d10b59ca056a0147fabe88
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-10-21 07:38:53 +00:00
Christian Kandeler
ec633061d4 ClangTools: Fix fix-it application
The logic for applying formatting was completely broken and had
obviously never been tested with a formatter that does anything.

Fixes: QTCREATORBUG-26420
Change-Id: Iffc1784b225969b86b221afb16c06e8e0d053b91
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-21 07:16:32 +00:00
Tim Jenssen
5377253612 qmlpreview: use empty messageReceived()
Default implementation already does not react on it.

Change-Id: Ieaca8ab0a700b9626a705567f228bdc05172c188
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-10-20 21:58:31 +00:00
Cristian Adam
7e62840ec1 CMake: Define BUILD_WITH_PCH before usage
On Windows QtCreatorAPIInternal.cmake would contain a check for
BUILD_WITH_PCH and if not set add a few defines to the DEFAULT_DEFINES.

First time the BUILD_WITH_PCH would not be set, because the option
will be set later, the DEFAULT_DEFINES will contain the specific non-pch
defines.

The second time BUILD_WITH_PCH would be ON and those non-pch
specific DEFAULT_DEFINES will be removed, and the build system has
to do a full rebuild because the defines changed.

Change-Id: I3f039a91667affc35f18103cfed062481f9dc93e
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-10-20 19:18:03 +00:00
Marco Bubke
428a9ee509 QmlDesigner: Use one synchronization struct
The arguments of the synchronization function are changing constantly, so
all tests have to adapted even for default arguments. To reduce this
changes now a struct is used as parameter.

Task-number: QDS-5196
Change-Id: Id3b6a530bcb8ab043eccce6526088f345d746235
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-10-20 16:42:47 +00:00
Marco Bubke
b4fcd05451 QmlDesigner: Introduce different modules for cpp, qml and directories
There are now different modules for qml, cpp and directory imports.
Cpp imports are qml import append by "-cppnative".

Task-number: QDS-5196
Change-Id: I599b224892c5ada0224a765d0bde8b32de20b061
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-10-20 16:41:55 +00:00
Marco Bubke
cb946ec307 QmlDesigner: Support multiple module ids per type
The type will be use source id and name instead of module id and name as
key.

Task-number: QDS-5236
Task-number: QDS-5238
Change-Id: Ibc9c298dc0a6363b630173ec4981d574cecd02ff
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-10-20 16:41:34 +00:00
Orgad Shaneh
3871e40f43 Fix qHash-related size compatibility warnings by MSVC
Change-Id: I3b7981ce78b67db4b996f99682284a0b911d8cd7
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-10-20 15:03:51 +00:00
Leena Miettinen
11c73adbe0 Doc: Remove obsolete files
References to these files have been removed, but the files
were forgotten.

Change-Id: I412d5daf2acf07b4f8c00715bc01e4422bbc1179
Reviewed-by: Johanna Vanhatapio <johanna.vanhatapio@qt.io>
2021-10-20 13:27:16 +00:00
Leena Miettinen
a99bd10860 Doc: Fix links to QDS tutorial images
Change-Id: I31315c9512e9fbad5f7462e5e82ba72666bb5719
Reviewed-by: Johanna Vanhatapio <johanna.vanhatapio@qt.io>
2021-10-20 13:14:13 +00:00
Christian Kandeler
15639d00ed ProjectExplorer: Prevent cascading "Replacement for" kit names
Fixes: QTCREATORBUG-26330
Change-Id: Id7abd00afb70fe2d2e3c1a43e2ea1298c0ff20cc
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-20 13:02:36 +00:00
Jarek Kobus
c292a4d591 Update qlitehtml submodule to incorporate the fix for broken shortcuts
The same happens in Creator.

Fixes: QTBUG-97189
Change-Id: Ib1e47176108d51ba6e7395cd7dfe0ab0325ea294
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-10-20 12:45:59 +00:00
Jarek Kobus
ac96f0fa06 Don't expand qrc items recursively
This fixes the recursive expansion of e.g.
"qtbase/tests/auto/corelib/io/qfile/copy-fallback.qrc"
which includes itself.

Change-Id: Ib345a2d6de4fa2eefd76eed58b99a72fcb8c84b5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-10-20 12:35:36 +00:00
Jarek Kobus
2948d282ce Don't call DocumentManager::addDocument() from non-main thread
Detect that constructor of ResourceTopLevelNode is being
run from non-main thread and omit creation of ResourceFileWatcher
in this case. The construction of ResourceFileWatcher
will be postponed until the node tree returns back
to the main thread. This happens later inside
Project::setRootProjectNode() when ProjectTree::applyTreeManager()
is called for the second time - this time it's done from the main
thread. In order to setup the lacking resource file watchers
we install an additional folder node visitor only in case when
the handler is called from main thread. The visitor
sets up the lacking resource watchers if that's still needed.

Amends: 0bcab32657

Fixes: QTCREATORBUG-26417
Change-Id: Ia1bfb7f284afb833b6b4291accc4d0a91bd0d6c5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-10-20 12:35:22 +00:00
Eike Ziller
ae0b648a85 CMake build: Allow compilation without QtQuick
Disable the parts that require it in that case.

Change-Id: I3f62eb9b325905ea225009aad6b9020cef545da6
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-10-20 12:07:39 +00:00
David Schulz
181a2927fe Editor: fix unindent
Fixes: QTCREATORBUG-26412
Change-Id: I9743d3ff10b89318270eee43899da6c2baccad20
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-10-20 12:02:17 +00:00
Eike Ziller
89d37fb65b Merge remote-tracking branch 'origin/5.0' into 6.0
Change-Id: Ibcf3ada2824dbbaae8aed0903af61bc95c1c7ce7
2021-10-20 12:19:31 +02:00
Christian Kandeler
19119b9533 ClangCodeModel: Use more suitable location for compile_commands.json
... for clangd.
Putting it in the build directory seems sensible in principle, but that
can be problematic for in-source builds. So introduce another level of
nesting to prevent conflicts.

Fixes: QTCREATORBUG-26431
Change-Id: Id66aa0852d206695f2fc2ec42292b1cecefe2b59
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-20 09:06:23 +00:00
Christian Kandeler
71e6e30dbf ProjectExplorer: Fix expansion of variables in working directory
... when actually running the binary.
Amends 3dd8831f14.

Fixes: QTCREATORBUG-26438
Change-Id: I69fb8df514cb3ab00df76e241a3e367031fce94b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-10-20 09:04:52 +00:00
Christian Kandeler
575ca89b3e CppEditor: Do not save clangd file path in settings
... if it is the default value.

Change-Id: I5efde72abe5a1979144352d09d461642f936224a
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-20 09:03:53 +00:00
Leena Miettinen
ac2906cd60 Doc: Update info about available project wizard templates
The Qt Quick Application wizard template was simplified.

Change-Id: I716d8d03aa508b6f8204b028c5e11691e1e469c3
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-10-20 09:00:50 +00:00
David Schulz
a95ee64fed Editor: Fix build for Qt < 5.15.2
Change-Id: I06d1ec50159f3370fde05633de8e14f599140369
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-10-20 08:07:17 +00:00
Eike Ziller
0e5d632e5b Move FilePath's hash methods to the right header
Change-Id: Ie3932daf381bc03f37ae67722dcddc5b2e4823e5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-20 07:53:52 +00:00
Eike Ziller
93ae6f4c06 Fix performance issue in Locator with Qt 6
Locator tries to de-duplicate entries in case results from multiple
filters are collected. This is done so we don't get e.g. multiple
results for file names, from the various file filters (open documents,
project files, included files, ...).

For this we define operator== and qHash for LocatorFilterEntry, and add
them to a set of "seen" items based on their "internalData" QVariant.

For string data that works fine. For non-string data we used qHash for
the variant's internal data, and that changed in Qt 6 so we get the same
hash a lot of times which hits on the performance big time.

Defining qHash generically for QVariant isn't really supported. Since
our use case is to de-duplicate items if the internal data is a string,
simply restrict our de-duplication to that explicitly.

Fixes: QTCREATORBUG-26415
Task-number: QTCREATORBUG-24098
Change-Id: Ifdad17e7e66e9fe4b1300de51c45a5efac73cf3a
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-20 07:51:42 +00:00
Christian Kandeler
755932eca7 CppEditor: Fix crash
Fixes: QTCREATORBUG-26441
Change-Id: Ib5a99d474eac8677a65eb8a4a9b4fbe259c61ad3
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-10-19 16:25:31 +00:00
Mahmoud Badri
5de4743bb4 QmlDesigner: Persist horizontal component library's selected category
Moved showing and hiding categories logic to Cpp side so that:
- Currently selected category is persisted when the component library
  model is reset.
- QML side is clean of the mix of logic and UI.

Also reworked some logic/variables that are making the logic complex.

Task-number: QDS-5215
Change-Id: I8e9f5893f37a982283f1b1be9fee022f0b8afa32
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2021-10-19 14:13:58 +00:00
Mahmoud Badri
80feee2b63 QmlDesigner: Distiguish between cancel and fail when importing assets
When asset importing fails we show a warning, but not when the user
cancels the importing.

Change-Id: I950d3b43c0f7c78a5abfb31a1974d2a9cd193522
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2021-10-19 14:10:18 +00:00
Eike Ziller
57b5cd69b9 Fix build with C++20
"erase" without namespace conflicts with std::erase, with the latter
taking precedence.

Amends 9929d3dd73

Fixes: QTCREATORBUG-26386
Change-Id: I7fa64827ad61f1da262ce48082854975bc431c69
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-10-19 13:02:03 +00:00
Jarek Kobus
39b36bf773 Remove unneeded terminating of failed process
Since we employ QtcProcess, the reaping of possibly
running process is done internally by QtcProcess already.

Change-Id: Ie65314a4aecf5bb1808b0f2c46a50503d82fd6fb
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-10-19 12:57:35 +00:00
Christian Kandeler
d40fa5b353 LSP: Allow users to see timing data
It's often interesting to know how long it takes for a reply to a
request to come in. While that data is in principle already available
from the inspector, a dedicated logging category gives much quicker
results.

Change-Id: Idd43c6e69422140863a7adaa33a7bc17dd8e6492
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-19 12:47:17 +00:00
Mahmoud Badri
5cdce37ea4 QmlDesigner: Refactor the code for adding assets
Change-Id: I25ddfb6df40494eee92d2d90faf3e90c15a82c3e
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2021-10-19 12:41:31 +00:00
Christian Kandeler
8c86b9bca1 CppEditor: Make sure fallback project part is up to date
... with regards to the session include paths.
Amends 0636238429.

Fixes: QTCREATORBUG-26323
Change-Id: I8e2cd5f5e87d9dc3d2df3f943e13599bc7139768
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-19 12:20:47 +00:00
David Schulz
fc11797218 Editor: update ksyntaxhighlighting engine to v5.87.0
Change-Id: If9dab8b321799f0ce908c831e812c20301a714e1
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-10-19 10:44:16 +00:00
Christian Kandeler
e77e57420a ClangCodeModel: Check for AST nodes from foreign files
... when highlighting with clangd. This can happen due to macro
invocations or unusually placed includes.

Task-number: QTCREATORBUG-26396
Change-Id: I471faee13c62fa511bdedfdd5b864327e858f6b8
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-19 09:11:36 +00:00
Orgad Shaneh
4b245bbb49 DocumentManager: Check for permission change on every reload
Fixes: QTCREATORBUG-22447
Change-Id: Iae26c01b97340ee4d6bb67a4655534130ba5537f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-10-19 09:03:05 +00:00