Commit Graph

68568 Commits

Author SHA1 Message Date
Jarek Kobus
6a2088d8ec Provide empty implementation for ILocatorFilter::refresh()
Make this method just virtual, not a pure virtual.
Remove all empty reimplementations of this method.

Change-Id: Idf10e492355e8519172facd421ea0b2b13ce3b80
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-02-11 13:32:30 +00:00
Jarek Kobus
9ad5cd5f58 Wait for finished the canceled task before starting a new one
When Locator::refresh is called, the refresh may be currently
ongoing - in this case we cancel it (and don't wait for it to
be finished) and start a new refresh. So, in theory, refresh
may be running in parallel on more than one non-gui thread.

The consequence may be, that when we then shutdown, we wait
only for the last refresh to finish (we are connected to
m_refreshTask), and doesn't wait for the canceled one to be
finished. This may potentially cause a crash.

We fix it by ensuring, that only one refresh task is run.

Change-Id: I62eeb00375124cdc0ab4651e9280226071d47f3f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-02-11 09:52:26 +00:00
Eike Ziller
95e7bdfdb7 Locator: Cancel running search when closing
When closing e.g. a separate window with a locator search running, we
don't need the search to continue. Save resources by cancelling it.

Change-Id: I889b9cd163a9cc79045fb0eda9797856c489bd39
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2021-02-11 09:48:15 +00:00
Miikka Heikkinen
359fa8e877 QmlDesigner: Support updating imported assets
Added support for overwriting file-based assets such as images when
an asset with the same name is imported to the same location.

Assets tab will now also refresh its icons if underlying files are
modified. Added local caching of icons to avoid regenerating unchanged
icons. Also added bit of a delay before responding to a file system
change, which should improve performance when multiple assets are
imported at once.

Fixes: QDS-3644
Change-Id: Id452d3b1de8f4651a36401878c5067655865b675
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2021-02-11 09:47:06 +00:00
Miikka Heikkinen
7e0f0e470e StudioWelcome: Pause splash close timer while restart dialog is active
Fixes: QDS-3332
Change-Id: I16e6646202c97453b76a5e3a848b733ad460514c
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2021-02-11 09:47:00 +00:00
Christian Kandeler
5f5f38e028 ClangCodeModel: Support "parentheses" matching for ternary operator
That is, show which ":" belongs to which "?" when the cursor is on one
of them.

Fixes: QTCREATORBUG-1410
Change-Id: Ie19360b3dfc82d92c264d99a5aa1864eda66e5c8
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-02-11 08:52:17 +00:00
Christian Stenger
c058ceead4 FakeVim: Fix compile
Amends f83eeb0548.

Change-Id: Ia709c45800c63375de0ef995ee8bd37d54c45d26
Reviewed-by: hjk <hjk@qt.io>
2021-02-11 07:58:27 +00:00
Jarek Kobus
ec8411f86a Don't call method with BlockingQueuedConnection from refresh()
This may cause a deadlock on shutdown, when main thread
blocking waits for a thread to finish, and BlockingQueuedConnection
requires a main thread to run event loop, otherwise it blocks.

Looks like it should be safe to replace it with QueuedConnection,
as the point in time when OpenDocumentsFilter::refresh() is being
called is arbitrary, so no need to ensure that refreshInternally()
in the main thread was already called when leaving
OpenDocumentsFilter::refresh().

Change-Id: I39a1b9b1c82f1e9ed7e6ad5c183c5f9f41a1a061
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-02-11 07:56:18 +00:00
Eike Ziller
7c0c98a438 Locator: Do not block main event loop
There are multiple locator filters (SpotlightLocatorFilter,
JavaScriptFilter, HelpIndexFilter, the LanguageClient filters) that
depend on the main event loop, and might lock up if that does not run
anymore.

So we cannot use waitForFinished. Cancel a running locator search, and
tell the plugin manager that we need to wait for asynchronous events to
finish before shutting down.

Amends cb5977fbad

Change-Id: Id0b3dc75bc22f21b34be39c3bdbec915b60bdee6
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2021-02-11 07:49:25 +00:00
Eike Ziller
845dee5895 Prevent locator widgets from running in parallel
We make a promise to locator filters that their prepareSearch() and
matchesFor() methods are never run in parallel, and never more than a
single matchesFor() call is running at the same time.

This broke with the introduction of multiple locator widgets (in
multiple windows).

Extend the existing code that makes a locator widget "wait" for a
running search to cancel and finish, to wait for any locator widget to
cancel and finish. Save the currently running search in shared future
for that purpose.

Change-Id: Id81f31faad9321cbd42bd451c452e542c99bde3a
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2021-02-11 07:49:14 +00:00
Jarek Kobus
a3677c15e7 Compile fix - use Utils::optional
Amends f83eeb0548

Change-Id: Iad1ca06bf546405873aaf8daebbdb76b79f4c0ff
Reviewed-by: hjk <hjk@qt.io>
2021-02-11 07:47:54 +00:00
Tom Praschan
f83eeb0548 FakeVim: Add emulation of vim-exchange plugin
Change-Id: I844c9bf11231ab842cee020a0e7a29af8ed209eb
Reviewed-by: hjk <hjk@qt.io>
2021-02-10 16:11:50 +00:00
Vikas Pachdha
51a3501e81 QmlDesigner: Sync signal handlers when merging ModelNode
Task-number: QDS-3702
Change-Id: Ia4f8484b181150383b711706f5e5adc166012b69
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-02-10 15:09:12 +00:00
Erik Verbruggen
3b1bc1d053 Add Qt for MCUs examples to the welcome page
Fixes: QTCREATORBUG-25320
Change-Id: Ic770e55f41b50d384f9964cabfa7ef031dcacc13
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-02-10 13:14:55 +00:00
hjk
67a3d2e3d1 Utils: Consolidate some aspect API
Handle setting and updating of tool tips, visibility, and read-only
state centrally.

Change-Id: I95205bbb173093ed60f2bf337ac86f3d7ed6d1cd
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-02-10 12:30:39 +00:00
hjk
f2321b1ae0 Tools: Only ask for "Password required" in qtc-askpass
More generic. Makes it re-usable for sudo.

Change-Id: I0149ed2e4d87a5904113c8a798d1782ee14beba2
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-02-10 12:26:22 +00:00
Cristian Adam
15487863ac ProjectExplorer: Use canonical paths for compiler toolchain match
On Linux (Ubuntu 20.04) Qt Creator would use /usr/bin/g++ as
compiler for C++. CMake would pick /usr/bin/c++ as C++ compiler.
Both of them are symlinks to /usr/bin/x86_64-linux-gnu-g++-9

ammends 4ae5516453

Change-Id: Id50cb47ed4e728541baed6a191435f2ad0137628
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-02-10 11:47:34 +00:00
Alessandro Portale
9e2c6fbfca Android: Deduplicate string literals and use constants instead
Improves findability of identical string in code (via code model).
Reduces risk of typos.

Change-Id: I0e9d9af8eed5cd9b66bf303cfee99c53513bf314
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2021-02-10 10:32:15 +00:00
Christian Kandeler
67788a90bb ClangTools: Enable filtering in config widget
This makes it easy to search for certain checks.

Fixes: QTCREATORBUG-24851
Change-Id: I94521aade4b54e80113aa31db9bed91ecb230016
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2021-02-10 09:34:39 +00:00
David Schulz
63668f8119 TextEditor: RefactoringChanges improve readability
Change-Id: I0626f3e97eda6228130fe094c596ccbb3901b079
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-02-10 09:32:35 +00:00
Christiaan Janssen
4b6f1c1366 McuSupport: Display errors when generating kits automatically
Fixes: QTCREATORBUG-25260
Change-Id: I5e45a56d08920886b2f654a1c98a7451e1c9dc3f
Reviewed-by: Dawid Śliwa <dawid.sliwa@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-02-10 09:29:56 +00:00
Jarek Kobus
1b0ad83b99 Mark that shutdown has started and don't start any new thread anymore
Amends cb5977fbad

Task-number: QTCREATORBUG-25318
Change-Id: I650389d53571724fe1ec4e299d7d3d8cf4a24061
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-02-10 08:25:51 +00:00
Christian Stenger
ec9a72808f Tests: Fix pluginspecs test for cmake
Change-Id: I700bd9cbcdabfa08863ffb727a084a9339e660d5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-02-10 05:24:38 +00:00
David Schulz
15b0a902e9 LanguageClient: Improve formatting
Use Utils::ChangeSet and TextEditor::RefactoringChanges to apply the
text edits that are reported from language server to format the current
file.

Change-Id: Id2f490b6e2791f676ebc751219bfbbf9e178f120
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-02-10 05:19:57 +00:00
Bernhard Beschow
2d92ae391a AutoTest: Prefer ITestBase::type() to ITestBase::asTest*()
The casting provided by the asTest*() methods isn't made use of here, so
using the "data-oriented" type() method seems more expressive.

Change-Id: Ia3e1a28d126f096afed54eeb0d884c52332f4350
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-02-09 22:38:20 +00:00
Christian Kandeler
e740295b8d CplusPlus: Fix minimal name construction
... when creating the constructor implementation for a derived class.
We would erroneously strip off the class name.
Amends aae3ce15aa.

Change-Id: I62c800d490626e8cb9416829633f9ef7b0c666cd
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-02-09 16:56:12 +00:00
Jarek Kobus
cb5977fbad Stop executing locator's threads when about to shutdown occurred
Mark that about to shutdown has occurred and don't start
any new thread after that.

Fixes: QTCREATORBUG-25318
Change-Id: I14d47c93dd8e8a82f6f68264a03d5831ec95da75
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-02-09 15:29:47 +00:00
Eike Ziller
eb7110ddd8 iOS: Rename signing settings widget and make independent from qmake
The build settings widget for the signing settings should not depend on
qmake specifics. Move these to the build configuration.

Change-Id: Ie5feba577304fae9bde3ed01530250d02be982e1
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-02-09 14:39:42 +00:00
Christiaan Janssen
5b7a3fba27 McuSupport: Display errors when configuring Qt for MCUs SDK
Fixes: QTCREATORBUG-25258
Change-Id: I6f445bddb51f3bc1850793966f049c4b7ce7889f
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Erik Verbruggen <erik.verbruggen@me.com>
2021-02-09 13:10:07 +00:00
Christian Kandeler
ef5b4b8db5 ProjectExplorer: Aspectify "disable for subdirs" MakeStep setting
Along the way, this also fixes that the setting was not preserved.

Change-Id: I753873a582e221d08c0350c3c38249e3330ae03c
Reviewed-by: hjk <hjk@qt.io>
2021-02-09 12:57:10 +00:00
Jarek Kobus
9d0b661551 ClassView: Remove redundant call to clearCache() before resetParser()
clearCache() is already called from inside
Manager::resetParser() ->
Parser::resetDataToCurrentState() ->
Parser::resetData() ->
Parser::clearCache().

Change-Id: I270be85b291f99552959e50ee54bd6e1f293c63a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-02-09 11:33:44 +00:00
Eike Ziller
c98e320082 Merge remote-tracking branch 'origin/4.14'
Change-Id: Iea91e66d30f797c079fe09e12a6744c36c58be1a
2021-02-09 11:42:57 +01:00
Jarek Kobus
1b9c0c7ef5 Simplify interface of classes in ClassViewPlugin
Remove unused methods. Replace one slot with a call
to lambda.

Amends a673fca144

Task-number: QTCREATORBUG-25317
Change-Id: I1125b62b9ea66b8dc43038a6b748d52a5a27224f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-02-09 10:14:17 +00:00
Christian Kandeler
30d4f7b48c RemoteLinux: Make remote process PID parsing more robust
- Do not assume that the PID string is the first output.
- Do not assume output has already been read when the process finishes.

Fixes: QTCREATORBUG-25306
Change-Id: Ia7cec6113e7f86469da2e6e0c62e08b38213093a
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2021-02-09 10:05:23 +00:00
Christian Kandeler
058841e8de Locator: Enable to show C++ type aliases
These were not showing up in any global symbol list so far.

Fixes: QTCREATORBUG-5800
Change-Id: I8e5c3b9b26f09d8cbcd31431e28c103da05d9bf8
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-02-09 10:00:56 +00:00
Henning Gruendl
27eb98faf2 QmlDesigner: Fix ExtendedFunctionLogic initial color
Change-Id: I39cd29528722552ca37e4ce78d6f4a7819ee3e9c
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-02-09 09:24:08 +00:00
Tom Praschan
509d5895f8 FakeVim: Merge comments when joining lines with 'J'
This is the default behavior in vim as well

Change-Id: Ia4d56e3cfc7f91fc353078daefaabeada9a86bed
Reviewed-by: hjk <hjk@qt.io>
2021-02-09 08:56:47 +00:00
Tom Praschan
b6f26ed67a FakeVim: Add emulation for ReplaceWithRegister plugin
Change-Id: Iaaeef6ff51fe858b759c10adaac582f5858b6210
Reviewed-by: hjk <hjk@qt.io>
2021-02-09 07:33:03 +00:00
Maximilian Goldstein
e124ca962d Fix breakpoints not getting hit for .mjs files
Fixes: QTCREATORBUG-25328
Change-Id: I7e859fec62c7d0c3a34bd6a88e2c8a77c32fb932
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>
2021-02-08 17:22:55 +00:00
Thomas Hartmann
1641f2eb87 QmlDesigner.CapturedDataCommand: Store visible property
Change-Id: Idc2b4c9a859f9a9e03dea915ca98e91b4efdd488
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-02-08 16:58:12 +00:00
Oswald Buddenhagen
fa6d825c5f remove pointless process state checking
this partially reverts ddefe062c7 - contrary to what that commit's
message suggests, the process state doesn't just change out of the blue,
making waitForFinished() return false. that requires the process being
reaped, which may happen only if the event loop runs or one of the
I/O-related waitFor*() functions is called on that process.

note that the first condition in SynchronousProcess::stopProcess() was
actually bogus, as it makes obviously no sense whatsoever to insist that
the process is still running after waitForFinished() returned success.

qtpromaker was also plain broken - it would always terminate prematurely
due to thinking that the sub-process failed.

Change-Id: I44f332a6784ccc7e732ee868e38218f746141129
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-02-08 16:23:25 +00:00
Jarek Kobus
a673fca144 Simplify interface of classes in ClassViewPlugin
Allow for direct connections where signal emitter and
receiver live in the same thread.
Remove unneeded mutexState, as changes to state and
all queries of state are done in the same thread.
Remove some indirections by removing some signals
and by calling respective slots through
QMetaObject::invokeMethod() or directly.
Remove some unused methods.
Remove a code path of setState(false), as this was never called.
Remove an initial call to onProjectListChanged(), as initially
the state is false and a call is no-op.

This change doesn't influence the existing behavior.

Task-number: QTCREATORBUG-25317
Change-Id: I683525b49afaf04e155d1859bb85ee5dd8e26dd2
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-02-08 15:49:40 +00:00
Christian Kandeler
33d2d736ea CppEditor: Do not add redundant access specifier
... when inserting a member function declaration for a definition.

Fixes: QTCREATORBUG-5591
Change-Id: Ie85b435a1595832d0085abdcc0a4187d939820e0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-02-08 15:19:31 +00:00
Leena Miettinen
8cd9300eda Doc: Describe using md locator filter for searching
The filter enables users to search for apps, documents, and
other files using platform-specific external tools or commands.

Task-number: QTCREATORBUG-25162
Change-Id: I32e8d059fa374aac3be983e9461a138ac4c647a0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-02-08 15:10:36 +00:00
Miikka Heikkinen
a99978a247 QmlDesigner: Remove multimedia from possible imports blacklist
We now support sound assets, which require multimedia to use, so
removed multimedia from possible imports blacklist.

Fixes: QDS-3640
Change-Id: I84350c1f366b6e110b3e630950cac0b96049b380
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2021-02-08 14:09:07 +00:00
Christian Kandeler
9ddd354968 Wizards: Fix language string in .ts file
Fixes: QTCREATORBUG-25293
Change-Id: I6e0ed7d271d60e651bf7c0aacad36a2c8e0916ed
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2021-02-08 11:29:54 +00:00
Alessandro Portale
d2c4976bec Debugger: Fix theming issues in the QML Debugger Console
Use QPalette::HighlightedText for text on selected QML debugger console
items. Also, use QPalette::Highlight/Base for the background area. Both
changes make the console behave like a standard Qt itemview in that
regard, and therefore ensure a proper text contrast of selected items.

Fixes: QTCREATORBUG-25200
Change-Id: Ia292069c3b8d749166356496f16665345b57e3e0
Reviewed-by: hjk <hjk@qt.io>
2021-02-08 11:03:04 +00:00
Leena Miettinen
712d93e1c9 Doc: Describe Debugger settings in appropriate sections
Link to the "Debugger Settings" section where appropriate.

Task-number: QTCREATORBUG-24500
Change-Id: I7e19211c22bf0139678d49e46db3bd2bb04c7260
Reviewed-by: hjk <hjk@qt.io>
2021-02-08 10:57:04 +00:00
Leena Miettinen
d7a0b735c9 Doc: Move info about debugger settings
...to a separate .qdocinc file included from
"Interacting with the Debugger".

Change a conflicting section title in run settings docs.

Task-number: QTCREATORBUG-24500
Change-Id: I6e3e205d1dfdcfabaf80fc18bd2b73c1256644e4
Reviewed-by: hjk <hjk@qt.io>
2021-02-08 10:56:53 +00:00
Orgad Shaneh
dad2b3d84b Merge remote-tracking branch 'origin/4.14'
Change-Id: I7d55c01489dfcdd26fcf3ced9f26539a09073e8c
2021-02-08 12:56:36 +02:00