Commit Graph

62421 Commits

Author SHA1 Message Date
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
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
The Qt Project
be5268d0a9 Merge "Merge remote-tracking branch 'origin/6.0'" 2021-10-21 08:13:59 +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
Eike Ziller
bb9774de92 Merge remote-tracking branch 'origin/6.0'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri

Change-Id: If8baed5564470e550a0ba5c7720915217eec2412
2021-10-21 09:13:03 +02:00
Orgad Shaneh
75705e3eab OutputPane: Fix inconsistency between output view buttons and popup menu
Since definition of function OutputPaneToggleButton::flash() sets the
button visibility to true this leads to inconsistency which had been
described in ticket.

Task-number: QTCREATORBUG-19390
Change-Id: I5e88d2b42808cdec24d25e126b1c8de011a1db84
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-10-21 07:09:10 +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
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
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
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
Tasuku Suzuki
f41bebc843 Core: Disable the "New Search" tool button after clearing searches
Change-Id: Ib0784faf4ebfe867ed6977b97c3fdd07978f5a68
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-10-19 14:39:57 +00:00
Tasuku Suzuki
fa54b01dc5 Find: Enlarge Scope combobox
When a project name is long, "Project %1" isn't fully visible.

Change-Id: I7f265d9a2c5c61cd4baa7b0829223fc8cf07061c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-10-19 14:39:36 +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
Huixiong Cao
eb7efec934 Support MIPS 32 and 64 abi simultaneously for mips architecture
The original implementation only support MIPS 32. Extend it to
support MIPS 64 too.

Change-Id: Ibd11d93f448c87a5643d23014f07dcd9eb420544
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-10-19 10:49:00 +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
Mahmoud Badri
6a6faec3b6 QmlDesigner: Prevent error reporting when cancelling resouces dialog
Task-number: QDS-5265
Change-Id: Ie2583fae8d1fd8564243499f30c6a2f82fd1dbbd
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
2021-10-18 16:53:58 +00:00
Alessandro Portale
719cdfd426 ProjectExplorer: Don't print out warnings when wizard.json parsing fails
If plugins are disabled (e.g. Designer), some form page types (e.g.
"Form") might be missing. Therefore the parsing of some wizard.json
files will fail, which is expected.

A recent patch added warning output for this case:
   Failed to create wizard:  "wizard.json"

Let's remove that, because that is the job of Qt Creator's Option:
   -customwizard-verbose

Amends: 32799b3a7b

Change-Id: Idda037c2e48ef290ff95754393572ec4309347b2
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-18 16:22:36 +00:00
Orgad Shaneh
badc1f8551 Debugger: Use correct macroExpander when substituting regexp
Change-Id: I1d17063044b0e0e52b055a3e53b214f311cf6008
Reviewed-by: hjk <hjk@qt.io>
2021-10-16 16:43:36 +00:00
Thomas Hartmann
3cde937ea1 QmlDesigner: Fix casting of <cpp>.bool
Font.bold is of type <cpp>.bool and we did not recognize it.

Task-number: QDS-5274
Change-Id: I420dc62e1f1dc8b9e22a2c0678c882a72d8b0907
Reviewed-by: Aleksei German <aleksei.german@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-10-15 16:10:00 +00:00
Jarek Kobus
10a6497146 Sync mimeglobpattern sources with Qt
The optimization for VdrPattern and AnimPattern speeds up
loading of Qt6 project with further ~200 ms.

Change-Id: I28451a627d6c509854907736da48efcf68a86019
Reviewed-by: hjk <hjk@qt.io>
2021-10-15 15:03:03 +00:00
Christian Kandeler
13bca02801 ProjectExplorer: Clean paths in OutputLineParser::absoluteFilePath()
Fixes: QTCREATORBUG-26422
Change-Id: I350bbd076007647c4de21db08f2b034d654eb812
Reviewed-by: hjk <hjk@qt.io>
2021-10-15 14:57:38 +00:00
Mahmoud Badri
a746510937 StudioWelcome: Fix studio welcome plugin crash
crash introduced by ea8400a9ff

Change-Id: I7302e71076634caaf68dd52cf61451110629ce0d
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2021-10-15 13:54:29 +00:00
Christian Kandeler
5f1e6b15bf LanguageClient: Only present snippets in addition to proper completions
Prevents spurious suggestions of snippets and is in line with what we
did for C++ so far.

Change-Id: I54e11b6567f00938f9aa7dfe771547471e87439c
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-15 12:46:32 +00:00