Commit Graph

68765 Commits

Author SHA1 Message Date
Orgad Shaneh
cd8ea1f45b Git: Call updateUpstreamStatus for all branches in a single place
* Calling it for each parsed line mixes unrelated logic.
* I consider adding a cache later, but that will require data for
  all the remotes before this call.

Change-Id: Ic3ee975fc6172f2a8848bc8d0a6620d4ccbf9cd2
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2023-02-14 08:08:28 +00:00
Christian Stenger
0ffb85b4d8 AutoTest: Improve test output handling
Instead of just providing the hidden search, provide a more
obvious present filter functionality for the text output
similar to what is done in other output windows.
This still has the find functionality present as well.

Task-number: QTCREATORBUG-28706
Change-Id: I8f8b1494d86c90cbb9ea6bfad3f0e74caf3de2c9
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-02-14 06:41:22 +00:00
Christian Stenger
a8d493d352 TextEditor: Fix typo
Change-Id: I3dcf98827789882ea9cd7a5c4072173a2f33b97a
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-02-14 06:40:28 +00:00
Orgad Shaneh
adfb5062f4 Git: Do *not* use ctrlc stub for rev-list
It's a very short command, so the time penalty for spawning another
process doesn't worth the additional termination protection.

Amends commit 371e674967.

Change-Id: I151f0bc1838cd9ddbdf822cbe5cf8923da6a9499
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-02-13 18:44:25 +00:00
hjk
7faad7b4e8 Android: Move a global regexp variable into a function
Change-Id: I888e11b2e16553cd14e4e07335ef90b8094b6cbf
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-02-13 18:36:07 +00:00
Orgad Shaneh
c2cfe596b9 Git: Reduce PATH searches for executable
This reduces executions in BranchModel::updateUpstreamStatus (which is
called for each local branch with a tracking branch) from 3s to ~700ms
on Windows.

Change-Id: I92651ba8f37987bef49a80b46963964ae8cacb3c
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-02-13 18:31:54 +00:00
Orgad Shaneh
728e73ea9d C++: Fix return type in preprocessor comparator
Change-Id: I6d85a78892291db7ae0b1de8a7e3b74d0401874a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-02-13 17:49:03 +00:00
Christian Kandeler
70506ff136 Update qbs submodule to HEAD of 2.0 branch
Change-Id: Id69e8571ae1ac276ebfcab1eb0994012376cf4c4
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-02-13 13:56:37 +00:00
Alessandro Portale
9f2f2f3390 Translations: Change translation context prefix from "::" to "QtC::"
lupdate would be confused by translation contexts starting with ::

Change-Id: Ie95e73436fd3cafc80a8e89f908efadc747e644c
Reviewed-by: hjk <hjk@qt.io>
2023-02-10 16:27:55 +00:00
Alessandro Portale
226799858c Translations: Replace QCoreApplication::translate() with Tr::tr()
Calling <Module>::Tr::tr() is preferred over
QCoreApplication::translate("::<Module>", "..."). This changes
occurrences in .cpp files.

Change-Id: I3311ef0dbf3e7d105a3f181b6b988f3b444468f1
Reviewed-by: hjk <hjk@qt.io>
2023-02-10 16:27:37 +00:00
Alessandro Portale
64aaf66c3b Proliferate Tr::tr in various places
This changes several tr() calls which were either missed during Tr::tr-
ization or were added later.

Found with regular expression: (?<!(Tr::)|([\w]))tr\(

Change-Id: I1c0c03589e941614a7a8449ecfebc7d2cad396c3
Reviewed-by: hjk <hjk@qt.io>
2023-02-10 16:27:19 +00:00
Alessandro Portale
ba34f00e1e ModelEditor: Tr::tr()
Following orphaned contexts are merged into ::ModelEditor

  ModelEditor::Internal::ActionHandler
  ModelEditor::Internal::ElementTasks
  ModelEditor::Internal::ExtPropertiesMView
  ModelEditor::Internal::FileWizardFactory
  ModelEditor::Internal::ModelDocument
  ModelEditor::Internal::ModelEditor
  ModelEditor::Internal::ModelsManager
  ModelEditor::Internal::PxNodeController
  Modeling

Change-Id: Ib602b91af7a4b8d8f886e587e6988338b1e841e8
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-02-10 16:27:03 +00:00
Alessandro Portale
3c6b8b08df ModelingLib: Tr::tr()
Following orphaned contexts are merged into ::qmt

  qmt::ClassItem
  qmt::DiagramController
  qmt::DiagramSceneController
  qmt::DocumentController
  qmt::Exception
  qmt::FileCreationException
  qmt::FileNotFoundException
  qmt::FileReadError
  qmt::FileWriteError
  qmt::IllegalXmlFile
  qmt::ModelController
  qmt::ModelTreeView
  qmt::NullPointerException
  qmt::ObjectItem
  qmt::ProjectController
  qmt::PropertiesView::MView
  qmt::TreeModel
  qmt::UnknownFileVersion
  qmt::V

Change-Id: Iaf98c2bfc654452d44f6bed155be6ddfe7556b19
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-02-10 16:26:57 +00:00
Alessandro Portale
fe91151f7c Valgrind: Tr::tr()
Change-Id: I4156aa23755ad28ca6fbc3ff5ce6d5b6a6d7fc95
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-02-10 16:26:51 +00:00
Alessandro Portale
91c00ec34f SilverSearcher: Tr::tr()
Change-Id: I4b9aef9c735c07a4836653bdb6d684fb3e0f993e
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-02-10 16:26:44 +00:00
Thomas Hartmann
4d54a16a49 QmlDesigner: Remove legacy code path from TextToNodelMerger
We can use NodeMetaInfo instead of directly accessing the code model.

Task-number: QDS-8800
Change-Id: I1d73e2a470c40a15e5237544746cb4b841f8e1b7
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2023-02-10 15:36:35 +00:00
Alessandro Portale
2b46d1943c QmlPreview: Tr::tr()
Change-Id: Ie80134c114da277ab16e4305c57ae35e37adafb2
Reviewed-by: hjk <hjk@qt.io>
2023-02-10 15:11:22 +00:00
Alessandro Portale
4f55dbdd38 CompilationDatabaseProjectManager: Tr::tr()
Change-Id: I5a4b05ce3eab90cfe05c297fa3971f94270ec474
Reviewed-by: hjk <hjk@qt.io>
2023-02-10 15:03:32 +00:00
Orgad Shaneh
c72638ed74 QtcProcess: Introduce a way to track long-running blocking processes
...in the main thread.

Set QTC_PROCESS_THRESHOLD (in ms) to receive warnings for them.

Change-Id: Ia9e9c14b5ca339bfa2be82930518f988f56620c2
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-02-10 14:45:24 +00:00
Christian Stenger
a8bc009595 Debugger: Avoid potential crash
Change-Id: I971453c30f29144e87b2384c9c6a0c2413db218a
Reviewed-by: hjk <hjk@qt.io>
2023-02-10 14:01:30 +00:00
Miikka Heikkinen
ce69374170 QmlDesigner: Fix keyboard navigation in material browser
Keyboard navigation now accounts for collapsed sections and
items hidden with search filter. Also, navigation is suppressed
while search box has focus.

Fixes: QDS-9108
Change-Id: I9fb555803cd72fb3550d5e30e20c62a40f845ef3
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2023-02-10 13:43:22 +00:00
Thomas Hartmann
129a5c4598 QmlDesigner: Add more output to debug view
Change-Id: Ia025440e7c01040bdca32bcc1a0f7bb7f59216bc
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2023-02-10 11:43:12 +00:00
Thomas Hartmann
c26ef7becc QmlDesigner: Add QTC_ASSERT
This allows spotting this in packages.

Change-Id: Ib69708e2aa02357763ebaffcd6a1394cc763642e
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2023-02-10 11:43:03 +00:00
Thomas Hartmann
db3ff0c207 QmlDesigner: Allow settings and swtiching kits in edit mode
If kits are broken, then users can end up in the edit mode.
We should allow changing kits and settings here.

Change-Id: Ic6410942c3b0c1d9e7c04989efab57d7690c0694
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2023-02-10 11:42:52 +00:00
Thomas Hartmann
4ef9e04f2b QmlDesigner: Fix crash
If we delete the item we also delete the children.
This will crash if the children is further down the list.
We have to delete without children.

Task-number: QDS-8961
Change-Id: Ia17f9ef23339dbe36e848fa49928cb3c0077d6f1
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-02-10 11:00:51 +00:00
Jarek Kobus
06dda40ccc TaskTree: Add synchronous invocation (Tasking::Sync)
Make it possible to mix synchronous and asynchronous calls
inside task tree.

Basically, it's a shortcut for:

bool syncMethod();
Group {
    OnGroupSetup([syncMethod] { return syncMethod()
                                ? TaskAction::StopWithDone
                                : TaskAction::StopWithError; })
}

Please note: similarly to Group, Sync isn't counted as a task
inside taskCount() and doesn't emit TaskTree::progressValueChanged()
when finished. It's being considered as a simple handler
that doesn't last long and shouldn't block the GUI thread.
Otherwise, use AsyncTask instead.

Change-Id: If71c5da2f9b202a69c41a555cc93d314476952f4
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-02-10 10:50:47 +00:00
hjk
4b9aaf6ca1 ExtensionSystem: Remove the IPlugin back pointer to pluginspec
The price of having to loop in two places seems small compared
to cleaner relations between the classes.

There's a new hack in the helpmanager to make sure we aren't
looping to often. The hack wouldn't be needed if the (odd(?))
check there weren't there.

Change-Id: Ifed50213b2de8feedfb45c185808d163c00c19ca
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-02-10 10:23:33 +00:00
Eike Ziller
2f5aed6c78 Merge remote-tracking branch 'origin/10.0'
Conflicts:
	src/plugins/clangcodemodel/clangdlocatorfilters.cpp

Change-Id: If91f26625ea9620fb9fdbf45705b32f37cb7f158
2023-02-10 10:43:06 +01:00
The Qt Project
2a2f6afb04 Merge "Merge remote-tracking branch 'origin/9.0' into 10.0" into 10.0 2023-02-10 09:29:38 +00:00
Eike Ziller
b29cb4efe1 Merge remote-tracking branch 'origin/9.0' into 10.0
Conflicts:
	src/plugins/texteditor/codestyleselectorwidget.cpp
	src/plugins/updateinfo/updateinfoplugin.cpp

Change-Id: Iac33b852ccef6018bd81188716526aa70c3f5a2d
2023-02-10 10:29:14 +01:00
Alessandro Portale
3023b6ab03 Translations: Remove stray Q_DECLARE_TR_FUNCTIONS(...)
And handle the consequences in qmakebuildconfiguration.cpp.

Change-Id: Ic24d99927254e8d16decea49b880a2446bf322e6
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-02-10 09:09:48 +00:00
Thomas Hartmann
5e70a0e374 QmlJS: Do not set import as invalid if sub import fails
QtQuick.Controls has sub imports like QtQuick.Controls.macOS/windows
that wil lbe invalid on other platforms. In this case we do not want
to mark the original import as invalid, since it turns
off checks in QmlJSCheck.

Therefore moving the setting to invalid into the block that is only
executed for non optional sub imports.

Task-number: QDS-9094
Change-Id: If0ad4e32c14d608f88b8239f390208e51a93fbd8
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2023-02-10 08:27:40 +00:00
Christian Stenger
3d57b1868b Fossil: Force open a repository by default
Fixes: QTCREATORBUG-28762
Change-Id: Iac45e940eb32cdb68eb2e745c5e63d3cc48ac943
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-02-10 08:24:20 +00:00
Ali Kianian
cf91a91785 QmlDesigner: Fix the bug for initializer_list
asInitializerList function bug is fixed.

Change-Id: I83a2d77fde6c3fb1c2e786cc2168ea7b9db1eca0
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-02-09 16:02:54 +00:00
Thomas Hartmann
4d67db6cfe QmlDesigner: Fix for toolbar
Task-number: QDS-9042, QDS-9040, QDS-9034, QDS-8956
Change-Id: I0639bbfdaa7475a277cbb247c7d85bf5b078a5aa
Reviewed-by: Pranta Ghosh Dastider <pranta.dastider@qt.io>
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2023-02-09 15:27:25 +00:00
Artem Sokolovskii
8491441257 TextEditor: Speed up updateCurrentLineHighlight
Only update the changed blocks and use sets instead of lists to
store the info and create the diff.

Change-Id: I08d81b326ceebdc6bf2ba322886b7bf5671b2769
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-02-09 14:05:28 +00:00
Artem Sokolovskii
db720d271d MultiTextCursor: Optimize multitextcursor
- Use map for merging intervals instead 2 times list iteration.
- Time complexity O(nlogn) instead O(n^2)

Change-Id: If65391999e1ff191752447935602fcc9847243fe
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-02-09 14:05:12 +00:00
Tim Jenssen
a18ab6b11f QtSupport: allow relative paths for the qmake command
This change makes it possible to bake in settings for bundled/shipped
Qt versions like we have in the QtDesignStudio.app package.
The result is that the installer does not need to write absolute
paths to the settings anymore, so it stays like it was signed.

A signed package on macOS is more and more necessary
and recommended for a while. Especially If the application will
touch files in special folders like Download, Documents, or Desktop.

Change-Id: I3153ffd4229b34a59bdfe740937c21ee93de3e9b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-02-09 13:55:56 +00:00
Christian Kandeler
0edcbd8853 CPlusPlus: Always build the tools
There is no advantage to excluding the tools by default that outweighs
the risk for them to get out of sync with the rest of the codebase.

Change-Id: I3ad292aa5648a4448babdf5d06c84b3f5ec94482
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-02-09 13:46:50 +00:00
Marcus Tillmanns
f06bc4ab5a Docker: Fix searching for clangd
Environment::searchInPath() does not know from which device it came.
Therefore it will take the PATH variable as it is ( without the
device://... prefix ) and search for files on the local device.

Change-Id: Iecddb5ee1beb4ac821a9ac592f6edb1fc0f68b54
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-02-09 13:42:24 +00:00
hjk
5782c7e6f3 PerfProfiler: Use new plugin test object setup
And clean up a bit

Change-Id: Idcc95ec94a437428caf97b7866b2c1e40f9a35c4
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2023-02-09 13:23:23 +00:00
Christian Kandeler
207f2b216c CPlusPlus: Add lexer support for new C++20 keywords
Change-Id: I2b83deb0502ebf2cdca2af774fbb2ce26e947c11
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-02-09 13:19:53 +00:00
Christian Kandeler
bb9e492745 CppEditor: Prevent duplicate symbols in document-scope locator
If declaration and definition of a symbol are present, offer only the
definition, as in the function and class locators.

Fixes: QTCREATORBUG-13894
Change-Id: I6794607c4c45831df53b022bbdad9db7205a890b
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-02-09 12:44:31 +00:00
Marcus Tillmanns
4e34f1781e Clangd: Convert paths in diagnostic messages
Change-Id: I28844c803b9d71be3a7bb760ef89542265fb352b
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-02-09 12:01:07 +00:00
Marcus Tillmanns
1523f49e5c Utils: Add PathFilter to FilePath::searchInPath
Change-Id: Iccbecc7401f17208487113f89e49ed7103acf9d6
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2023-02-09 11:56:28 +00:00
Knut Petter Svendsen
f6d1a4aaf4 ClearCase: Fix bug in ClearCaseSync runProcess
Assignment and compare in a while() loop is trouble. Fixed
bug where index always was 1.

Change-Id: I037d8c2290cf44c6200354b7c44950009e26c583
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-02-09 11:46:20 +00:00
Cristian Adam
61eb25af6d auto-setup: cleanup script
Remove the Qt SDK detection of conan. This is no longer valid with the
scripts being copied to ${buildDir}/.qtc/. Qt SDK also doesn't ship
conan anymore.

Do validation for conan via "conan --version" and vcpkg via "vcpkg
version".

For vcpkg the program path is resolved for symlinks and for Windows the
target architecture is being detected from the compiler path.

Change-Id: If0da79c952392d5ac9f8352e262b0802d6eb9ed3
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-02-09 10:47:16 +00:00
Ali Kianian
dce852c7a4 QmlDesigner: Apply old icons to the actions
- Old icons applied to the actions of the DesignerActionManager
in order to prevent showing texts on the old top toolbar.
- Reset icon is now available only for on state.

Task-number: QDS-8910
Change-Id: Ibd2d703b5e760709e5da81e6a3d3d93d5ba0e104
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-02-09 10:41:15 +00:00
hjk
da7383387d Clangtools: More FilePath
Change-Id: I82057f1a9788043ee45a268ae57847caf6c994f3
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-02-09 10:00:45 +00:00
hjk
9ad60cd891 ClangTools: Use FilePath in AnalyzeUnit
Change-Id: Ic8e19053a60e7c4d801f32f9048b7c48d00b2a3d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-02-09 09:57:24 +00:00