Commit Graph

62421 Commits

Author SHA1 Message Date
hjk
f29bc8c787 ClangTools: Proliferate use of FilePath
Change-Id: I3eb16546a729ab01c10e37572adac9aef83f5cd4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-18 11:43:30 +00:00
David Schulz
e05c786780 QtSupport: check for preferred toolchain by host
Instead of just prefering perfect matches also take the host platform
into account when looking for matching toolchains. This allows us to
prefer the amd64 compiler over the x86_amd64 msvc compiler.

Change-Id: I59c8b7f95765a76ded7771cb8c26e03581ca2350
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-08-18 11:11:40 +00:00
Aleksei German
f1b2be3e1d QmlDesigner: Fix for Toolbar layout buttons in MCU
- Replaced QtQuick.Layout usage in Designer Toolbar buttons with regular
 QtQuick.Row and Column in qt for mcu mode
 - deactivated "Add GridLayout" button in qt for mcu mode
 - fix for assert while creating Grid Layout with Toolbar button
 - comments typos

Task-number: QDS-4641
Change-Id: I33520988fb7bf5f3193fb914de93054ff97c31b1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-08-18 11:07:12 +00:00
Jarek Kobus
a7e8ddd725 Add some more comments
Add some developer comments explaining which method
is designed to be called from a certain thread.
Add also some comments about in which thread
certain QObjects live in.

Change-Id: I38b10216cc29f8a86fd784e588e913407f0fb776
Reviewed-by: hjk <hjk@qt.io>
2021-08-18 10:24:18 +00:00
hjk
fd6ab7ddab Qnx: Modernize QnxConfiguration::assignDebuggersToTarget() a bit
FilePath, ranged for.

Change-Id: I4c04fcc0e2217fa59c6cdcda2d1e5877c496d3e7
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-08-18 10:22:45 +00:00
Jarek Kobus
43de2deebc Wake up QtcProcess when error occurred
Pipe the error packet through the caller's handle and flush
it immediately if the caller was awaiting for any signal.
Stop awaiting for any signal when we have flushed error signal.
In this case return false from waitForSignal() method
in order to mimic the QProcess behavior.

Fixes: QTCREATORBUG-26136
Change-Id: Ie80b4a63bd19a6309d4791ad39a698bd91bb8967
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-08-18 10:19:28 +00:00
Artem Sokolovskii
0f89b97b03 QtCreator: Update help message
* Add information about -tcs alias of -temporarycleansettings command
to the help message

Task-number: QTCREATORBUG-26132
Change-Id: Ie79e33cf2358ad2f7253656017c9e8b433b7f635
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-08-18 09:54:47 +00:00
Mahmoud Badri
2e652405cd QmlDesigner: Allow all asset folders except for import folders
...so that assets from imported bridge content appear in the assets
library.

Fixes: QDS-4842
Change-Id: I8f8e685ffd6e02e885eccfc0b29f2d81f989984a
Reviewed-by: Miina Puuronen <miina.puuronen@qt.io>
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-08-18 09:41:31 +00:00
David Schulz
9539aff27d LanguageClient: Do not send will save notification by default
Change-Id: I4fb9bda0bf0b8401c9d92be3b5525be1c44a0eb8
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-08-18 09:23:25 +00:00
Henning Gruendl
3ccd0976cb QmlDesigner: Fix broken visibilityOff icon
Task-number: QDS-4815
Change-Id: Ie872a2f899c57faf06f7cb6ee54504a8e5168356
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-08-18 09:13:11 +00:00
Christian Stenger
bfee48ab0b TextEditor: Limit size of tool tips
Otherwise we may end up in crashes deep inside Qt code on Windows.

Fixes: QTCREATORBUG-26112
Change-Id: Iabdd544271a99b680adad3abb84341db2bf2c1f3
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-18 08:34:45 +00:00
Aleksei German
c9e18ce538 QmlDesigner: Fix for Annotation title removal
Task-number: QDS-4885
Change-Id: Ia938aaa7c2bdc33c0beeef83613520ca1b81272d
Reviewed-by: Aleksei German <aleksei.german@qt.io>
2021-08-18 08:27:14 +00:00
Eike Ziller
6d44c28f0a Merge remote-tracking branch 'origin/5.0'
Conflicts:
	src/libs/utils/qtcprocess.cpp

Change-Id: I1f7419d927e8534dfdcd10db998f97a6efd4d3e4
2021-08-18 09:48:39 +02:00
Eike Ziller
e54cbc69d8 RemoteLinux: Fix updating of command line for temporary local install
E.g. in case of CMake projects the command contains the build directory,
so it needs to update whenever the build directory (or build configuration)
changes.

Fixes: QTCREATORBUG-26103
Change-Id: I02ea3bd47f4a502adc485dfffbed6a14ebefb0bb
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-08-17 14:04:08 +00:00
Christian Kandeler
20a4afaaa4 Fix build
Change-Id: I76c03a364a8b3d9734ced3c948997dcfb5c0e685
Reviewed-by: hjk <hjk@qt.io>
2021-08-17 13:26:41 +00:00
hjk
8885ef7e5a Utils: Pass dialog parent to Utils::* file dialog
Amends 3edc5673b5.

Turns out quite a few potential uses have other parents than
ICore::dialogParent().

Use a nullptr parent to mean ICore::dialogParent() to keep the
caller side simple.

Change-Id: Icfe1daafd710ae273d286679e0c8e2a3a27da552
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-17 12:54:08 +00:00
Thomas Hartmann
cd40514010 StudioWelcome: Use Titillium on Windows again
QTBUG-94529 seems to be fixed in Qt 6.2 Beta 2.

Task-number: QDS-4539
Change-Id: I8b4981f9b023060a6ad2ed8a623f4d0ae3c5d5f7
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-08-17 12:35:43 +00:00
Jarek Kobus
7726267d07 Fix a deadlock when doStart() is called from launcher's thread
In case when QtcProcess::start() is being called very early,
just after the launcher socket was started but not ready yet,
a start is being delayed. In this case doStart() isn't
called directly from the caller's thread, but it will be
invoked later from the launcher's thread, when the socket is ready.
In this case we may have a deadlock, since calling
doStart(), sendPacket(), sendData() and finally handleRequests()
results in a synchonous chain of calls in launcher's thread,
so the mutex locked in sendData() will block synchronous call to
handleRequests(). In order to fix it we unlock the mutex
in sendData() before calling handleRequests().

Change-Id: I6c13994d0b05b624567c75ffbd2ac7cc0d77df61
Reviewed-by: hjk <hjk@qt.io>
2021-08-17 12:23:39 +00:00
hjk
59c01481d1 Core: PatchTool code cosmetics
Some more FilePath use, QLatin*, static, ...

Also fix default settings values, amends e2eab0e0 insofar.

Change-Id: I8e40ca9629351db3b3095636b4ea29a204f86da6
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2021-08-17 11:55:11 +00:00
hjk
bd4a501f15 Replace some uses of HostOsInfo::withExecutableSuffix with FilePath
Change-Id: Id72e9fd04dd4995ff2775ee919f747018cbcc339
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-17 11:48:48 +00:00
hjk
d12861ea91 Core: Use FilePath for IOptionsPage::setCategoryIconPath
Change-Id: I0e234e0ef37c4fbdc738546fb9e8edc794c40228
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-17 11:48:41 +00:00
hjk
ab98f31a1d Git: FilePathify GitClient::tryLauchingGitK and surroundings
Change-Id: Icdbd0aab546824c9213402169a165290dd86d3c5
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-08-17 11:47:34 +00:00
hjk
3174218535 Perforce: Proliferate FilePath a bit
Change-Id: Ic3f03de192f782e59bd5c57654a45268c14f3f38
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-08-17 11:43:55 +00:00
hjk
2663af4c74 Utils: FilePathify Archive
Change-Id: Ia6b972b50f8b1cc7c5829ac863a5881849ea7678
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-17 11:43:15 +00:00
hjk
2f44449a90 DiffEditor: Remove workingDir parameter from setDiff()
It was not used.

Change-Id: I33a77f4d8238218b90171a98aa25af5b31b17eb3
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-08-17 11:22:45 +00:00
hjk
f4c57a7857 Autotest: Remove unused TestConfiguration::setExecutableFile
... and a few unncessary namespace qualifications.

Change-Id: If1dde79a0b6b68ba8706faf038c3512f0b3e666f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-17 11:00:41 +00:00
Christian Kandeler
71f2e7566d QbsProjectManager: Ensure profile for kit without Qt and toolchain
Change-Id: I52f2bad18570587fe1bca8ad20692993e04cef76
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-17 10:35:39 +00:00
hjk
2f0219928d ProjectExplorer: FilePathify IDevice::qmlRunCommand
And remove a few unnecessary namespace qualifications nearby.

Change-Id: Iea866c98f13fe02e1ce29b855632beeaeeb8cd4f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-08-17 10:17:50 +00:00
Christian Stenger
b489afd91b AutoTest: Fix gathering failed Qt based tests
Omit special and test data functions while collecting
as these cannot be addressed at all.

Change-Id: I3d79192cd07b4e7e2e76f04dfad36ef033593e71
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-08-17 10:17:30 +00:00
hjk
54b372a082 ClangFormat: Code cosmetics
Change-Id: I2aa83d4121a2c255547e14a32b0fe4bfd11dc72b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-08-17 09:44:33 +00:00
Christian Kandeler
274b8011ab Designer: Consider alternative class name
... in "Go to Slot".
The class can be referred to as Ui::<class> or UI_<class>.

Fixes: QTCREATORBUG-26013
Change-Id: Ib539855b0360ce5fe06fb3cac664af3967695206
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-17 09:30:57 +00:00
Jarek Kobus
9a73d394c3 Compile fix
Amends 837a707ec7

Change-Id: Icf1fa0a2536a57c8182bf7a3e651f9f2ab420516
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-17 08:56:29 +00:00
Ulf Hermann
fdaa9b1c10 QmlJS: Destroy local snapshot before modifying its original
If we keep the copy of the snapshot around while it's being modified, we
trigger the copy-on-write mechanism. That is expensive, and destroying
the snapshot afterwards is also expensive.

Task-number: QTCREATORBUG-25899
Change-Id: I9b7e26baf63a4b47c85457e5657fee971a6ce132
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-08-17 08:55:31 +00:00
Christian Kandeler
d7717f1eca CppEditor: Fix "insert definition" for templates with value parameters
Fixes: QTCREATORBUG-26113
Change-Id: I2d2a1c1bdcffd67072bbda99dabbbfbfafe115c5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-17 08:35:35 +00:00
Jarek Kobus
837a707ec7 Fix a crazy case when waitingForFinished should process ReadyRead
Fix "runBlockingStdOut" autotest for tst_qtcprocess.
This crazy case relies on the fact that a blocking
call to waitForFinished() lets ReadyRead signals to
be processed in meantime and the handler for ReadyRead
may terminate the process. However, when no handler
for ReadyRead canceled the process, the blocking call to
waitForFinished() should return to the awaiting state
for the remaining time. From the caller's side everything
happens during a blocking invocation of waitForFinished().

So, in order to behave like this we implement waitForSignal()
in a loop. After we have flushed all the pending signals
we check if we have flushed the signal we were awaiting for.
If so, we break the loop, otherwise we continue. In order
to detect the case when the cancel was called during flushing
we set the m_awaitingShouldContinue flag before flushing.
The cancel() method clears this flag. Then after flushing
we check if the flag was cleared - in this case we don't
continue awaiting.

We reset the m_waitingFor state always after wait condition
finishes awaiting. Before, we didn't reset it when the
wait condition timed out.

Change-Id: I210f446659cabfd89bdfdd1fc8e8396d9470effc
Reviewed-by: hjk <hjk@qt.io>
2021-08-17 08:15:06 +00:00
Orgad Shaneh
a6917a5484 QtcProcess: Do not discard stdout and stderr buffers when callback is set
All the uses of setStd{Out,Err}Callback in the codebase call proc.stdOut/
stdErr after the execution.

This triggered a soft assertion that was apparently not noticed so far.

It broke for example prompt for conflict resolution on Git pull/rebase.

Change-Id: Ib4b8301f1f50b2b66f02fc4dc6c14d93f895ea33
Reviewed-by: hjk <hjk@qt.io>
2021-08-17 07:58:48 +00:00
hjk
3032d6e795 ADS: Remove unused function pathsWithTildeHomePath()
Change-Id: I42e772e663c912acaa788d96b1bcfe80b09219b5
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2021-08-17 07:58:46 +00:00
hjk
632b725821 Git: Proliferate FilePath use in GerritModel a bit
Plus some code cosmetics.

Change-Id: Idc07e881c09cbc7347396ef1bb60cce00539250c
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-08-17 07:52:42 +00:00
hjk
bbde6ac9bf VCS: Use more FilePath in ShellCommand and surroundings
Change-Id: Ie8c5fac09b45a54bcbe9a876044b653e7fccede5
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-08-17 07:16:04 +00:00
Eike Ziller
e47ca44fa2 Update Qbs to HEAD of 1.20
Fixes issues with CMake 3.10 and avoids CMake output noise when using
Qbs' copy of QtScript.

Change-Id: I7e50b91302b925e9d4a0b8f098760b90351145fc
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-08-17 07:14:39 +00:00
hjk
2aaa0a2180 Android: Simplify clangPlusPlusPath in toolchain
Change-Id: I195cc3657813a681a625567116c91fd1bdc463cc
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-08-17 06:59:20 +00:00
hjk
03b05d8579 ProjectExplorer: FilePathify IDevice::debugServerPath
Change-Id: Ic7e5ba0ac5ff4fa2605f1e479e914cd85623c9da
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-17 05:44:00 +00:00
hjk
7c28c4f744 Utils: Introduce a FilePath constructor from char arrays
Similar to QT_RESTRICTED_CAST_FROM_ASCII to avoid the need for
decorations in user code.

At the same time, drop some convenience constructors and functions
in CommandLine and Icon essentially serving the same purpose.

Change-Id: Ida4e5ac19c2da0a4298a97b2a8e1511d56bbb79d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-17 05:34:10 +00:00
Marco Bubke
98cba6e50c QmlDesigner: Improve file status cache
It is caching the file size now too.

Task-number: QDS-4788
Change-Id: I5cb816b8359bf3d2ef372ea319ce5920d9e0e4e9
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-08-16 15:23:10 +00:00
Marco Bubke
4ebc0f5078 QmlDesigner: Add file status support to the project storage
Task-number: QDS-4785
Change-Id: Idaadf6992fad938e3620169a415f9d3cf7b9927f
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-08-16 15:23:04 +00:00
hjk
733972193d QtSupport: Fix Qt version detection
Amends 84befc2 which was too strict.

Fixes: QTCREATORBUG-26123
Change-Id: I3767ba0fb4723c77cfb0e8b1932ff6adfc8e9ac2
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-08-16 13:24:51 +00:00
Christian Kandeler
c045eb0cf9 ProjectExplorer: Prevent redundant output on process crash
... in run controls.

Fixes: QTCREATORBUG-26049
Change-Id: I51e560fb4674e2b8ac59cb1901d269d8179213d7
Reviewed-by: hjk <hjk@qt.io>
2021-08-16 12:26:14 +00:00
Marco Bubke
51452d0858 QmlDesigner: Add source path watcher
The watcher is only watching directories and then searches for file
stat changes. It is compressing signals too. So if files are changes
in a very short time frame they are compressed to one change.

Task-number: QDS-4776
Change-Id: I90052a0d5dba01467b505070fb58b04ea5576294
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-08-16 12:25:19 +00:00
Marco Bubke
19a30631af QmlDesigner: Improve support for explicit type names
Explicit type name ids are now saved as negative ids into the database
so they can be distingished by that 'flag'. For types we now use imports
and not anymore import ids. The resolving of the imports are done
internally to enable atomic synchronization.

Task-number: QDS-4662
Task-number: QDS-4725
Change-Id: Ia59763ec5578baec84f3c81fa1fd35ba075b8d84
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-08-16 12:25:00 +00:00
Christian Kandeler
acccdd774b CppTools: Fix tests
- Prevent invalid access to temporary.
- Fix typo.
- Use accidentally unused class member.
Amends 33108795d6.

Change-Id: I2cc91e294fb4be7f4e20b383171b06a39f53c99c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-08-16 10:00:36 +00:00