Commit Graph

69140 Commits

Author SHA1 Message Date
Miikka Heikkinen
193f485be2 QmlDesigner: Fix unused variable warnings
Change-Id: I1616452753685bbd57eec8fc6e1c9934c63fef0c
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2021-06-22 08:54:41 +00:00
Assam Boudjelthia
7722ec5f0d Fix CMake templates information for Android
The CMake templates still point to information that apply only to Qt 5
when it comes to settings Android properties. This updates the template
to show the right way to define Android target properties on Qt 6 as
well.

Task-number: QTBUG-94597
Change-Id: I28e3dbd93eca352502b3d1b584f02924e2478c07
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-06-22 08:25:12 +00:00
Christian Kandeler
d6d2d18373 ClangdClient: Consolidate the job counter variables
We need only one of these.

Change-Id: Icb50890981fa1465e091abb42a52afc1b810fbf0
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-06-22 08:12:22 +00:00
hjk
76cf6ce983 Utils: Add a QtcProcess flag to keep stdin open
Needed to run e.g. gdb on-device.

Change-Id: I5a98df575478f18adf1540ced44f6808bdba0b76
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-22 07:48:36 +00:00
hjk
6acc10a8bd Debugger: Simplify one process error check
Change-Id: Icee7c6099cf958faf41abf4172752ff5cdc81fcf
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-06-22 07:43:42 +00:00
hjk
1769dbc17f ProjectExplorer: Use QtcProcess inside DesktopDeviceProcess
Change-Id: I0cc4b01d073699f6a8422addc3aafa24cca888c7
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-06-22 07:18:15 +00:00
Eike Ziller
6261e9917f Add zoom buttons and use editor font in build system output
in Projects mode.

Change-Id: I4adee900651192c83de5b3a851c1766f3cb35200
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-06-22 07:12:27 +00:00
Eike Ziller
c70d4ae243 Add filter input to build system output
in Projects mode.

Change-Id: I69f40d38606b724ba07833141ce9f2f60239e0e7
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-06-22 07:12:17 +00:00
Eike Ziller
f3997c565e Add clear button to build system output
in Projects mode.

Change-Id: I7ab5b460228f6c8a2c68ece87ccfbdef3608bd9c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-06-22 07:11:56 +00:00
Eike Ziller
d42953160b Fix build in clangd tests
Amends 40181057cd

Complained that the Q_DECLARE_METATYPE comes too late.

Change-Id: Id5dd355fadcb4a6790d4c74dd1c637e0b1569aa4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-06-22 07:02:53 +00:00
hjk
325773b5f6 Debugger: Introduce a GdbEngine::usesOutputCollector helper
Change-Id: Ia148baeb602c8794d0b5075afd4259f1529d727f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-22 06:28:03 +00:00
hjk
3ead72787e Qmake: Use FilePath for QmakeMakeStep::m_makeFileToCheck
Change-Id: Ib876ad2068c477d1e482479ce5ce2af81ec79961
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-22 06:15:30 +00:00
David Schulz
6af287fa2d Docker: fix is<Writable/Readable>Directory
Change-Id: I63093a1aeb3bc2b87592f93900f26b44305b5e85
Reviewed-by: hjk <hjk@qt.io>
2021-06-22 04:54:30 +00:00
hjk
b7096f1935 VcsBase: Remove unused VcsBaseClientImpl::commandOutputFromLocal8Bit()
Change-Id: I5300934f12bd06648bcdab08af4cae6dd61c2e70
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-06-22 02:15:53 +00:00
hjk
6d688f3199 CMake: Display cmake version on the cmake settings page
Mostly for informational purposes. Helpful e.g. to check whether
an auto-detected cmake binary from a docker device matches
expectations.

Change-Id: I546b0ab6edc240cc779bbf0560e00165cb524fcb
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-06-21 16:21:47 +00:00
Jarek Kobus
7762cc745c Make ModelManagerInterface::instance() a bit safer
Currently, in d'tor of ModelManagerInterface, when joinAllThreads()
has finished, we were setting the g_instance to nullptr. However,
just after the joinAllThreads() has finished and before setting
the g_instance to nullptr some other thread could still add a
new future and this thread could potentially still assume that
instance() will return valid pointer.

The fix is to make joinAllThreads() and setting the g_instance to
nullptr in an atomic way. We ensure, that when there are still
pending futures, we don't clear the instance, but call joinAllThreads()
again for them.

The implementation is similar to what we do in test_joinAllThreads().

Change-Id: I99dc341228aee710a958a0fbc6c5ec1fbe132e7f
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>
2021-06-21 15:11:06 +00:00
Leena Miettinen
2af03178ae Doc: Fix typo
Change-Id: I2ccc0e7d1975c5e2ebc90a3c906df3cd2e693b63
Reviewed-by: Johanna Vanhatapio <johanna.vanhatapio@qt.io>
2021-06-21 14:31:46 +00:00
Christian Stenger
019aac5164 PE: Silence soft assert of base class
Change-Id: Ia26845356fb8f7374ac6122c4089e460f026f434
Reviewed-by: hjk <hjk@qt.io>
2021-06-21 13:32:19 +00:00
Christian Kandeler
40181057cd ClangCodeModel: Use clangd for local renaming
Change-Id: I1536265a8d46c9840e722bdfcb8638906d3f45cf
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-06-21 13:00:40 +00:00
Jarek Kobus
ca09774181 Add more thread safety to ModelManagerInterface
Add ModelManagerInterface *ModelManagerInterface::instanceForFuture()
method. If the returned instance is not null, it's guaranteed
that it will be valid at least as long as the passed QFuture object
isn't finished.

Use instanceForFuture() in Link c'tor, as it's called from
non-gui thread.

Change-Id: I7e5ee6ad27e8f71cc0cef7fd9a91b710e2f8f662
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>
2021-06-21 12:22:08 +00:00
Jarek Kobus
54f3232f63 Fix a crash inside ModelManagerInterface on Creator shutdown
Synchronize all the running futures on shutdown. It's enough
that all threads started by runAsync() just finish, without the
need for delivering the results of these futures to onFinished
handlers.

Fixes: QTCREATORBUG-25350
Change-Id: Iac5ae3834bb02ef0a77b063c59097471ec7e757d
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>
2021-06-21 12:20:16 +00:00
Jarek Kobus
fe7b5458eb Refactor tst_joinAllThreads, to be used in ModelManager d'tor
The idea in this approach is that we only collect those futures,
which have resulted from runAsync. The assumption is that
all tasks associated with those futures may sooner or
later finish, without the need to call qApp->processEvents().

OTOH, we don't collect fake futures coming from Utils::onFinished,
as these requires the spinning event loop in order to deliver
the onFinished signal.

So, the new joinAllThreads() method waits for all collected
futures to finish. We also _do_ want canceled and not finished
futures to finish, since even when they are canceled,
they may still be running and using the internals
of possibly destructed ModelManager. This means, we are only
waiting for other threads to be finished, without reporting
their results to e.g. onFinished() handlers.

Some tests require that all onFinished handlers are also processed.
In order to achieve this, we create a loop inside
tst_joinAllThreads() method and we call joinAllThreads(), so
it will wait for all pending queue to finish, and then we call process
events, in order to let finished futures propagate their results
to their respective onFinished() handlers.
Some handlers may have stared another threads when being processed,
so we may expect that some new futures will appear.
So, after processing the events we check if any new events
appeared, and in this case we repeat the loop.
Otherwise, we finish synchronization.

Amends: 96c860159b

Task-number: QTCREATORBUG-25350
Change-Id: I5e44150c55f6be00445a5695938482d948990c94
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>
2021-06-21 12:19:17 +00:00
hjk
aca55dce58 Docker: Auto-detect debugger binaries in docker devices
Change-Id: Iec7c2b16277ea626520372603ae769418e9efd12
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-21 12:14:29 +00:00
hjk
f558323bac Docker: Actually run 'env' on the docker device to get the environment
Change-Id: Ice31b4f7cfd6c699a78da1518405d8d6bb6e3611
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-21 12:14:14 +00:00
Christian Stenger
085e5ebe32 AutoTest: Fix expansion of results
When using "Expand All" before running tests we may miss
the results due to filtering that has not been applied
correctly.

Fixes: QTCREATORBUG-25877
Change-Id: Ibe6af43ff28e31c7acfd78ba3ec1daf9db620b56
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-06-21 11:12:46 +00:00
Christian Stenger
cb2febdaae AutoTest: Support messages from death tests
Do not omit messages from death tests as they can be
essential to figure out what went wrong.

Fixes: QTCREATORBUG-25888
Change-Id: I30bc9856ae952dc30f4002a5bbc98245a524fae7
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-06-21 11:12:35 +00:00
David Schulz
ad4803ccc8 Editor: fix folding for Markdown
Fixes: QTCREATORBUG-25882
Change-Id: I46048a191f4dd9bb2f7c3029f8555066bb8451ab
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-21 11:11:49 +00:00
hjk
50166f1749 ProjectExplorer: Implement DesktopDevice::directoryEntries()
Change-Id: Ia3d86ed761e41e22a28867154650a16005796b2f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-21 11:11:29 +00:00
hjk
faf1296345 Docker: Be a bit more flexible when searching Qt versions
Change-Id: I8611a0ad05cbbca79589f1defc8c1ed1399615e1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-21 11:05:19 +00:00
hjk
ada39349a2 Utils: Merge QtcProcess line reading functions
- Pass everything through the codec.
- Always emit even incomplete last lines when the process finishes.
- Don't store raw output when line-wise processing is requested.

Change-Id: I5cc30ad0d7ab79387bfb00b48ff957468a1bd004
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-21 10:59:40 +00:00
hjk
d3994dd903 CMake: Use local path names in android build parameters
This is directly passed to cmake and used in the context of the build device.

Change-Id: If22764b0d962f96b51897b754b413c2310818c33
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-06-21 10:29:19 +00:00
hjk
270fef0866 ProjectExplorer: Move DesktopDevice initialization
From ProjectExplorerPlugin::extensionsInitialize to initialize.

It's cheap, and needed for other plugins to access local file
operations via the generic IDevice interfaces.

Change-Id: Iefa31d4dcbe4c894756e5f42e5a6cc2b8aecf24f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-06-21 09:49:35 +00:00
hjk
645c7f8379 Docker: Make CMake autodetection a bit more flexible
Search in build device path instead of two hardcoded locations.

Change-Id: I91e047aa48eb6566353e3ba090070c2a00b3dd06
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-21 09:39:57 +00:00
David Schulz
50853bba61 Editor: highlight qtquickcontrols2.conf as ini files
Fixes: QTCREATORBUG-25878
Change-Id: Ib9e4780d3374ed6a842ea38c1f3a356085f01c2b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-21 08:38:25 +00:00
David Schulz
1b0d502fa6 LanguageClient: Fix function hint range check
Change-Id: I82d25ef6f2c12ea3af70ba973e940bcea08a79b8
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-06-21 08:36:38 +00:00
Kai Köhne
0c24a0a78e LSP: Improve error message
Change-Id: I7fc316744fa33666f20f83572486c59633ba46ec
Reviewed-by: Tasuku Suzuki <tasuku.suzuki@signal-slot.co.jp>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-06-21 06:15:28 +00:00
hjk
8824b4e3a4 Utils: Pass stderr output through the right channel
Copy-and-pasto...

Change-Id: I6521b5557ff515ccb22cb1611f92079d9ec6042f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-06-18 14:23:22 +00:00
Eike Ziller
c29d4e09a2 CMake build/Qt6.2: Avoid message about missing DesignerComponents
Amends 77fd87a545

Change-Id: I237a3f0b146f9fe5e2db1e1e4eb943a90fbd8db8
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-06-18 14:07:35 +00:00
Mahmoud Badri
3188c448b6 QmlDesigner: Suppress some warnings from the assets library
Change-Id: Idd192ce20e610a1689cfc9b0a11215dd16f09911
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2021-06-18 13:42:15 +00:00
Christian Kandeler
dc4a8b3866 TextEditor: Allow incremental proposals
... and make use of them with clangd.
This way, users can get immediate feedback when a new proposal entry
has been found, rather than having to wait until all of them have been
collected.

Change-Id: I2adfe0153aa7a058f28eb3bd65c71dd30ea018e0
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-06-18 11:43:08 +00:00
hjk
58f984d2b9 Qmake: FilePathify remaining qmakeproject.cpp
Change-Id: I79860efc69b0053701306a83c61dfc4bc2d31bb3
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-06-18 11:38:38 +00:00
hjk
e05bb25306 Qmake: FilePathify QmakeBuildSystem::buildDir
Change-Id: I856152c00a07d018b88526efb5576759e2b4b82f
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-06-18 11:36:26 +00:00
Christian Kandeler
41dafc8132 ClangCodeModel: Implement declaration/definition switch via clangd
Change-Id: I522a415d76fbc5332e5cc1fdfd2d7ab19cb9ed64
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-06-18 11:11:17 +00:00
hjk
de6c7696d2 ProjectExplorer: Provide a way to extend RunWorkerFactory
In the light of docker support it would be nice to have a way
to tell existing RunWorkerFactories that they also work for
docker, or generally to increase the scope to which they apply
after construction time.

Small con: Some more boiler plate,
Small pros: Setup using the new method looks similar to what we use
in the other factories, and the Factories types are recognizable
when debugging.

Change-Id: Idb1757f519e7151b835326aa8b98aeaa4a372cc4
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-06-18 09:53:02 +00:00
hjk
c533e5c43c Docker: Use a variable to list directories to mount
Baby step on the path from hard coded to user defined.

Change-Id: I2536924c5ba07dadcbe3c94304d55db25f876987
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-18 09:34:18 +00:00
hjk
93d7821eae ProjectExplorer: Use real FilePaths for build directories
Even though build directories are later usually accessed "locally in
the context of a build device" even in true remote" setups it is easier
to reason about them if they follow the convention, especially as they
are used to derive other paths that might be used to access items in
a host context.

Change-Id: Ib831bdd1f81981ef96323dcb8d1cd21c31347c19
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-06-18 09:28:47 +00:00
hjk
e5dd24322f FakeVim: Also record NoVisualMode as last visual mode
Fixes: QTCREATORBUG-25822
Change-Id: I9a63726d357e3ea3d92b05a5d77cad5221c03f93
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-18 09:17:43 +00:00
hjk
0e0cfcdcf2 Debugger: Claim usability also for docker devices
Doesn't work correctly yet, it effectively runs in a host environment.

Change-Id: I2aaf7d1b04ca38f9a0825edf78e264ceaed0434b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-18 09:17:35 +00:00
Thomas Hartmann
e1c90bf047 QmlDesigner: Extend tst_TestCore::loadQml()
We should check for the version. For this we have to enable
semantic errors.

Change-Id: I8bedca041ebf9bbc0580b89076203e47942cc539
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-06-18 08:04:45 +00:00
David Schulz
0fb40e204b Core: remove unused helper functions
Change-Id: I74ef89648f42f0016ad7cdfc61e17a712ea145ff
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-06-18 07:17:36 +00:00