Commit Graph

80529 Commits

Author SHA1 Message Date
hjk
4a21700175 QmlPreview: A dedicated class for the QmlPreviewRunWorkerFactory
Change-Id: I994f339ac1ca35e9b1dc7e2572682c4bcdb485ea
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-01-16 09:12:45 +00:00
Eike Ziller
9256340e5b CMake: Fix missing path to Ninja from Qt installers
In the configure environment for MSVC toolchains.
The MSVC toolchain actually overwrites the PATH environment (triggered
via kit()->addToBuildEnvironment(result)), which it shouldn't.
But this is a minimal fix for Qt Creator 9.0 that also is in line with
what BuildConfiguration::baseEnvironment() does.

Fixes: QTCREATORBUG-28685
Change-Id: I0cb8e3c84419403672175bd581c16d90902e23ba
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-01-16 07:43:38 +00:00
Alessandro Portale
c151835834 CppEditor: Rename some ts contexts to ::CppEditor
Removal of Q_DECLARE_TR_FUNCTIONS needs translation context changes in
.ts files.

Amends: f7bcd4f574

Change-Id: I9a1dfa6340942fd45b21a0a236845cfc72d60c28
Reviewed-by: hjk <hjk@qt.io>
2023-01-16 07:20:14 +00:00
Tasuku Suzuki
b7efb22aa9 Git: improve "The commit subject is very short."
- Hide it when commit subject is empty (initial state)
- Delay the check 500ms for commiter to focus writing commit message

Change-Id: Ia111bb01d2819750e053e06875d529a14d1ac07d
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2023-01-16 04:02:30 +00:00
hjk
7ecc507b75 AutoTest: Fix test compilation
Also amends 33cdb052ba

Change-Id: Ic4cf8671cf97c9d94fe933b9d29cb515355f5e6b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-01-13 15:51:56 +00:00
Alessandro Portale
9414083ed5 CompilationDatabaseProjectManager: Fix recent FilePath-ification
Amends: 33cdb052ba

Change-Id: Id2a7133aaee9e4618683066ce116090c522f04d5
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-01-13 15:24:57 +00:00
Jarek Kobus
9438575beb ProjectExplorer: Move settings structures out of Internal namespace
There is a public exported API that returns these structures,
and different plugins use it, so there is not point in keeping
them inside Internal namespace.

Remove some unused includes.

Change-Id: Ia9d3fc83738c38ae37f04ae0f518ec5d972c9d85
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-01-13 15:06:19 +00:00
hjk
7f85a2f331 Beautifier: Tr::tr
Change-Id: I4b27d0f33d9cad8720837c560fb0c9fb97c96cf2
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-01-13 15:03:43 +00:00
hjk
2f144a56cd ProjectExplorer: Simplify AppOutputPane widget nesting
A TabWidget in a tight layout in a widget doesn't look different then
a TabWidget.

Change-Id: Id042deace1b2ae66a57678fb34d45ee47938716f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-01-13 14:48:35 +00:00
Amr Essam
2640190f23 QmlDesigner: Enable create effect even if asset library is empty
Task-number: QDS-8694
Change-Id: I18311cdac01d656120dde15151f6d9d5ff40da04
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2023-01-13 13:17:47 +00:00
Christian Kandeler
a3109a53c0 Valgrind: Fix wrong include
Change-Id: I038ccc618d2ea639af6613f53c951bbceddf977a
Reviewed-by: hjk <hjk@qt.io>
2023-01-13 13:00:49 +00:00
Artem Sokolovskii
34638aa497 ClangFormat: Add use global settings check box for a project
Change-Id: Ie2872de3574aaad058a9fca17247db00e9559ba7
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-01-13 12:55:42 +00:00
hjk
e7c536011f Prefix Tr::tr contexts with ::
To make outliers better visible in Linguist

Change-Id: Ic35ea2a858b7e3576d9a416fb494fddb616eaaa1
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-13 12:00:17 +00:00
Miikka Heikkinen
f2b6b669a3 QmlDesigner: Disable add texture/light probe if no valid material lib
Both material library node exists and QtQuick3D imported must be true
for these menu items to be enabled.

Since this information is only needed in context menu, update the
flag only when context menu is shown.

Fixes: QDS-8524
Change-Id: I66221bf953b3b542cf7827b46e8c307a9b33acba
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2023-01-13 11:24:58 +00:00
Jarek Kobus
eab76c5007 Differ: Initialize EqualityData fields by default
The last two fields were not initialized before. Make the struct
internal in function.

Change-Id: Ib416aa26b17626ec55d76cb944ff9d763beaa190
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2023-01-13 10:51:05 +00:00
hjk
33cdb052ba FilePathify some testing code
Change-Id: I3739a6eb3c2172078e9519e8186daf94ec74d99a
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-01-13 10:46:13 +00:00
Christian Stenger
274bb27cf3 AutoTest: Redo handling of data tags with spaces
This basically reverts commit 7684571e10 as it broke running
the test inside the debugger.

Change-Id: Iacd46e2b9fb5af813fbf17156fd847375d750480
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-01-13 09:58:57 +00:00
hjk
2ce413112b Utils: Push FilePath::toString border line a bit further
... in SaveFile

Change-Id: I80164853b8a756af8c74038b0375c423a6f500e2
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-01-13 09:50:11 +00:00
hjk
6585b3668c Beautifier: Drop a few FilePath::toString
Change-Id: I226ead540072b8ad0b12e5e9c4cc594d4e1029d2
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-01-13 09:21:32 +00:00
Eike Ziller
2688a9629c Merge remote-tracking branch 'origin/9.0'
Conflicts:
	src/libs/utils/pathchooser.cpp
	src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp

Change-Id: I7ae3f91618c4a4ccb088679caea72b2a81590960
2023-01-13 09:16:25 +01:00
hjk
ccff024a66 RemoteLinux: Use dedicated classes for run worker factories
I put the normal run in the debugsupport file for now, I plan
to squash all three afterwards.

Change-Id: I855772f7dff8c8ccce07193733c26468fec40b85
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-01-13 07:17:38 +00:00
Tim Jenssen
4aea4ea693 Merge remote-tracking branch 'origin/9.0' into qds/dev
Conflicts:
  src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp

Change-Id: Idc7be1f8871df51f7372ea66f81178cfe3e68846
2023-01-12 16:42:15 +01:00
Patrik Teivonen
1b6d434c9c Coin: Update instruction yamls to run qtsdk scripts in Pipenv
Install the Python module dependencies for qtsdk from Pipfile and run
the install_qt.py and bld_sdktool.py script inside the Pipenv virtual
environment.

Change-Id: Id84733b822964ed2099883de3708f9da2e2d1818
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-12 15:22:50 +00:00
hjk
44a9f5a63a Qmake: Use FilePath in QtVersion::reportIssues
Change-Id: Ia848248525238c316d6f6f120d915b9bdb28b8fe
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-01-12 15:13:02 +00:00
David Schulz
ccb6176a33 fix compile warning
Change-Id: If87725fa32a108d43b3198e5a38424092781863c
Reviewed-by: hjk <hjk@qt.io>
2023-01-12 14:47:16 +00:00
David Schulz
3677932266 ClangCodeModel: reuse Id for restarted clients
This is needed to keep annotations hidden after the restart of clangd if
the user disabled them in the text mark tooltip.

Change-Id: I69a668f2ba71f1dda83eca74a064af7ec1f92e77
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-01-12 14:45:12 +00:00
Miikka Heikkinen
6af8487203 QmlDesigner: Support drag from content library to assets view
Simply adding the paths as urls of the mimedata makes assets view
handle drags from content library just like any other file drags.
MIME_TYPE_BUNDLE_TEXTURE data is not actually used currently at all,
so a duplicate path is not needed there.

Fixes: QDS-8536
Change-Id: I11644d85d98435ba0d4d56b806e9a96b218837fb
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2023-01-12 14:33:01 +00:00
hjk
7c35363cda Utils: Simplify part of OutputLineParser::absoluteFilePath
Change-Id: I65be5e622b2a2bde8cbd25c8642c87f889ee5bdd
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-01-12 14:32:54 +00:00
Marcus Tillmanns
21ef25a0f5 Utils: Add FilePath.hasFileAccess()
FilePath::hasFileAccess allows a user to test if a specific device
can access files. This is faster than calling "exists()" as it does
not have to actually check anything on the device.

Task-number: QTCREATORBUG-28531
Change-Id: I94b5b9e0ae020b81f126c61fd06bb25f3d4a88cb
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-01-12 14:06:09 +00:00
hjk
b3bc499ebd QtSupport: Some FilePathification in the OutputParser
Change-Id: I618bb47608593b5a60636c5e740f4d19e68e4f5a
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-01-12 14:01:14 +00:00
Tim Jenssen
2df52c4b8b qmlproject: fix qmlViewerAspect
- add its own settings key so it gets saved into the project settings
- read the correct placeholder text, commandLineGetter is set too late
  and would also create a loop (qmlViewerAspect is used to get it)

Change-Id: Iee3458cfe84e3f6b6750aa14d9d89347da21b37c
Reviewed-by: Burak Hancerli <burak.hancerli@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-01-12 13:46:09 +00:00
Jarek Kobus
a661dc5db4 DiffEditorPlugin: Avoid code repetition
Change-Id: Ie78bb992ff145a970e1cc03f59f228851fd43b08
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2023-01-12 13:44:51 +00:00
Christian Stenger
8900004b84 Squish: Redo querying server
Start a new approach for handling the different runner(s)
from inside the SquishTools class.
Necessary for easier maintenance and enhancement.

Change-Id: Ifed64ad3c4487c06165f931dd213295ad1096b68
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-01-12 13:26:38 +00:00
Jarek Kobus
1ef673cb2e DiffEditorPlugin: Remove unused includes
Some includes are not needed anymore after recent refactorings.
Inline simple constructors.

Change-Id: I1a4b192b8e6014a6af9ce9f87015fa10ee0ea33f
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2023-01-12 12:38:11 +00:00
hjk
f561740a0b Utils: Guard against endless loop in PathChooser
Adding a slash to the text in the path chooser for a custom build
directory currently triggers an endless recursion.

This here does not fix the actual problem but at least prevents
the crash.

Task-number: QTCREATORBUG-28682
Change-Id: Ic7d70ccfaccc1fd9437ca41e8b40b027718af6cb
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-12 12:12:23 +00:00
hjk
3f528de7db ProjectExplorer: Fix compilation with Qt 6.6
appoutputpane.cpp:272:12: error: cannot convert ‘const QList<ProjectExplorer::Internal::AppOutputPane::RunControlTab>::iterator’ to ‘ProjectExplorer::Internal::AppOutputPane::RunControlTab*’ in return

Caused by "QList: deprecate iterator<->pointer implicit conversions"
0220484329029fc7598dfe11ba35ea10c3126477
b6cbd9c43afc7e005c1f78e1d0f700524930ed71

Change-Id: I596ead9deafca1154b5a79495e707137b61a14d5
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
(cherry picked from commit 8ee6b14f00)
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-12 11:06:25 +00:00
hjk
5d7aaf28cb CPlusPlus: Work around Qt SiC breakage
Qt Base b6cbd9c43afc7e005c1f78e1d0f700524930ed71 introduced

    #if !defined(QT_STRICT_QLIST_ITERATORS) && (QT_VERSION >= QT_VERSION_CHECK(6, 6, 0)) && !defined(Q_OS_WIN)
    #define QT_STRICT_QLIST_ITERATORS
    #endif

removing iterator-to-pointer conversion starting with Qt 6.6 as dev,
i.e. now.

Change-Id: I75f25623917d0e666fb267db70d9701a13b270f2
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
(cherry picked from commit be89f99ecc)
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-12 10:52:07 +00:00
Orgad Shaneh
dbfdcbad0c ClangTools: Fix incompatible class/struct forward-declarations
Amends 5dec97ea41.

Change-Id: I87209ee35fd4f13654a34be57f5bb1e69c1b12b0
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-01-12 10:51:03 +00:00
Christian Stenger
184fac8a27 QmlDesigner: Fix build with Qt6.2
Amends b2163f672f.

Change-Id: Ic3eed8fd632aeadeef214df19a33896e9b524499
Reviewed-by: hjk <hjk@qt.io>
2023-01-12 10:19:36 +00:00
David Schulz
baa1e3c2e1 Editor: Allow to hide annotations for a group of text marks
The hiding is not persistent, so on the next Qt Creator start all
annotations are visible again. This is meant to quickly get rid of
annotations if there are to many irrelevant of a specific kind.

Change-Id: I4862e56e0f5624f30aadda26efc9dea672ab1f57
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-01-12 10:19:10 +00:00
Jarek Kobus
6415eef6af DiagnosticMark: Replace source field with ClangToolType
Replace also the AnalyzeOutputData::toolName field with
ClangToolType toolType. Stop relying on comparing translatable
strings inside DocumentClangToolRunner::onDone().

Change-Id: I1b69619fe9283622ed478973ee3a5e9cf8f4c309
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-01-12 10:12:52 +00:00
Jarek Kobus
e7781e2a99 ClangTools: Reuse TaskTree
Reuse it in ClangToolRunControl and DocumentClangToolRunner.
Get rid of ClangToolRunner and provide clangToolTask() method
instead.

Change-Id: I677940b325850849c5f5a60f2d320c031a4f0da0
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-01-12 10:11:44 +00:00
Jarek Kobus
1dad90ea45 RemoteLinux: Don't call mutable expressions inside QTC_ASSERT
In order to conform to the theory: "Removing all
QTC_ASSERTs and QTC_CHECKs should not change anything".

Change-Id: I3f544f8cdcede99d7efa3ba0ef456180203c45be
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-01-12 09:37:27 +00:00
Jarek Kobus
a9c675d88d ClangToolRunWorker: Move logging of started tools into runner creator
Runner creator is being called just before it's about to be run.
Get rid of unneeded ClangToolRunner::fileToAnalyze() now.

Change-Id: I51e49597f38919a7174495df3db6b2adc5109a21
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-01-12 09:24:56 +00:00
Jarek Kobus
64b9728a68 ClangToolsUtils: Add isVFSOverlaySupported()
Remove ClangToolRunner::supportsVFSOverlay().
Move check for modified document and vfsOverlay into
runner creator method, as it's called in the same cycle just
before the runner is about to be started.

Change-Id: I7a5df71bfa73c350862e4c7f9eae49773b6206b7
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-01-12 09:24:50 +00:00
Jarek Kobus
5dec97ea41 ClangToolRunner: Add done(const AnalyzeOutputData &) signal
Introduce AnalyzerOutputData structure that is passed inside
new done() signal. This signal replaces the finishedWithSuccess()
and finishedWithFailure() signals. The output structure contains
all the data required in clients' handlers.

Move AnalyzeUnit into clangtoolrunner.h in order to avoid
circular dependencies.

Get rid of outputFilePath(), as it's passed inside AnalyzeOutputData
now.

Inline ClangToolRunWorker::unitsToAnalyze() as it's used only once.

Change-Id: Icf9a52853c68e83f6ddfc4858dbcb830b96e1844
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-01-12 09:24:43 +00:00
Jarek Kobus
c181631de9 ClangToolRunner: Ensure the clang tool is executable file
Just checking that it's not empty is not enough.

Change-Id: I635c975d72a8c00983aa1f748c169b2d8f6e05f1
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-01-12 09:24:31 +00:00
Jarek Kobus
60b23dca75 ClangToolRunner: Remove unused executable()
Change-Id: I4e426db949ce64674c8e9e1954e621661002179a
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-01-12 09:24:24 +00:00
Jarek Kobus
c350c87e9e ClangToolRunner: Get rid of ArgsCreator
Now we have all the data available so there is not need
to postpone the creation of arguments.

Change-Id: Iec10f5715d6f572c9a8fde63c8c6d3f96f894b47
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-01-12 09:24:18 +00:00
hjk
516f1f12b6 Utils: Show hidden directories in non-native file dialog by default
Selecting .ssh/*.pub is tricky otherwise.

Change-Id: Icd26ec7e4bb6fbb348d62fe6f4a629ea2e723706
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-01-12 09:14:40 +00:00