Commit Graph

68568 Commits

Author SHA1 Message Date
Jarek Kobus
e4a57d8de7 JavaScriptFilter: use atomic_bool for the m_aborted
Change-Id: I8cc268401205ea77e83657b412bdc42dff5b2963
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-01-29 15:19:26 +00:00
Eike Ziller
c245a642f2 Share "auto-detected" UI string and add tool tip
No need to have the same translatable string repeated at all these
places.
Also add tooltip to expand a bit on what "auto-detected" actually means.

Task-number: QTCREATORBUG-25291
Change-Id: I25d43486758ba17256cf7e1ea2eea0ec3d567b62
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-01-29 15:04:05 +00:00
Christian Kandeler
aae3ce15aa CplusPlus: Fix minimal name construction
... when using declarations are involved.
Second attempt.
I have a suspicion that this is not the "correct" approach, however:
    a) It appears to fix the problem.
    b) It does not break any tests.
    c) It's rather high in the call tree, so there's a low likelihood
       of breaking something else.
    d) Considering the hacky-looking pre-existing code dealing with
       using declarations (e.g. LookupContext::lookupByUsing()),
       it seems quite possible that there is no "correct" way with
       the current infrastructure.

Fixes: QTCREATORBUG-14524
Change-Id: I28c6e53137c21ce158bbd03b92b3db39146116d5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-01-29 14:21:46 +00:00
David Schulz
fa260e00ed LanguageClient: cleanup languageclientmanager
- sort includes
 - fix clazy and clang-tidy warnings
 - remove unused function
 - adjust naming ('interface' -> 'client')

Change-Id: I12ada223a7a04796f0e6ac992cedf83aefe2ecc0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-01-29 13:48:25 +00:00
Christian Kandeler
ff70b8a9fd SSH: Do not manage unshared connections
Unshared connections are not re-usable, so our whole book-keeping
procedure is not needed for them.

Change-Id: I1b6ca3d1658d139b6687425cf32f821548dddade
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-01-29 13:15:44 +00:00
Miikka Heikkinen
08a9b2a26f QmlDesigner: Fix navigator preview image for Image components
If there is no source property set for a node of Image based component,
fall back to component rendering to get the default image.

Fixes: QDS-3669
Change-Id: I44c14c996f0b3f61c82963fb5fc79577748bd33e
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2021-01-29 12:28:55 +00:00
Miikka Heikkinen
49c8ccbe87 QmlProjectManager: Show .hdr images in projects view
Task-number: QDS-2128
Change-Id: Ib95eb63618c198db51dd51edbe9272f734cdb0e2
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2021-01-29 11:59:04 +00:00
Leena Miettinen
6553df4a20 Doc: Display info about using Qt Creator variables in QDS Manual
They are needed for some more advanced actions.

- Move the section to a .qdocinc file that is included as
  necessary and modify defines where needed.
- Describe using tooltips to get more info about variables.
- Add a screenshot.

Change-Id: Ieb03ccf7de5f0c493c98ae356cdda4b4d3915832
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-01-29 11:38:55 +00:00
David Schulz
9759f9e169 LanguageClient: check current instead of page settings
It does not make sense to check the not applied settings of the
settings page when a document gets opened.

Change-Id: I6fda0cf6c524e79e17cc25b54c41527971179f8b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-01-29 11:16:46 +00:00
David Schulz
71da9d340d LanguageClient: use less magic when changing settings
Change-Id: I8c5f5a85bff7cf0cf0545199358c306f7f9b539e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-01-29 10:59:32 +00:00
David Schulz
785932f0f1 Debugger: improve std::unordered_map dumper for cdb
and fix dumper tests

Change-Id: I1debd25a835aba28d77e5605dc49a5ea01221995
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-01-29 10:59:23 +00:00
David Schulz
58ff83b85b LanguageClient: Fix restarting server that needs a project
Do not open the server for every open document that belongs to that
server and assign the documents to the correct servers.

Change-Id: I88a743489e7e4b396a112ad772926e90b22626f3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-01-29 10:59:17 +00:00
Christian Kandeler
e5982d9c3d CPlusPlus: Revert name minimization fix
This effetively reverts 87ec0f349f, which had unwanted side effects.

Change-Id: I03438c18f43b07a6560416af746132bc4471fbb7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-01-29 09:37:34 +00:00
Eike Ziller
a9cf7685c9 Make commands for File Name Index locator filter configurable
Change-Id: I4a110ed9184345eb6992f4fda59a76fc843b2f1e
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-01-29 09:11:45 +00:00
Jarek Kobus
9c5b62b226 BaseFileFilter: use default Data::operator=()
Change-Id: I721005c595cbea3f805a4143787411d30182f9dd
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-01-29 08:57:00 +00:00
Jarek Kobus
fe9051c25d ClangCurrentDocumentFilter: make use of prepareSearch function
Since it's guaranteed, that prepareSearch() is always called
from the main thread prior to the call to matchesFor()
from the other thread, we copy the data inside prepareSearch()
which we will operate on when matchesFor() is called later on.

Change-Id: Idf6a8e683356bb524eb4b5b1ce1e05b0ba065c8b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-01-29 08:08:42 +00:00
Jarek Kobus
af61c47c10 Conan: Add "Build missing" option to conan install step
By default this option is set to true.

Task-number: QTCREATORBUG-25275
Change-Id: Ia7d628026e4ff7d20cf4b22db89d9b5b6ff5a9ca
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2021-01-28 16:34:10 +00:00
Kai Köhne
f0cb3e3365 Conan: Do detect conan.exe on Windows
Change-Id: I85e03a4f41896e9d20d8d757cb414217adcd536b
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2021-01-28 16:24:08 +00:00
Christian Kandeler
87ec0f349f CplusPlus: Fix minimal name construction
... when using declarations are involved.

Fixes: QTCREATORBUG-14524
Change-Id: I0c391b88628f40973b6f601e60c64263f62a88a0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-01-28 14:31:49 +00:00
Christian Kandeler
667d50e1bc CppEditor: Fix "add definition" quickfix insertion string
... for the edge case of the insertion location being preceded by a
function whose body is a try-catch clause.

Fixes: QTCREATORBUG-14661
Change-Id: Icc7d5283ead81d644231479317214a8cc177493d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-01-28 14:30:20 +00:00
Leena Miettinen
534e5101de Doc: Hide Conan plugin doc sources from QDS doc builds
Conan is not used with QDS, so the docs are not a part of
QDS Manual.

Change-Id: I539afb58dd9762d088d2d22ea9793f819f89168a
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2021-01-28 13:03:08 +00:00
Eike Ziller
ad09faab4e Fix build with Qt 6
Change-Id: I5c775460563dde17a363ea875d7f993e4e4d6ecd
Reviewed-by: Leander Schulten <Leander.Schulten@rwth-aachen.de>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-01-28 12:49:50 +00:00
Christian Stenger
ba667a342b AutoTest: Restructure settings documentation
This patch restructures the settings part of the
documentation to have all related information is
at one location instead of scattered across the
whole page.
Additionally added some information for so far
undocumented features and fix URLs to referenced
googletest web pages.

Change-Id: Ic897237ea67e9cc11f7d0b55059c47108a6e0f3a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2021-01-28 12:15:59 +00:00
Fawzi Mohamed
30c6f44031 qmljs: fix check for version check in import
Change-Id: I77d0bdfdaeb79f8881bdf9ec52077cf1b70faf64
Fixes: QDS-3667
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-01-28 10:19:57 +00:00
Christian Kandeler
234a67d403 Update qbs submodule
To HEAD of 1.18 branch.

Change-Id: I1ae87430fa5579074eb44da7278ab3e22ada14ac
Reviewed-by: Richard Weickelt <richard@weickelt.de>
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
2021-01-28 09:01:54 +00:00
Jarek Kobus
44b090925c Fix synchronization mechanism in DirectoryFilter
Currently m_directories, m_filters and m_exclusionFilters
are being modified only in the main thread, while in the
other thread they are only read. The access to them is
being protected with mutex when reading in the other thread.
However, we don't lock the mutex when modifying them in
the main thread, so it may happen that the other thread locks
the mutex and reads the value while the main thread directly
modifies it without a lock.

As a remedy, we add lacking lock mutex when we modify it from
the main thread.

In case of m_files its value is being modified in the other
thread, so we add a protection when we use it in the main thread.
In order to avoid a deadlock we unlock the mutex by the end of
restoreState(), before calling updateFileIterator() which now
relocks the mutex.

This patch may potentially fix a crash reported in
QTCREATORBUG-25265 - the last two stack traces from two different
threads, having both a call to Core::DirectoryFilter::refresh().

Task-number: QTCREATORBUG-25265
Change-Id: Ic1adfb71c2325ae06e6c2303d41b758df31d012a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-01-28 08:23:08 +00:00
Andre Hartmann
cbac6e6d2f Import Projects: Mention more integrated project managers
As Qbs and Meson are supported by Creator, there is
no need to use a Generic Project for them.

Task-number: QTCREATORBUG-25282
Change-Id: I8bca0f6c990d5dc80ef67e4a38c32ad2b49c76df
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2021-01-28 08:17:13 +00:00
Eike Ziller
416461c8a1 Add changes file for 4.15
Change-Id: I7b09bf5149b6ac24ba75b8ed1cb661de932bdc08
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2021-01-28 07:46:02 +00:00
Eike Ziller
5cd4dc5e98 Add changes file for 4.14.1
Change-Id: I423c09ad1b75d6bd456c2f23ca9f525c7dce6463
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2021-01-28 07:45:22 +00:00
Thomas Hartmann
6830647004 QmlDesigner: Add annotation for position marker
Change-Id: Idb469841f3cf5dd8b26dc011d8e0e4387f0d7d1b
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-01-27 20:53:27 +00:00
Tim Jenssen
109abf9cac Merge remote-tracking branch 'origin/4.14'
Change-Id: I3ae27b1b017e93704e8c5bc3c69f64f6f6575559
2021-01-27 18:34:51 +01:00
Christian Stenger
f0e1f951fc Core: Fix qmake build
Amends ab8f26607d.

Change-Id: I14dfe860c7414a94c45a2df2deb839665f23a2e1
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-01-27 14:55:01 +00:00
Christian Kandeler
c53932ff40 Core: Fix crash with Search & Replace
Due to the use of a proxy model, we can no longer make assumptions about
the internal pointers of model indices.
Amends f3d7717b31.

Fixes: QTCREATORBUG-25278
Change-Id: Ia0225b0324897d16fe9650bf4282432278aeb63f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-01-27 14:11:52 +00:00
Christian Kandeler
ab8f26607d Fix qmake & qbs builds
Amends b585f24257.

Change-Id: I4b6781a0c8ab8dec95e934ac1a3b8cae4c991fef
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-01-27 14:03:23 +00:00
Henning Gruendl
bfa1524b36 QmlDesigner: Paint single/multi signal label
* Add single signals to the already painted single event labels on
  FlowView transitions
* Add signals to the already painted multi event labels on selected
  FlowView transitions
* Move function from signal list implementation to QmlItemNode avoiding
  redundancy

Task-number: QDS-3586
Change-Id: Ic504acfb1a7afcc9bde6f43ed811e9fc2f2443ab
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-01-27 12:26:07 +00:00
Eike Ziller
b585f24257 Add "File Name Index" locator filter on Windows
Using the freely available "Everything" tool that creates a global
file index and also provides a command line tool for accessing it.

Change-Id: Ieade7a8c0dd94695dabbd5f95b1f86e0d950d62e
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-01-27 11:38:01 +00:00
Eike Ziller
d1803f84e1 Add "File Name Index" locator filter for Linux
Using the "locate" tool.

Change-Id: Ic752b2d17e4874b95432510597ff33d5e3f967c5
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-01-27 11:37:57 +00:00
Eike Ziller
a4db238590 Make spotlight locator filter based on external process
As preparation for making it available on other platforms.

Change-Id: I9af5be2f73b1d535936972e6efb3d3e5a4d61c81
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-01-27 11:37:44 +00:00
Eike Ziller
df6967a897 Merge remote-tracking branch 'origin/4.14'
Change-Id: I6e67f23464fc14dda5a659004f0aa360d6f5d25f
2021-01-27 12:28:47 +01:00
Jarek Kobus
59718d7c4e Check if the document ptr is not null
Avoid a crash when double click in hierarchy view
after the session has been changed or when the filename
changed.

Change-Id: Iebd7a99c220737262c79ade43c4ee8d11dcc037f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-01-27 11:17:33 +00:00
Christian Stenger
9acde4f261 Fix a couple of cmake issues for testing
Correct expected paths, defines and dependencies.

Change-Id: Iae3fa708957e352012d0a6bb9cf97713b9a5c35e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-01-27 10:52:39 +00:00
Jarek Kobus
388fd31db8 Remove unused field
Change-Id: I7637171d9793a621d53be2c4da098eba246732f1
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-01-27 10:06:41 +00:00
Marco Bubke
70f50b3503 QmlDesigner: Bump up database version
We change the database schema.

Change-Id: I2715f47995374fe3d17ba97af9287af198c28959
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-01-27 09:44:47 +00:00
Jarek Kobus
672797cd05 Don't toggle "Disable in subdirectories" checkbox on every change in Gui
Rename the "checked" arg into "disabled", for clarity.

Task-number: QTCREATORBUG-25274
Change-Id: I652d769d4a0737787e90debde2ffaa28e8cd1870
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-01-27 09:22:09 +00:00
Christian Kandeler
d9e5d079be ClangCodeModel: Relax completion result filtering
... in connect() calls.
The logic was: If we are in a place where a signal is expected and there
are signals among the completion results, then we should consider only
signals.
However, in e.g. a member function of a QObject subclass, there are
always signals in scope, even when we expect a class name. So we need to
allow class names as well.
Amends a79b0c6558.

Fixes: QTCREATORBUG-25153
Change-Id: Id3bbaaf4f8eefefe36cfc91e5959d3ef5ad28071
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-01-26 15:55:41 +00:00
Eike Ziller
acfb2e4f2f CMake build/Linux: Fix location of separate plugins
We use GNUInstallDirs to define the location of plugins, libraries and
so on. If Qt Creator was configured with a specific set of locations,
we need to pass that on to separately built plugins even if
GNUInstallDirs would use different locations for them.
Otherwise Qt Creator cannot find these plugins.

Amends c81baf1a9c

Fixes: QTCREATORBUG-25266
Change-Id: Ib0da1428ec676fd54cb264b1aba4791b18b2c3bd
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-01-26 13:20:33 +00:00
Cristian Adam
242f2dbeaa CMakeProjectManager: Use buildDirectory instead of "."
When issuing cmake --build "." as an user I don't get to see which build
directory is being actually built.

To make things worse in project settings the build directory field is
disabled and cannot be copied.

Change-Id: Idf862ba1df68cde55e9785c934f67393da6c1616
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-01-26 11:32:47 +00:00
Thomas Hartmann
d6e50e77cc QmlDesigner: Use boundingRect() instead of contentItemBoundingRect
The contentItemBoundingRect is typically null, unless there is a content
item.

Change-Id: Ic32deac3c2506ff05feb28399b1ccaedacb5f68f
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2021-01-26 10:48:47 +00:00
Christian Kandeler
2604a8e485 ProjectExplorer: Use already-open visible editor, if available
... when following links from the issues pane.

Fixes: QTCREATORBUG-13961
Change-Id: I799e34f8fa789ef824b3b4aa2a075c938d6f1271
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-01-26 09:55:10 +00:00
Christian Kandeler
7a6aa75032 Fix various warnings about unused variables and functions
Change-Id: I430b87ab0afa8bf32115d44e8acb94271988d229
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-01-26 09:53:17 +00:00