Commit Graph

62421 Commits

Author SHA1 Message Date
Thomas Hartmann
51b51f8826 QmlDesigner: Fix crash
Fix raise condition when the global metainfo is initialized

Task-number: QDS-6429
Change-Id: I9cbeaecb440855f44b469dae5a3ef41c9ae7d8a8
Reviewed-by: Brook Cronin <brook.cronin@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-03-16 13:55:11 +00:00
Tim Jenssen
9976f938e8 fix warning
qtcreator/src/libs/utils/tooltip/tips.cpp:91:31: warning: suggest braces around initialization of subobject [-Wmissing-braces]
    } qt_meta_stringdata =  { 8, sizeof("QTipLabel"), "QTipLabel" };
                              ^~~~~~~~~~~~~~~~~~~~~~
                              {                     }
1 warning generated.

Change-Id: Ic9672543a16be9cf02316efd379344a26567f5e0
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-03-16 13:26:31 +00:00
David Schulz
36f18487d9 LSP: Fix workspace folder change capabilities
Change-Id: I096dd26744acbb0296b1731403c05903209770d8
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-03-16 13:09:59 +00:00
hjk
68faedd62f Utils: Add a PathListEditor::setPlaceholderText
Change-Id: I517dfec9d57b6965a3e40c786aa238f04fc69546
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-03-16 11:40:00 +00:00
David Schulz
d776445953 Editor: prevent repainting complete editor with for current line
Instead make sure that the widget is updated after the current line
changes.

Task-number: QTCREATORBUG-26812
Change-Id: I9fc754255891ec29d3499da0ee23aa56b1f285aa
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-03-16 10:37:17 +00:00
hjk
cc51e32b2d Docker: Add a warning when the mount path list is empty
The common use case shares project sources between host and docker
container, in that case, not sharing anything will not be useful.

Change-Id: I44b12089579ead008023caf5134c613fc145b8c7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-03-16 08:53:39 +00:00
David Schulz
b5457750f2 Editor: do not request updates for the complete annotation area
... inside the paint event. We should always make sure to call an
explicit update when we add, remove or change annotations via text
marks.

Task-number: QTCREATORBUG-26812
Change-Id: I5afbdad5e1916e99665b5cb1b1cd2a0bbf7335c3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-03-16 08:41:54 +00:00
Eike Ziller
5cf4510da5 Fix context menu of snippet editor
The snippet editor is a TextEditorWidget, but the special context menu
of that doesn't make sense in the context of the snippet settings.
Get the default context menu back.

Fixes: QTCREATORBUG-27176
Change-Id: I9681482f83fe32d15be0b1386e2fb26870b955e2
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-03-16 07:46:11 +00:00
Miikka Heikkinen
6c9ded9461 QmlDesigner: Block starting drag when clicking on non-draggable node
Fixes: QDS-6415
Change-Id: I328e7715d2837d1126506a6fbbf4d1bf52cc250f
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-03-15 14:53:33 +00:00
Tim Jenssen
f487143848 qds: extra code to handle license in about dialog
Change-Id: If9b493a4c9582b1fefac3dcaf31d34ef08eb6e6d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-03-15 10:54:45 +00:00
Assam Boudjelthia
a141d56991 Android: Don't call getDeviceState() on empty serial number
Avoid calling getDeviceState() if the serial is empty, which
won't give any useful info for emulators. This will avoid
multiple state checks at QC start as well.

Also, set the default new AndroidDevice state as Disconnected,
which reflects better the state of an empty newsly constructed
device which we don't know the state of.

Change-Id: I854e95e28b150f09c3eff6b8a75b2df6bd4aa1ce
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-03-15 09:03:49 +00:00
Christian Stenger
cd7a0bbef5 Docker: Inform user early if adding device fails
When retrieving the list of images there is no indicator when
something failed, so add one.

Change-Id: I2e0cde4ba33527e1b2abeecb5b3a06507dabf472
Reviewed-by: hjk <hjk@qt.io>
2022-03-15 05:43:02 +00:00
David Schulz
525d26db03 Editor: centralize annotation filtering
Change-Id: I68464b14b44beee772ace93f7bdebc32ae3325ef
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-03-15 05:22:22 +00:00
David Schulz
32fc9653ed Editor: only update annoations inside event rect
Change-Id: I61c2648734c3d5b3018215a83e7d4226905a6993
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-03-15 05:22:16 +00:00
David Schulz
febe659690 Editor: filter text marks in paintAnnotation
Calculate the correct width for the annotation and decide inside
TextMark whether it can be painted or not. This will also
make sure that all annotation rectangles are correctly saved in
TextEditorWidgetPrivate::updateLineAnnotation.

Change-Id: I7e6c606e615b1673a34000618e106efb14184b10
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-03-15 05:22:08 +00:00
David Schulz
a8cad01887 Editor: make sure to update marker on annotation change
Ensures an update for the markers editor widget after any of the
information displayed in the annotation has changed

Change-Id: I845e05f5103ee1615cfc3d7760cdfc2bbf510f32
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-03-15 05:22:01 +00:00
Assam Boudjelthia
851171f772 Android: rename avdname to avdName in AndroidDeviceInfo
Change-Id: I9f4743b0d9f953f1fa407acfea41345571cb9998
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-03-14 17:48:31 +00:00
Assam Boudjelthia
e5ce9e9e76 Android: Get rid of the avd info fields in AndroidDeviceInfo
The AVD specific fields don't need to be carried out by QtC settings,
these can be read from the AVD's config file when they are needed.

This also is good because those values can change at any time,
either manually or by some other IDE like Android Studio, and thus
we don't really need to manage them ourselves.

The fields in question are: skin name, target name, sdcard size,
openGL status.

Change-Id: I86163500ec2fed035e32ec02ed17e182778db4a7
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-03-14 17:47:55 +00:00
Eike Ziller
3f0c8b2149 Merge remote-tracking branch 'origin/7.0'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri

Change-Id: I1ce9876150239751a1187bc0c4b8fc5fef1ab40d
2022-03-14 14:02:14 +01:00
hjk
2eca1c0ffc Docker: Add history to "Search in Selected Directories"
Also set focus to the line edit when this item gets selected,
and remove the arbitrary /usr/bin;/opt default.

Slightly better UX.

Change-Id: Icdc4e81d6cebd7aed1dd4999c4007a60c8ea53a2
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-03-14 12:05:27 +00:00
Jarek Kobus
cfe8b7ad88 Fix handling of unfinished lines by QtcProcess callbacks
Don't detect a call to QtcProcess::kill() from inside the
QtcProcess callback while awaiting inside QtcProcess::waitFor...().
That's not needed, since a call to kill() sends a stop message
to the process launcher, so we wait for confirmation
from process launcher instead. This may bring e.g. new
read data from the running process.

Fix a runBlockingStdOut() test so that when we write to the stdOut
from the running process we flush the unfinished line so that
it's not buffered inside the process.

Change-Id: I7944ac214d8cb9e10a71715a7ef8bfacab6df7c9
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-03-14 07:38:08 +00:00
David Schulz
8e16d45d4c ClangCodeModel: prevent crash on null project info
Change-Id: Iff0c0413aa52821dc883b7f42b04bc8ca5dd4a29
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-03-14 06:06:39 +00:00
hjk
1de60ddeaf CMake: Don't be too eager to throw out SDK-registered cmakes
Change-Id: I6a35e7599b61068deaf34aeb86ba53bc4120c47c
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-03-11 16:00:58 +00:00
Christiaan Janssen
e293aab725 McuSupport: remove cmake mapper
Starting with Qt For MCUs 2.0, environment variables are not
used to track dependencies any more, but cmake variables are.
Due to time constraints, we implemented a env-to-cmake mapper
to cover that gap at the moment. This patch removes that hack
and implements tracking dependencies through cmake variables.

Task-number: QTCREATORBUG-26904
Change-Id: Id8553a764d212d9b12e4adc54fc56233bfeb9a5b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-03-11 14:24:34 +00:00
Miikka Heikkinen
8b27281354 QmlDesigner: Show error message on import log for failed 3D import
The import is done on puppet side, so we use a log file to pass the
error message.

Also changed how import process is matched to the import, so that
exit code is no longer needed for this purpose. Crashes are also
now reported as import errors.

Task-number: QDS-6402
Change-Id: Ie14cd1df0bbba965d8e5f2aa7302a955e944379b
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-03-11 14:18:04 +00:00
Robert Löhning
38cdbd2bcd ManhattanStyle: Avoid crash when zooming invalid image
Task-number: QTBUG-101581
Change-Id: I4070efe266fbbd579b021cd9c03465c85313e042
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-03-11 11:48:02 +00:00
Thomas Hartmann
bec41a7a55 QmlDesigner: Remove dependency of ModelNode on AbstractView
* Moved AbstractView::hasId() and AbstractView::generateNewId
  to Model. I kept a convenience function AbstractView::hasId(),
  so we do not have to change too much code.
* hasId() and generateNewId() do not mutate the model and therefore
  belong to the model.
* This also allows to remove the dependency on AbstractView in ModelNode
* Adjusting the usage of generateNewId() throughout the code base.

Change-Id: I0b8bab995c48fd52760b509cbe53f0854230b4c8
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2022-03-11 09:45:43 +00:00
Oswald Buddenhagen
413c73b781 fix build without QmlPrivate
Change-Id: Ibc333a07137b7afb39676d4d3bc89d0c4dadb11d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-03-11 09:15:10 +00:00
Eike Ziller
cd8c4ced81 Merge remote-tracking branch 'origin/7.0'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri

Change-Id: Ic02df53b880d0861d9d9ea0df3e0d381ae99f350
2022-03-11 09:50:48 +01:00
Thomas Hartmann
18e57ba886 QmlDesigner: Count QDS startup and shutdown using telemetry
This allows tracking the number of supposed crashes.

Change-Id: I87e1c084238c5b3d556e22d25bddf8e58cdfb838
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-03-10 19:07:27 +00:00
Thomas Hartmann
22f65bfa07 QmlDesigner: Always enable timeline
Change-Id: I76aac4a0564c890a86416aef8fe20e87c269d372
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-03-10 19:06:50 +00:00
Christian Stenger
2a72daa0ef Add disclaim tool to qbs build
Change-Id: I998b7fd9f017b9b33b422c8149048437ebb3a5a2
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-03-10 16:04:31 +00:00
Thomas Hartmann
84f86c677f QmlDesigner: Move initialization to delayedInitiliaze()
In extensionsInitialized not all views are registered.

Change-Id: I8b7da87af4fceb5aed63c15ad43b6b67b7ca97c0
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-03-10 15:32:02 +00:00
hjk
e1ebbbf480 Core: Drop unneeded include of porting.h
Change-Id: I7b2e8e31df668ce228562eb24d6ba06f14462953
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-03-10 12:59:59 +00:00
hjk
e5e740344d CMake: Be more graceful for device related bits
Also when reading settings. Check was there for writing already,
and possibly should not exist at all, other kit settings are not
purging at that stage.

Change-Id: Ia052efd5a791f4a86be3d26a61ebeb94d506b012
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-03-10 12:59:50 +00:00
hjk
51d00709a5 Utils: Drop [Qt::]SkipEmptyParts from porting.h
Not needed anymore after 7c942cfd18.

Change-Id: I5e6021cb64a399fa3bc3067b2fcd60ab48587daa
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-03-10 12:59:39 +00:00
hjk
95510a842e CMake: Drop two use of HostOsInfo::isXXXHost
More friendly to docker.

Change-Id: I3eeb859cc880fa24c2b1c74caf5a06ec4f27cb2f
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-03-10 12:18:43 +00:00
Christian Stenger
17acd5b225 McuSupport: Fix build with Qt5.15
Amends a49c029056.

Change-Id: Id54c92e8f3515887b8c10d923674a6f932df2898
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-03-10 12:01:53 +00:00
Christian Stenger
9ec7e2bbb0 PE: Raise minimum level of logging category
Change-Id: I3dbdfeb35a616498cec1377b702131e0e80cec67
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-03-10 11:43:40 +00:00
David Schulz
b8caa4f26b Remove UWP support
The UWP support in Qt was removed with Qt 6 and the support in Qt
Creator is basically untested.

Change-Id: I3148efdb596ddd326f590c14c22cc77ded2582a7
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-03-10 11:29:02 +00:00
Christiaan Janssen
75dd1c2251 McuSupport: fix issue with resolving relative paths
FilePath::resolvePath accepts a FilePath param, but treats
leading hashes as indication of an absolute path.
FilePath::pathAppended only accepts QString,
but understands that the param is always a relative path.
In our case we always want to treat the paths as relative.

Change-Id: Ib23c27e76500de8a89d9dd22cd7efb95a9bd4d6d
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-03-10 09:23:55 +00:00
Piotr Mućko
a49c029056 McuSupport: settings unit tests
Change-Id: I0fe1b8f9523f952e14a23c7ffa9ef7d3b6ff6ddf
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-03-10 08:44:20 +00:00
Piotr Mućko
9697e3407f McuSupport: extract target factory
Change-Id: I1ba16ecdc15bdad970b522bea8787b316e19ae58
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-03-10 08:43:59 +00:00
Miikka Heikkinen
ccca8ccd1b QmlDesigner: Fix crumblebar recursion
If a file that already exist in crumblebar is pushed into crumblebar,
pop the bar until the first instance of the specified file is on
the top of the bar and skip the push.

Fixes: QDS-6307
Change-Id: I75f7d575db3fc6bb5b629ea1e6b61ea2905726b4
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
2022-03-10 08:42:52 +00:00
Miikka Heikkinen
23487939bf QmlDesigner: Blacklist sprite and spriteSequence as valid ids
QDS can't handle binding a node with same id as the property name,
so "sprite" and "spriteSequence" are no longer considered a valid ids,
as they are property names in SpriteParticle3D.

Fixes: QDS-6178
Change-Id: I21d3af4787015f7a35e1388b381508cf0850589d
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-03-10 08:42:16 +00:00
Jarek Kobus
82108e949a ProcessInterface: Rename interruptProcess() -> interrupt()
Both functionalities meant to do the same.

Change-Id: Idd9373cdb24b7b41f9e4befb09326c339263eeb1
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-03-10 08:41:05 +00:00
Christian Stenger
1e8b81da96 SdkTool: Fix build with Qt5.15
Avoid ambiguity of operator=.

Change-Id: Ifb67693919e02ab468e780198240af65df774ca6
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-03-10 06:17:01 +00:00
Rafael Roquetto
b2920fb76a QNX: Fix debugger detection
The QNX gdb binary requires the QNX_TARGET env variable to be set even
for codepaths that do not make use of it, namely, when invoking gdb with
the --version or --configuration parameters to detect the ABI. Failure
to set this variable causes gdb to fail with "QNX environment not set!"
instead.

This patch works around that by setting a phony QNX_TARGET variable in
these occasions.

Change-Id: I9f2638c422eb56516b87dde049186579d238de5c
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: James McDonnell <jmcdonnell@blackberry.com>
(cherry picked from commit 88aec12075)
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-03-09 22:38:34 +00:00
Robert Löhning
7c942cfd18 Remove outdated code
Change-Id: I65e0ed79dabd987bc67d4082969835d52dd7cb8b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-03-09 18:53:36 +00:00
Leena Miettinen
34ecdc3008 UI text: Replace "pane" with "view" for "Output panes"
Some occurrences of [Output] pane were still found in
translatable strings.

Change-Id: I70c0b6562790b7eb835b2f6a1522fa34fb9c2b51
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-03-09 15:31:05 +00:00