Commit Graph

80529 Commits

Author SHA1 Message Date
Christian Kandeler
cd12930953 ProjectExplorer: Fix unrelated tooltip appearing
... on clicking into the locator widget.
This removes a workaround for a different problem which is much less
visible. Real solution to be implemented later.
Amends 4c1b3c863c.

Change-Id: I7e7902c90367c8ed59af4e5aabaf5514207b00de
Reviewed-by: hjk <hjk@qt.io>
2022-12-09 11:15:16 +00:00
Jarek Kobus
112835922a VcsBase: Reuse CommandOutputBindMode instead of bool
Reuse it inside vcsExec() and vcsExecWithHandler().

Change-Id: I6ff4044bf43e0883fc46a49718f5f44da87a7e13
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-12-09 10:29:51 +00:00
Jarek Kobus
46213c82be GitClient: Simplify vcsExec
Get rid of editor arg.
Reorder last two args (to conform to vcsExecWithHandler).

Change-Id: Ia32757ac8b766640b76bef81f1b2e0f5efe4d48c
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-12-09 10:29:36 +00:00
Jarek Kobus
0cdfac0cb5 GitClient: Introduce execWithEditor()
Change-Id: I3a7edde4b978cb8e99fe0020d69a0a5e3e09c0fb
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-12-09 10:29:23 +00:00
Jarek Kobus
287a7c9268 VcsBase: Introduce vcsExecWithHandler()
Before, vcsExec() returned already started VcsCommand.
Later, callers of vcsExec() were establishing connections
to the retured VcsCommand::done() signal. However, when
process fails to start (e.g. because of non-existing
executable), the done() signal may be emitted synchonously
from inside VcsCommand::start(). In this scenario
callers of VcsCommand could miss the emission of done()
signal and connect to already finished command.

Instead, provide a vcsExecWithHandler() function which
takes a handler to be called when command finished.
In addition it takes the context object, too.
Don't return VcsCommand from vcsExec() anymore.

Change-Id: I2fb5fbe5d27632ea039c650d37e5d7d1b60cebc0
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-12-09 10:29:04 +00:00
Mats Honkamaa
e990b828a9 Doc: Document password protection function for shared online apps
You can now password protect applications that you share online.

Task-number: QDS-8538
Change-Id: I856946de3407d1e0b833a8cbf8c3e881ae45414c
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2022-12-09 10:18:00 +00:00
hjk
c08317b5a6 Utils: Remove slash normalization in critical path
Should be done by callers, most notably fromUserInput

Change-Id: I0dec8e3ab76d49d0ddf4da3088499e71c536ab83
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-12-09 09:24:43 +00:00
Eike Ziller
823eafcda9 Add change log for 9.0.1
And move change log for 8.0.2 to the right location

Change-Id: I135018524eccb3601d6371558c07a8a07d963c94
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2022-12-09 09:13:44 +00:00
Marcus Tillmanns
b3f82887a3 Utils: Change browse button to OptionPushButton
Allows the user to choose whether he wants to browse local files,
or remote files.

Change-Id: I0d262034a5c2df56bea2efca876c9019099e3da9
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-12-09 08:59:13 +00:00
Burak Hancerli
59505310a5 QmlDesigner: fix QDS does not quit when closing it while Splash screen is open macOS
Setting modality prevents the window closing even the mainwindow
is being closed.

Task-number: QDS-8540
Change-Id: Ifa2b185c0548128b35ba680d2bc8bf8c856d7c37
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-12-09 08:52:29 +00:00
Jarek Kobus
36be7b8375 Utils: 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: I6f5c4486afb422301562d79c662fdde026e4d788
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-12-09 08:10:17 +00:00
Jarek Kobus
a6b17d127a VcsBase, Git: Don't use queued connections to VcsCommand
Otherwise, the destructor of VcsCommand could have been
executed in meantime (since it's invoked automatically
after done()) and we might access invalid pointer to the
command inside the done handler.

Change-Id: I031e2281952451d4e01c47f437097a1e7bf8899f
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-12-08 20:54:49 +00:00
Jarek Kobus
533d969735 GitClient: Remove unused connectRepositoryChanged()
It wasn't implemented, neither.

Change-Id: Ic6cdf70e10b232d326dcc936337a38488adca0ac
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-12-08 20:54:32 +00:00
Marcus Tillmanns
7d573cfa0b ProjectExplorer: Fix test crash
actionBar can be smaller than statusBar during auto-testing,
which results in a negative value being used in qBound(), which triggers
an assert if min is bigger than max.

Change-Id: I40044cc1d6ded3c7b5e55a9bf93f88a52341237f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-12-08 16:21:26 +00:00
Thomas Hartmann
56450a8fe6 QmlDesigner: Update application template for QDS projects
This updates the application template to download
the designer components.

* Added a cmake configure option BUILD_QDS_COMPONENTS
* We use the qds-3.9 branch of qtquickdesigner-components

Change-Id: I046e2c7e648fe9d3cb6cf8d2cec8eb606432bccd
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-12-08 15:54:26 +00:00
Jarek Kobus
d0e24654f6 CMakeProjectManager: Pass context object to lambda connections
Remove some unneeded lambda () brackets.
Remove some unneeded lambda return type specifiers.

Change-Id: I9695367d66a151f2611554b9fe5897c1bac7ef5c
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-12-08 15:28:50 +00:00
Jarek Kobus
6a7f5be0ea PluginGenerator: Fix returning the error message
I bet the original intention was to return a new message,
so we should assing a new value into the passed pointer
rather than change the local copy of a pointer so that it start
pointing to the local variable.

Amends aaa8beab88

Change-Id: I1fdc8f3f4ea43e4814f02dbf615ad128bfc9a059
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-12-08 15:16:15 +00:00
hjk
9e7743494c Utils: Use some of the FilePath convenience functions in FileCrumbLabel
Change-Id: I79f6b52847106bab22454f032407eb6866012362
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-12-08 14:49:03 +00:00
Christian Kandeler
4c1b3c863c ProjectExplorer: Add "Generate" sub-menu to build menu
Preparation for adding more generators.

Task-number: QTCREATORBUG-28149
Change-Id: I4afa183a6fbd8ee88fc978b382f28cf9e52f09e9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-12-08 14:34:52 +00:00
David Schulz
6d8f6ab395 LanguageClient: robustify renaming symbols
Guard against using a symbol support from a deleted client. Additionally
cancel active replace operations and provide a sensible error message.

Change-Id: I92ca0038fa5f6acbb8369a48c4e8051adfadb30e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-12-08 14:27:29 +00:00
Jarek Kobus
154e3df17e CppQuickFixes: Fix possible null dereference
It may happen that we dereference null inside the following
condition:

  if (declarator->postfix_declarator_list)

This may happen in case we entered the "if (!declarator)"
condition, but didn't fulfill the nested
"if (path.at(n - i++)->asPointer())" condition.

Detected by clazy analyzer.

Change-Id: I47135bc5648459e91664a4f65f9752b58248a496
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-12-08 14:10:53 +00:00
Jarek Kobus
b0e6943491 TextEditorWidget: Ensure non-null source is passed to insertFromMimeData
Detected by clazy analyzer. The possible context was
TextEditorWidget::dropEvent(). In some branches we ensure
that mime is not null, but later we call insertFromMimeData()
unconditionally.

Change-Id: Iee5138bc19d405050eafc9617d3c2ed123b767c7
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-12-08 13:52:12 +00:00
Jarek Kobus
55ba10be38 RemoteLinux: Pass context object to lambda connections
Change-Id: I025c588e7d32be0f940b74acf9421965073cff5c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-12-08 13:51:06 +00:00
Mahmoud Badri
d0c9bc76cb QmlDesigner: Update textures sources on state change
Also small relevant fixes.

Fixes: QDS-8523
Change-Id: I8125b124024ee18de8c70afbc9f633c3b9265e82
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2022-12-08 13:49:21 +00:00
Jarek Kobus
b67201c410 Git: Simplify ConflictHandler
Don't create QObject instance when handling conflicts.
Operate on static functions only.
Replace destructor of ConflictHandler with finalize() method.

Change-Id: If579edc6213faa50c73a90cedf4b67cf985478ac
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-12-08 13:46:59 +00:00
Jarek Kobus
f9800bb790 ClangTools: Pass context object to lambda connections
Remove some unneeded lambda () brackets.

Change-Id: I502eb5cd89505fb77c02abf44b7ce19541a8ac2f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-12-08 13:46:41 +00:00
Aleksei German
37564d267b QmlDesigner: Fix Connections status in ContextMenu
Task-number: QDS-8521
Change-Id: Id0b835fb14b18563d4ecc0c1b2039b9bb181c32c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Aleksei German <aleksei.german@qt.io>
2022-12-08 13:22:37 +00:00
Miikka Heikkinen
636c9524f9 QmlDesigner: Work around the issue in QtQuick3D 6.4 geometry caching
QQuick3DGeometry::updateSpatialNode can create QSSGRenderGeometry
object with exact same address as a previously created and subsequently
deleted QSSGRenderGeometry object (i.e. the memory location is reused).
If the previous node was not used for the exact same logical geometry,
then you get these artifacts, as QSSGBufferManager uses
QSSGRenderGeometry object pointers in QSSGBufferManager::loadRenderMesh
function to determine if it needs to reload the geometry and what
geometry gets used for each model. The cache still contains data for
the deleted node, which is then matched for the new node with same
address.

This workaround ensures that none of our grid geometries will have the
same generation id and thus will never get improperly matched in
QSSGBufferManager cache.

Task-number: QDS-8516
Change-Id: I017a4ae4a59eef2bb26ade5abf13e8f74f57c4af
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-12-08 12:40:07 +00:00
Cristian Adam
6bef53a818 PE: Add ability to skip vcvarsall.bat /clean_env
By defining QTC_NO_MSVC_CLEAN_ENV one can skip the vcvarsall.bat /
clean_env functionality.

Task-number: QTCREATORBUG-28561
Change-Id: I6392b2278008607042a43a38a2c38669b4b52183
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-12-08 12:21:26 +00:00
hjk
b354421f27 CppEditor: Use FilePath in fileSizeExceedsLimit()
... and adapt caller side.

Change-Id: Idd832101962dcdc8b24f96bebbdb77fd3e29ba7c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-12-08 12:07:45 +00:00
Mahmoud Badri
e70f909bcf QmlDesigner: Update texture editor and browser after source reset
Fixes: QDS-8520
Change-Id: I9ceca64d75ef1c41633a89a79748265beecd16ea
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Ali Kianian <ali.kianian@qt.io>
2022-12-08 11:32:08 +00:00
Jarek Kobus
5c86f58bdd Boot2qt, Qnx: Pass context object to lambda connections
Change-Id: I64c5ed32035f161920a7ba08fa67de7bee6653a3
Reviewed-by: hjk <hjk@qt.io>
2022-12-08 11:28:24 +00:00
Jarek Kobus
c021fb5179 Don't call non-const methods on temporary QList
Otherwise it may unnecessarily detach. Either store a local
const reference or call const equivalent (e.g. constFirst()).

Change-Id: I96d665487cf28c17e72bea17f1b8f164ce06cc70
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-12-08 10:21:57 +00:00
Jarek Kobus
8e7e1dd5f2 Mark some virtual overrides final
These methods are being called from c'tor or from d'tor.
Make sure these methods will not get overridden by any possible
subclass, otherwise these calls won't be dispatched properly.

Change-Id: I3652d2f495940f13b48b494ab2cf06abb3d37e7e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-12-08 10:21:44 +00:00
Jarek Kobus
42bc552f2b Beautifier: Pass context object to lambda connections
Change-Id: If1231b609e6987cbf9e26eb2f5a69da8e40e1363
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-12-08 09:58:26 +00:00
Jarek Kobus
c5a60d2dc2 Docker: Pass context object to lambda connections
Remove some unneeded lambda () brackets.

Change-Id: I2fcd83ec2e68a7aeb8f51fa39e7e69cc16e26bc8
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2022-12-08 09:50:53 +00:00
Jarek Kobus
9e571931d0 AutoTest: Pass context object to lambda connections
Remove some unneeded lambda () brackets.
Glue lambda brackets with parameters brackets.

Change-Id: I414f7dbbaf60b452cb71f77d53d972937f121a47
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-12-08 09:32:42 +00:00
Jarek Kobus
f6913ce791 Squish: Pass context object to lambda connections
Remove some unneeded lambda () brackets.
Glue lambda brackets with parameters brackets.

Change-Id: I8f08699c23e2cb624ac32f0f11cfe8f5703a3d7c
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-12-08 09:26:41 +00:00
Marcus Tillmanns
0ddc0eb8e9 ProjectExplorer: Re-layout target selector
When the summary changes, we need to recalculate the layout as it
might change the height of the target selector. Otherwise the selector
might move while the mouse is still pressed, leading to an unwanted
selection.

Change-Id: Ic1f1ffc89376caf33ecf1be80b7aeda52839bc5e
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-12-08 09:18:42 +00:00
Mahmoud Badri
b530f938ba QmlDesigner: Keep search on when adding a material or texture
Fixes: QDS-8487
Change-Id: Id02d693a5a707e97555450ce860ee4480e7742eb
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2022-12-08 08:57:26 +00:00
Jarek Kobus
5769fd82d3 CorePlugin: Pass context object to lambda connections
Remove some unneeded lambda () brackets.

Change-Id: Id664cfc3b46685f63fb205beaf16a7c271ad95d9
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-12-08 08:50:07 +00:00
Jarek Kobus
94e98281e9 ScxmlEditor: Pass context object to lambda connections
Remove some unneeded lambda () brackets.

Change-Id: I12a3498c3c13121e021e13b763905fc6a41b214d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-12-08 08:49:49 +00:00
Eike Ziller
deb454d8fb SaveItemsDialog: Fix default button
Changed when removing .ui file. Call order is important here.

Amends b3e3de517d

Task-number: QTCREATORBUG-28536
Change-Id: I04d9351f8bb7f2ed170f3643ba84af5f8afe35ab
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2022-12-08 08:05:13 +00:00
Eike Ziller
a499058a6f Utils: Add push button with menu and default click action
QPushButton has the functionality of setting a menu, but that replaces
the normal "click" functionality, and always opens the menu on click.

QToolButton can have a menu and the user can still click on it to just
click. But, QToolButton looks very different, and in combination with
other, normal push buttons very alien.

Create a push button that only shows the menu when clicking on/near the
menu indicator, and otherwise just sends the clicked() signal like a
non-menu push button.

Change-Id: Id6ba367e40c370275f67f0fbf77521c2e974b3b8
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-12-08 07:36:28 +00:00
David Schulz
69ce2a4047 Editor: ensure something is selected after model update
Change-Id: I3fbf14cb7aa60caef43340302e74e80ed5e3ba4c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-12-08 06:16:33 +00:00
Jarek Kobus
0313470db0 VcsBase: Pass context object to lambda connections
Remove some unneeded lambda () brackets.

Change-Id: I20e43625793401544e86efb627f5921c395026bb
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-12-07 21:54:39 +00:00
Kwangsub Kim
b4015fc345 BareMetal: Auto-detection of IAR toolchain version 9
The Windows registry node containing the installation path of IAR
workbench changed since version 9 that is the same as the one for
32-bit Windows host. Multiple registry keys will be used to identify
the latest IAR toolchain as well.

Task-number: QTCREATORBUG-28245
Change-Id: I92ed0c10a38e081ca45fcf9e543d902a3e98efc2
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
Reviewed-by: hjk <hjk@qt.io>
2022-12-07 16:37:34 +00:00
Jarek Kobus
0d74be319a Android: Pass context object to lambda connections
Remove some unneeded lambda () brackets.

Change-Id: Id00e2bc736683bb844cc7ba936ac9d21aa204416
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-12-07 16:30:13 +00:00
Jarek Kobus
9afcf870a1 Utils: Pass context object to lambda connections
Remove some unneeded lambda () brackets.

Change-Id: I6b7e07cad8a240a7021c6ddacc84a971809ee717
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-12-07 15:28:47 +00:00
hjk
166f710e62 ProjectExplorer: Simplify scanning for wizard.json files
No need to manually implement recursion when QDirIterator::Subdirectories exists.

Change-Id: I88f04da9a6138e3fc903016dd85b94ba431e3b1a
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-12-07 15:11:01 +00:00