Commit Graph

77038 Commits

Author SHA1 Message Date
Jarek Kobus
5e5d412fc4 GccToolChain: Create process on stack
Amends 948f0070fa

Change-Id: I67c537f19da6cd012d1d51d80f0b987dd2b1fede
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-11-24 07:34:19 +00:00
Christian Kandeler
706b0ff9eb "New Project" wizard: Create project parent directory, if needed
There's no reason to force users to the terminal if they want to create
their project in a new subdirectory.

Fixes: QTCREATORBUG-28346
Change-Id: Id92b2194c018274aac6f7f29c7304efa8c1d2d9e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-11-24 07:33:19 +00:00
Jarek Kobus
2e75492257 TextEditor: Replace qAsConst() with std::as_const()
See 8eb4d52342

Change-Id: Ic96065a4bda4c9658d88bbab2e916e8f2525bcb2
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-11-24 06:01:03 +00:00
Jarek Kobus
f9b4bcd3d8 TarPackageDeployService: Reuse TaskTree
Change-Id: I74d19719f5a946a79409f04b4536fe9368747bc1
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-11-23 15:34:06 +00:00
Jarek Kobus
c88a829059 RsyncDeployService: Reuse TaskTree
Change-Id: I411726e47550da5fd3269fcbb3e4f3e19096adeb
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-11-23 15:12:14 +00:00
hjk
587bafc771 Utils: Make errors from CommandLine test better readable
Change-Id: Ibea4bbe7c1f7e502849f0ef6985cbf107fc236f0
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2022-11-23 14:21:49 +00:00
Jarek Kobus
85340d9508 TarPackageDeployService: Get rid of killer process
The installation process is being run in remote shell, so
closing the process with close() should finish the remote
shell together with all running children processes.
There is not need for separate "tar" killer.

Change-Id: Ib3b36ca955fe033cea8abdffbee3f14a5e007905
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-11-23 12:59:45 +00:00
Jarek Kobus
dfd06ec175 TaskTree: Fix destruction of running task tree
Delete all storages that were created before.

Change-Id: I8cbeb571424086b77fa7b19611c5b3f6cc1f4db1
Reviewed-by: hjk <hjk@qt.io>
2022-11-23 12:59:29 +00:00
Jarek Kobus
3468cd20ca TaskTree: Introduce Storage item
The Storage item makes it possible to define the whole
subtree as a self-contained, full-functional recipe, without a need
for passing (together with recipe) a one-use only (disposable)
pointer to storage object.

That's the last closing element of making the idea of pure,
value-based recipe real. It makes the TaskTree machinery ultimately
powerful.

Change-Id: Icd81bdd3e94251e8b241b2b550957d566fa4ab75
Reviewed-by: hjk <hjk@qt.io>
2022-11-23 12:59:18 +00:00
Jarek Kobus
1667b06236 TaskTree: Introduce TreeStorage class
TreeStorage enables delayed creation of instances of
StorageStruct. It encapsutates recipe on how create / delete
instance of StorageStruct. It doesn't create any instance
of StorageStruct when TreeStorage is created. These instances
will be created later, by TaskTree.

It will enable getting StorageStruct instance inside task / group
handlers (passed by lambda argument).

Change-Id: Id707353f196aa5ba3e7876d6c601e04ca08d6e63
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-11-23 12:58:57 +00:00
Jarek Kobus
129bd24131 TarPackageDeployService: Don't disconnect from installer signals
It looks like the same instance of TarPackageDeployService
may be reused for subsequent application run.
Close the process instead.

Change-Id: I3430404c33c14b1b4f24b728b44b3e54a57e3c9b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-11-23 12:40:06 +00:00
Jarek Kobus
2a830a12f2 TarPackageDeployService: Remove removePackageFile arg
It was always true.

Change-Id: I9136e924ae15471e6ffc51fa475d965fb49a7df7
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-11-23 12:40:00 +00:00
Eike Ziller
adc064d502 Merge remote-tracking branch 'origin/9.0'
Change-Id: I69ebd63cbd780ed4edb3873acfc8aac208933032
2022-11-23 11:20:15 +01:00
Eike Ziller
373200accf Fix double * for long names of changed documents
We used to elide the right part of the name, and needed to take care of
not eliding the * away in that case. Now we elide in the middle, and in
that case the * may not be added to the elided text again.

Change-Id: I646b51d315e141a65df67841e163826e7136c118
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-11-23 10:17:25 +00:00
Christian Kandeler
918c7ca52d ClangCodeModel: Make use of new clangd token type "modifier"
See https://reviews.llvm.org/D137943.

Change-Id: I313576b32fff1c9ba44e3753e3f02cdd34e2ea3e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-11-23 09:52:33 +00:00
hjk
7e9cab6e78 Utils: Introduce a FilePath::fromPathPart()
... as shortcut for the fromParts({}, {}, x) case.
Less noise on the user side, and saves a few cycles.

Change-Id: Ie5b2a76c7261a049a3e600f29c4edaff37ab3828
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2022-11-23 08:41:55 +00:00
Eike Ziller
b7716087e1 tst_tracing_*: Fix build in certain configurations
There are Linux distributions that (at least for building packages)
separate the development packages for the various Qt modules.

So, to find the include <QtQml/qqml.h> in timelinemodel.h when
building the test, a dependency on QtQml is required.
Pass the dependency down to everyone depending on the tracing lib.

Fixes: QTCREATORBUG-28434
Change-Id: I58a534a9c25f1f6ecfc10a9ce8292b5983cdcbae
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-11-23 08:38:02 +00:00
hjk
c7c6ddb8b0 Utils: Replace Environment::isSameExecutable()
... by FilePath::isSameExecutable().

The only non-mechanical case is the use inside QmakeBuildSystem::testToolChain
using a build environment instead of the FilePath's device environment.

This make a difference in theory due to the use of PATHEXT in the actual
check, but I believe the case that someone creates a 'qmake.foo' and
a 'qmake.bar', adds .foo and .bar to PATHEXT and then complains that
there's a warning missing about not-matching mkspecs has zero
likelihood in reality (and will break other places in Creator anyway).

Change-Id: Id6a8d1e4dc2eb74ca81610ccb1c4ee94c6f47e12
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-11-23 08:07:08 +00:00
hjk
bf325fd6af ClearCase: Use a FilePath for the test file
Change-Id: I79b149df87d28e91f7692616dd9fdb1b925f7ab5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-11-23 08:06:56 +00:00
Orgad Shaneh
a2baeea394 Git: Enable instant blame only if current file is managed
If the current project is Git managed, but the user opens a header from an
unmanaged directory, don't try to run blame.

Change-Id: I563f7a687b2ea03f4c03bf97c8f5c27c1f8411ec
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2022-11-22 16:43:36 +00:00
hjk
fa1adf4d40 CPlusPlus: Proliferate FilePath use
The starts with CppDocument::filePath(), plus a bit of the fallout

This is one patch of potentially many. It is hard to draw the
line where to stop this kind of chunk, this here converts a few
additional functions for which including it in the patch looked
like less churn than without.

Converting is mostly fromString/toString, with a few exceptions
for "already seem" like caches, that use cheaper "path()" to
avoid likely performance regressions (on Windows FilePath
comparison is currently case-insenstive, and more expensive).

There should be no difference for local operation with this patch.

Change-Id: I7b35f98a0a6f0bfed4ea0f8f987faf586f7a8f2b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-11-22 15:30:00 +00:00
Jarek Kobus
822e2a224a KillAppService: Some cleanup
Remove undefined and unused handleStdErr() and
handleProcessFinished() methods.

Remove cleanup() and finishDeployment() methods
and move the implementation into stopDeployment().

Change-Id: I983e4513c4bcba45638eb054b389783ec4f73367
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-11-22 15:23:39 +00:00
Jarek Kobus
8dc13379dd KillAppService: Use queued connection for signal operation
Otherwise the m_signalOperation may be deleted directly
from it's signal handler.

Change-Id: I38ae09ac8b2cb936459592b006c5330fbfa3027c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-11-22 14:54:21 +00:00
Jarek Kobus
0ced4ab061 Utils: Remove unused ProxyCredentialsDialog
Change-Id: I8f234ba6e851edc4a5cb41cfabd76cf05670eef2
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-11-22 14:49:06 +00:00
Artem Sokolovskii
fabf2f8cde Android: Rename Android Settings names
Change-Id: I5d8fe1d1525dcea65c2a616b86d777d1ffabce28
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-11-22 13:31:19 +00:00
Marcus Tillmanns
75b43de14a Docker: Cleanup docker process interface
Instead of creating the actual command in two places
this change moves everything into one function.

Instead of sending the environment and working directory
into the shell as arguments, we send it via the correct
docker exec cli arguments.

Instead of creating QStringLists and adding them
to a CommandLine we directly add them to the
CommandLine instead.

This also fixes an issue when the working directory
contains spaces.

Fixes: QTCREATORBUG-28476
Change-Id: I4f5b39a2dd4c86d20717dbb53003f1eb60f6c089
Reviewed-by: hjk <hjk@qt.io>
2022-11-22 13:17:11 +00:00
Marcus Tillmanns
3e6c3d9fe7 Utils: Add "addCommandLine..." functions
addCommandLineAsSingleArg allows to reliably create commandlines
like "bash -c 'echo ...'"

addCommandLineWithAnd combines two command lines
by adding '&&' in between

Change-Id: Ic5af34c90fd5271dced40ba1341a3df019ededb8
Reviewed-by: hjk <hjk@qt.io>
2022-11-22 13:17:00 +00:00
Jarek Kobus
b1df55426a CppFileSettingsPage: Use Layouting
Change-Id: I0c966b3659aa7d7f889b0f4c6bb898b076587cd4
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-11-22 11:45:53 +00:00
Jarek Kobus
d2b887cfad RsyncDeployService: Remove setFinished()
Use stopDeployment() instead. Simplify file transfer's
done handler.

Change-Id: Ib43d95c1498be590d1557fbe4fcaf2f2e79d08fb
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-11-22 10:50:35 +00:00
Jarek Kobus
0312bfc066 KillAppService: Don't call cleanup() from d'tor
It's being done implicitly by QSharedPointer d'tor.

Change-Id: I058dd3e1c06eb92fad4ea8b5d43ee4d1da9182c4
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-11-22 10:49:31 +00:00
David Schulz
1aa2d8ad30 QmlJSEditor: do not wait for the semantic info update
... when destructing a qmljseditor. Just let the updater continue and
delete it once it finishes.

Fixes: QTCREATORBUG-28206
Change-Id: Icabe10f17b7bf326bb15e5ee622504c477d83acf
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-11-22 10:48:06 +00:00
Artem Sokolovskii
a130a7ae0b Android: Remove support old cmdline tools
Link: https://developer.android.com/studio/releases/sdk-tools

Change-Id: I9ea7c83af604bfc4b5d5e81b037034b7e148e99a
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-11-22 10:10:46 +00:00
Jarek Kobus
e8454dc5fe QdbStopApplicationService: Always call stopDeployment() when done
Call stopDeployment() also when process didn't finish with
FinishedWithSuccess.

Change-Id: Ibeafecb9e06a02650de35d635c1acfaa5af22870
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-11-22 09:59:01 +00:00
Jarek Kobus
94cc91b833 QdbStopApplicationService: Move setting connections into c'tor
Change-Id: Iccfae9c2e6be7e7987e8385003ba98fecfb1c3ee
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-11-22 09:58:08 +00:00
Jarek Kobus
197002ef04 QdbStopApplicationService: Remove cleanup()
Don't call QtcProcess::close() from QdbStopApplicationService
destructor - this is done implicitly by QtcProcess destructor.

Remove cleanup() method, since it's used only by stopDeployment().

Change-Id: I6e82fe83f31f7dd8eb4fd69174c1aebc636de53d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-11-22 09:57:53 +00:00
Jarek Kobus
20aa5d4888 AbstractRemoteLinuxDeployService: Remove setFinished()
It was used only by handleDeploymentDone().

Change-Id: Ie294b4c2adf28a5b086941106d1c360e2f8992df
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-11-22 09:32:44 +00:00
Marcus Tillmanns
0f8613f61b CPPEditor: Allow clangd from device
Change-Id: Ia9b59b374aaebf0bfb820b5a289c6e3c0599cb10
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-11-22 09:26:29 +00:00
hjk
3e941652e1 Utils: Reduce scope of Environment::appendExeExtensions()
The general idea is to use FilePath as entry point for this
kind of functionality.

Change-Id: Id6ade8809229d119eb6af44baa7d4e473676f6f9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-11-22 08:42:43 +00:00
hjk
a333efe901 Utils: Introduce a FilePath::refersToExecutableFile
... to avoid the need in user code to care for .exe and .bat suffixes.

Change-Id: Ic249f14273f72c663912482555f98be1af923823
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-11-22 07:15:54 +00:00
hjk
9635b1545b CMakeManager: Avoid one use of Environment::appendExeExtensions()
Use FilePath::refersToExecutableFile() instead.

This makes it better re-usable for remote setup.

Change-Id: Ic69739b332f036ed791adbbc8092a139b4c83c2d
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-11-22 06:29:07 +00:00
Orgad Shaneh
3a7fee0cc6 Git: Fix crash when closing last editor
before instant blame was activated.

Change-Id: I8a8acf6dc58cb25f7c10c1dfa08e3b7f6bae3e76
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2022-11-21 15:53:13 +00:00
Orgad Shaneh
252179b938 Git: Stop blame attempts for unmanaged files in the repository
A file that is in the repository directory, but not managed by Git should
not attempt to run instant blame on every cursor change.

Change-Id: Ia7daa2ae9980cea4363e010a98fb1e2f2a3ec05f
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2022-11-21 15:49:56 +00:00
Andre Hartmann
4d63f2a598 Git: use unique_ptr for instant blame marks
Also simplifies the code.

Change-Id: I5da0aeb86ba5a28c9016cde11aab9dcee922d908
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2022-11-21 15:46:00 +00:00
Alessandro Portale
dfa5b54647 Utils: Fix StyleHelper::drawArrow workaround for 6.4.0
The workaround that fixed the drawing of arrows after a change between
6.4.0 and 6.4.1 broke the drawing of arrows with Qt 6.4.0.

This change add another enforced detachment of the palette (leading to a
modified cache key) that works with Qt 6.4.0. It still works with 6.4.1.

Amends: 9d32093421

Change-Id: I8917c99488cec4fb17ed148bb3b0f95d4ed7127c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
v9.0.0
2022-11-21 15:26:57 +00:00
hjk
722312f62f Core: Combine two code paths creating absolute paths
Remote and local can use the same nowadays.

Change-Id: I218aafb0293dadbbf75f248f4076cabfa4a0f3da
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-11-21 13:25:26 +00:00
hjk
ba80985769 Python: Replace one use of QDirCurrentPath()
Change-Id: I88a04930b8c62a68ee1adb73e1cdd3c433eea4e3
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-11-21 13:09:43 +00:00
hjk
e567cb313b Core: Use FilePath for working dir in MainWindow::openFiles()
Change-Id: Ifc8e167a1734115fa7a23f7aefa45fc52e4a70cc
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-11-21 12:46:11 +00:00
hjk
fbc2da621c ProjectExplorer: Postpone search of custom executables
... until launch time. More central, less duplicated activity.

Change-Id: I7d0e380c43e0f2cdbc1b50ac10f6739c65adb9bf
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-11-21 12:23:32 +00:00
hjk
33ea6f2433 Utils: Don't resolve relative paths in ProcessArgs::prepareCommand
Part of an attempt to disentangle streamline environment creation/setup.

Searching is expensive and needs currently the proper environment.

Change-Id: I95d93abf6c0cedeb8ba0b7a447345cd033ac2f25
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-11-21 12:17:47 +00:00
David Schulz
fd17724597 LanguageClient: use reported rename placeholder
Using the reported range to create a usable placeholder if the
cursor ('|') is placed on the end of an identifier like in:

int global|;

Change-Id: I2ebacf3b9b54cff8f8887526479792374f67c881
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-11-21 11:47:52 +00:00