Commit Graph

74059 Commits

Author SHA1 Message Date
hjk
8938864876 FakeVim: Use setEnabler for the vimrc path aspect
This fixes the enabling/disabling of the line edit and triggers the
(re-)read of the .vimrc at the right times.

Change-Id: I13a022aafc23ea761d3c1c4d0359cc5f137695d5
Reviewed-by: Lukas Holecek <hluk@email.cz>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-10-15 06:22:25 +00:00
Orgad Shaneh
5365dd531b Fix some MSVC warnings
* Implicit conversion of size_t to int
* Comparing bool with operator >

Change-Id: I4bc5bef57bfa0125b1c82953a7a2cfc24066bc8c
Reviewed-by: hjk <hjk@qt.io>
2021-10-15 06:22:23 +00:00
Christian Stenger
e1a15b2db5 QmlJS: Soften strict equality check
Judging on the sense of a strict equality check depends on
different aspects. As attached properties cannot be inspected
easily and e.g. function calls cannot be evaluated as they may
have different return values for different code paths we need
to soften the check to avoid false positives.

Fixes: QTCREATORBUG-25917
Change-Id: I121335a387eb235090346162df4703d3000b7426
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-10-15 05:18:23 +00:00
Christian Kandeler
57fccec1d7 ProjectExplorer: Do not run the build output parser test from a thread
Tasks must only be created in the main thread.

Change-Id: I7d0e6f850bec3eb1d700ffa8fdba0c2e253d47aa
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2021-10-14 15:46:57 +00:00
Orgad Shaneh
a19da3af74 ElfReader: Fix running locally
Amends commit 736820a1a0.

Change-Id: Id0a8aa9b0939e53f6eafc7b9f0e1cb821883e90a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-10-14 13:27:24 +00:00
Alessandro Portale
c099f622bb Core: Allow dialogs and popups be styled as "panelwidgets"
A recent change that prevented popups from being styled as "panelwidget"
unintentionally removed the styling from the upper part of the mini
target chooser.

This change re-allows styling contents of popups (and dialogs) if they
have the "panelwidget" property set to true.

Amends: 0786e967dd

Fixes: QTCREATORBUG-26403
Change-Id: Ib85b06d0a2823a5caf736d1354cf025a6ddd475c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-10-14 13:13:54 +00:00
Samuel Ghinet
df8b62c6fa Add new theme colors necessary for New Project Dialog on QDS
We need colors for the dialog box background, and for warning text messages.

Note: We currently don't have carefully picked colors for warning, so I used
standard yellow (ffff00). The values, for each theme, will need to be adjusted
later on.

Task-number: QDS-4490
Change-Id: I257522216b03610d9f12951e7cb6f7cfa182489f
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-10-14 12:32:29 +00:00
Eike Ziller
0543a810e5 Bump version to 6.0.0-beta2
Change-Id: If15ba5f3b6484a7b649baac5bd0eb25147cc10db
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-14 10:04:12 +00:00
Christian Kandeler
d9dd3612da ClangCodeModel: Fix QStringView crashes
Some AST nodes have no range, triggering crashes in QStringView::mid().
Rather than checking all callers, we just use a safe variant.

Change-Id: I3c8d388693f9161249f201ecd4e8bad933463960
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-14 09:39:08 +00:00
David Schulz
6bf7521a89 CppEditor: check result line before finding block
Task-number: QTCREATORBUG-26396
Change-Id: Iccd6df3495336ff550da6f1fd1f9c17c588a80e3
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-10-14 09:17:05 +00:00
Christian Kandeler
c92deea33f ClangCodeModel: Provide source of diagnostics in tooltip
It's helpful to know whether a particular issue came from clangd,
libclang, or somewhere else.

Change-Id: I9e00d79ffe630a91028c2aeff219571e9979dbee
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-14 08:26:36 +00:00
Marco Bubke
1b16eb209c QmlDesigner: Add QmlDocumentParser and QmlTypesParser
Task-number: QDS-5174
Task-number: QDS-5228
Change-Id: I0889e8d63b0260aeb0efae1b3c8a373c18ea1f03
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-10-14 07:40:49 +00:00
Aleksei German
cbf96341a1 QmlDesigner: Fix for BindingEditor warning
Change-Id: I98fc27392e882e86221ca253ee35b2099dff8d52
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-10-14 07:19:58 +00:00
Alessandro Portale
84ee9289a0 ProjectExplorer: Handle file names from command line as user input
Change-Id: I5787e118b34d487059e9eb2f4fe6a0e05bfd3807
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-10-14 07:11:01 +00:00
Tuomo Pelkonen
b996bae04d QmlProject: Add support for primaryLanguage
Task-number: QDS-5187
Change-Id: I05aafa726fd6c2b586d57b64239cf08c1f2342ab
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-10-14 04:57:22 +00:00
David Schulz
631b7f2815 Editor: Fix crash when select last snippet
The first variable index might not be zero.

Fixes: QTCREATORBUG-26406
Change-Id: I54a9575da61d770ba82f3ddb9b1e8b0128ae51dd
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-10-14 04:14:38 +00:00
Kaj Grönholm
d8a7c97fcb Use global picking API
When gobal picking is available (Qt 6.2+), use that instead of toggling
models pickable properties.

Task-number: QDS-4978
Change-Id: Id2a501ae97955128874447fa8a3b8afab3d1f2c7
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-10-14 04:08:33 +00:00
Orgad Shaneh
d76c9bec06 Perforce: Update document permissions after p4 edit
Task-number: QTCREATORBUG-22447
Change-Id: I9d521c17409e082b66141ba607fc0256d78798b7
Reviewed-by: hjk <hjk@qt.io>
2021-10-13 17:39:02 +00:00
Samuel Ghinet
8aa68fb8e4 Make use of font icons for the wizards
Qt Design Studio will be using font icons to display project types (wizards) in
the New Project dialog box, rather than .png icons. The unicode values will be
saved in the wizard.json files as "fontIconCode". We need a way to access that
value in code.

Task-number: QDS-4490
Change-Id: I5dbcc522a707c288ee1f05ab6ec1cb24bcd75025
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-10-13 15:21:51 +00:00
Assam Boudjelthia
336cee445e Android: Remove unnecessary parameters in AndroidConfigurations
No need to manually provide a parameter to adbToolPath inside
AndroidConfigurations itself, functions that needs it can just
get it directly.

Change-Id: Ie319e82e4ea3b7e3ad6588284168f6116bef2686
Reviewed-by: hjk <hjk@qt.io>
2021-10-13 14:59:03 +00:00
Assam Boudjelthia
6e4d829a40 Android: handle return correct serialNumber for a running avd
AVDs don't get a serial number until they are started, and avdmanager
don't make it easy to get their serial either, so we need to check
the running devices with adb "emu avd name" command and compare.

Change-Id: I3253d25a3461a36eb9918b3c796062bf9e82e0c6
Reviewed-by: hjk <hjk@qt.io>
2021-10-13 14:58:27 +00:00
Assam Boudjelthia
3619223cbe Move SDK Manager instal/uninstall checkbox to left of package name
This will makes it much easier selecting packages for install/uninstall
operations, and makes more space for the package name by removing the
operation column, as well as making changes more apparent by marking
pending changes in bold font.

Change-Id: Iec86c384195dd8c51fd8f00c1de56cdbb2bab62a
Reviewed-by: hjk <hjk@qt.io>
2021-10-13 14:56:49 +00:00
Assam Boudjelthia
78da7e2922 Move sdkmanager's sdk level parsing to AndroidConfig
Both the sdkmanger and avdmanager (maybe more) need to parse the sdk
level for packages and devices which may contain letters, make them
use the same logic.

Change-Id: Iff7fef3a66e00fac11b833f73f2f334a4cf1a766
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-10-13 14:56:06 +00:00
hjk
e1a69fccb1 FakeVim: Only drop full-line comments
This is not what real vim does, but :help comments looks scary,
we don't support more complex scripts anyway, and full-line
comments at least allow some commenting.

Fixes: QTCREATORBUG-26254
Change-Id: I9018d06d2a929fad6d3d301240928b6a8b109710
Reviewed-by: Lukas Holecek <hluk@email.cz>
Reviewed-by: hjk <hjk@qt.io>
2021-10-13 14:39:04 +00:00
Christian Kandeler
6dd66e012b CppEditor: Fix possible crash in CompleteSwitchCaseStatement
There can be an unexpected null pointer if the built-in code model fails
to parse the code properly.

Fixes: QTCREATORBUG-26316
Change-Id: I5751be505b1182df17f58e1a174d645cef1e95cf
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-10-13 14:05:37 +00:00
Christian Kandeler
38b97b404a Fix various compiler warnings
Change-Id: I59db57e8501bbd0d0293ccce1b520df8acc07413
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-10-13 13:56:11 +00:00
Thomas Hartmann
ea8400a9ff StudioWelcome: Do not use TitilliumWeb as system font
Task-number: QDS-1081
Change-Id: I6c78fc0a95163f72168a29373a8e190d4bdf3167
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-10-13 09:38:26 +00:00
David Schulz
6e6753a064 Docker: use mapped working directory for remote processes
Change-Id: Ibbc89f963ca42510cf072b242a5cdfdc0d4c23ff
Reviewed-by: hjk <hjk@qt.io>
2021-10-13 09:35:57 +00:00
Thomas Hartmann
8b45f1f6c5 QmlDesigner: Only create components as primitives if actually possible
The type might not actually be exported and imported as a folder import.

Change-Id: I0ada27d619727044c2f8b8a601a2632a44c5a7cb
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-10-13 09:35:55 +00:00
David Schulz
7e9f955a58 Docker: Use only path part of FilePath when mapping to device
Otherwise neither normalizedPathName nor startsWithDriveLetter works as
intended when used with a non local path, but these are required to take
the correct code path in FilePath::mapToDevicePath.

Change-Id: I25e8f1a6a01a3e4056633ff3afec883cfbeb0e46
Reviewed-by: hjk <hjk@qt.io>
2021-10-13 09:35:51 +00:00
hjk
ba7aa5ea9c Docker: Also add Qt Quick stuff to test image
Had to tweak things a bit, and the QML part doesn't start up yet:

Starting docker://e5813ba3db76/data/dev/sessions/docker-quick-cmake/docker-quick-cmake...
QML debugging is enabled. Only use this in a safe environment.
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-'
QQmlApplicationEngine failed to load component
qrc:/main.qml:2 module "QtQuick.Window" is not installed
qrc:/main.qml:1 module "QtQuick" is not installed
qrc:/main.qml:2 module "QtQuick.Window" is not installed
qrc:/main.qml:1 module "QtQuick" is not installed

Change-Id: If7ec4aebee27880e01af6184ae22509e97054137
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-13 08:47:26 +00:00
hjk
11fc62e9b1 EditorManager: Avoid one use of FilePath::toFileInfo()
Change-Id: Id6312657298d29eab2f487213d296c0d5ffe2f9a
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-13 08:37:01 +00:00
Orgad Shaneh
a9ef0a8af8 ClearCase: Minor cleanup
Replace iteration over all documents with a faster lookup.

Change-Id: Iccc20ff2e5a44eef9d0bc925e25ef5c7ebaa98e9
Reviewed-by: hjk <hjk@qt.io>
2021-10-13 08:08:01 +00:00
hjk
f58663ce1c CMake: Use FilePath::mapToDevicePath for construction cmake line
Change-Id: I178803f39b5fa7707c1e4338ff02b9de18b22858
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-13 08:07:59 +00:00
David Schulz
0bfbdf5e7c ScxmlEditor: block non Utf8 codecs
Change-Id: I7d44dc0ddb17ab543e9e578d4480a090cc6835f1
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-10-13 06:52:59 +00:00
David Schulz
67037b1ca8 Designer: block non Utf8 codecs for FormWindowFile
Fixes: QTCREATORBUG-26028
Change-Id: Ia10804fef127f6caa9f9bd50ab3ff9946499e3c6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-10-13 06:52:51 +00:00
David Schulz
cb5325f6d5 Core: introduce codec support check for text documents
So indiviual documents can block codecs they do not support like ui or
qml files.

Change-Id: I65b605762c696d38be9049f0064fd68aad0193da
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-10-13 06:52:46 +00:00
David Schulz
1a0c937485 VCS: use context menu actions of TextEditor in VcsBaseEditor
Change-Id: I1947190ad0147d15cd4e95c5dff102b795a78bfc
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-10-13 06:30:38 +00:00
David Schulz
9ea3d61aaa VCS: update the text cursor of VcsBaseEditorWidget
TextEditorWidget::slotCursorPositionChanged makes sure that the multi
text cursor in the TextEditorWidget reflects all changes of the
QPlainTextEdit cursor.

Fixes: QTCREATORBUG-26360
Change-Id: I43d612c6f85fedbf45179898e044b516a93a3ed8
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-10-13 06:30:34 +00:00
Alessandro Portale
6703162783 Debugger: Add commandline to "Unable to determine gdb target ABI" warning
Helps finding out which gdb doesn't want to tell.

Change-Id: Iab374f577ee133a3bad576dd425cad5c91391f41
Reviewed-by: hjk <hjk@qt.io>
v6.0.0-beta1
2021-10-12 13:02:20 +00:00
hjk
d20a0c8c03 QmlDesigner: Add #include <QTextStream>
Amends d1b62588c5.

Change-Id: I10a6fe427087e60dd29b18488e15519a88fd77df
Reviewed-by: hjk <hjk@qt.io>
2021-10-12 11:34:14 +00:00
hjk
d75005fbd2 Docker: Use mapToDevicePath() in startContainer()
Change-Id: Iad91144413a176bee036e03192713f5bf4695dcb
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-12 11:24:38 +00:00
hjk
34b42a4772 Utils: Introduce FilePath::mapTo{Device,Global}Path
Re-directing via IDevice::mapTo{Device,Global}Path

Change-Id: Ica957839479967790bbd93e90eced66aa0b122a8
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-12 11:24:29 +00:00
Assam Boudjelthia
f49fbe7f58 Android: set the deploy step widget to expanded by default
The deploy step widget most useful aspect is the uninstall before
deploy checkbox, and having it expanded by default would improve the
UX a bit by avoiding one extra mouse click.

Change-Id: I23ebc90daf9290d229d93dca1b9b25629902e3f2
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-10-12 10:59:13 +00:00
Assam Boudjelthia
9ccf355abe Android: put "am start" extra args at the end of the arguments list
Add "am start" extra arguments after all the params used by Creator's
deployment process are added. This in turn help tackle two issues:
1) Allowing users to use [-n] to start a different Activity than the
default one.
2) Won't fail deployment silently is a param is a non supported arg,
where adb would try to start an app but the return code is 0 even if
the that app is not found.

Then, we don't need the warning aspect anymore because after this
change, we would rely on "adb am start" to report an exception, but
the app would start anyway if the case 2 above occurs.

Change-Id: Ie609b748e76a068c66c8a9be1d08ccc050167ad1
Reviewed-by: hjk <hjk@qt.io>
2021-10-12 10:57:43 +00:00
hjk
2292e3a7a6 ProjectExplorer: Always set a RunControl's macro expander
In some cases (e.g. "Attach to running application") there is no
proper RunConfiguration, so fall back to Target or Kit.

Amends e78f456083

Change-Id: I0093d5f573fc259fd2a72bbc1aaa22dcb8adbaee
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-12 10:51:12 +00:00
Aleksei German
3ccf269f81 QmlDesigner: Fix for Binding Editor
- Makes Binding Editor modal
 - Fixes Binding Editors hotkeys and actions
 - Adds Target item, property and expected type into title

Task-numbers: QDS-2819, QDS-4878
Change-Id: Ib5c5f73e6552f58828776043f9b793a24c48a1f8
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-10-12 08:09:19 +00:00
Christian Stenger
2cc28dea65 Debugger: Fix compile
Amends b6d3e67270.

Change-Id: I0acf8a7bb447e99f7bccfc8f5055a49163727619
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2021-10-12 07:22:09 +00:00
hjk
786dbcb9e8 Debugger: Force English debugger output
So that ptrace output can be recognized.

Fixes: QTCREATORBUG-26384
Change-Id: Ibd9456963a5379c333782287754bf9aed4235dc4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-10-12 06:55:41 +00:00
Christian Stenger
46a0abef2e PE: Fix compile with Qt 5.14
Amends 05fa3b06e5.

Change-Id: I26eff2c7f096b0beb77a87486bcae8faa2c137ca
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-10-12 06:52:02 +00:00