Commit Graph

1390 Commits

Author SHA1 Message Date
Eike Ziller
e2d5b6616a Merge remote-tracking branch 'origin/7.0'
Change-Id: I01ce83a2da66bb65af37c0ecc92372789cb85c01
2022-04-22 10:04:39 +02:00
Christian Stenger
9656eb9e7a QmlJS: Fix more invalid M325 cases
Fixes: QTCREATORBUG-27380
Change-Id: I76d1ef3d2f2a4cc9d930a006ecb3b564efea3fbc
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>
2022-04-22 05:24:21 +00:00
Xavier BESSON
87e52ad189 Line length for QML/JS editing automatic formatting
Adding parameters to functions in the QML/JS formatter
Adding widget and setting to the QML/JS editing settings

Fixes: QTCREATORBUG-23411
Change-Id: Ib9d3ac3b22443e81cd636fbc276c6544dab1511b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>
2022-04-07 11:42:37 +00:00
Christian Kandeler
929e40a9f2 Fix some warnings
Change-Id: Idc12465aa6a3a3d158f17961f902578ca16d0d7b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-04-01 08:23:25 +00:00
Eike Ziller
780f5da7c4 Merge remote-tracking branch 'origin/7.0'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri
	src/plugins/studiowelcome/recentpresets.h
	src/plugins/studiowelcome/userpresets.h

Change-Id: Ie573b945eb28347a36ee1b3582fbd6ab0c0f866c
2022-03-28 15:10:11 +02:00
Thomas Hartmann
3b5c56bcfa QmlDesigner: Add invalid ids to QmlJSCheck
Also improving document message for exceptions.

Change-Id: I7878987ce73f5d4891ced3c702c7804b25b07eb3
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2022-03-24 11:41:53 +00:00
Fawzi Mohamed
6b270b8dc9 qmljs: correctly handle js string templates
In most cases we do want to visit the expressions in a function
template. Changing its accept0 would force those not wanting to visit
it to iterate on the templates (currently a linked list), so we add a
visit method explicitly visiting the expression in all the needed
places.

Fixes: QTCREATORBUG-21869
Change-Id: I47733544bfd32eec357810b97242608b8f7de572
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2022-03-21 09:32:29 +00:00
Jarek Kobus
8e0ae8ba96 QtcProcess: Limit the inclusion of qtcprocess.h
Move the rest of QtcProcess enums to processenums.h.
Move ExitCodeInterpreter into processenums.h.
Remove superfluous Utils:: prefix.

Change-Id: Iaa596f353d33d6930085a621b114cc15a35caa80
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-03-02 13:30:39 +00:00
Thomas Hartmann
af24e428f2 Rename 'output pane' to simply 'output'
Change-Id: If45e053a32855bca68dc71cb5da22f981146e45b
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-03-01 19:25:27 +00:00
Eike Ziller
8259df00d0 Merge remote-tracking branch 'origin/7.0'
Conflicts:
	src/plugins/mcusupport/mcupackage.cpp
	src/plugins/mcusupport/mcusupportoptions.cpp
	src/plugins/mcusupport/mcusupportoptions.h
	src/plugins/mcusupport/mcusupportoptionspage.cpp
	src/plugins/mcusupport/mcusupportplugin.cpp
	src/plugins/mcusupport/mcusupportsdk.cpp

Change-Id: Ib423e9f23877176f01b188104b0a179ed32c4770
2022-02-22 14:06:41 +01:00
Leena Miettinen
24c9340d3d QML/JS: Fix punctuation of message
Task-number: QTCREATORBUG-27055
Change-Id: Ibaa37fc49e9ae3671cc7904b63682d245c0bdd8d
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-02-18 11:07:21 +00:00
Leena Miettinen
d487110351 QML/JS: Fix terminology in messages
- Replace Qt Quick Designer with Qt Design Studio
- Replace "Qt Quick UI form" with "UI file (.ui.qml)"

Also fix the docs:

- Add missing messages
- Hide QDS  messages from Qt Creator Manual
- Make punctuation consistent
- Add some links to more information

Task-number: QDS-2670
Task-number: QTCREATORBUG-27055
Change-Id: Id90f1ad82e7297f91225bc8d650a9578ba071330
Reviewed-by: Mats Honkamaa <mats.honkamaa@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-02-18 07:33:35 +00:00
Eike Ziller
45b5341cd9 Merge remote-tracking branch 'origin/7.0'
Change-Id: Iab67dffe64bee391bd921ed8832bb17b36ec861b
2022-02-14 09:58:04 +01:00
Christian Stenger
39db18f968 QmlJS: Soften strict equality check Pt III
Adapt to differences Qt5 vs Qt6.

Fixes: QTCREATORBUG-25917
Change-Id: Ieee1cf0442016c62b82bd932dd62d0dc9a78bc26
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>
2022-02-11 15:44:22 +00:00
Eike Ziller
fcb8d3b2a4 Merge remote-tracking branch 'origin/7.0'
Conflicts:
	src/plugins/qmldesigner/components/itemlibrary/itemlibraryview.cpp

Change-Id: Icda34067bb89d066a3e7eb47f8cca1d62dc3ae0d
2022-02-11 11:20:13 +01:00
hjk
385367cfd7 QmlJS: Fix compiulation with namespaces
Amends 125d7c0cce.

Change-Id: I75f2c562aca2e3a00bb0284f39c3951664e2c956
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-10 07:10:32 +00:00
Henning Gruendl
73ae5bb1f6 QmlDesigner: Show error/warning for root reference
Show an error when an alias property references the root item directly.
Show a warning when an alias property references the root item in a
hierarchy.

Task-number: QDS-4380
Change-Id: I312fc0296e3bb2321a4d9e1113bd0cd4c1c0b8ed
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-02-07 09:25:05 +00:00
Eike Ziller
9d8a419d10 Remove qmake build files
Removes qmake as a build system for building Qt Creator itself.
Keep them for some tests that are not completely moved to CMake yet.

Change-Id: I846c6ef65626b6dfae6375fdc85d00677aa8c2fb
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-01-20 12:18:15 +00:00
Orgad Shaneh
be9922c357 QmlJS: Add a missing include
Amends 125d7c0cce.

Change-Id: Ibfd6bb7da52547f743534105bf759387b674c2c1
Reviewed-by: hjk <hjk@qt.io>
2022-01-04 07:00:14 +00:00
Maximilian Goldstein
9a28edfd87 qmljs: Scan application directories for QML libraries
We need to search application directories as well since the new
QML Module API will generate modules there.

Task-number: QTCREATORBUG-24987
Change-Id: Ie67233ffece692c62921db13c49ae8cc2184422f
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>
2021-12-16 15:34:23 +00:00
Fawzi Mohamed
125d7c0cce Updating qmljs parser to latest qtdeclarative parser
improves support for string templates, required properties,
and other smaller improvements

Task-number: QTCREATORBUG-21869
Change-Id: Ia2359e1f75d4bd7b9ea4f27a920acd2251e36108
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-12-16 08:27:55 +00:00
Eike Ziller
d422b408e0 Merge remote-tracking branch 'origin/6.0'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri

Change-Id: I32991a77e52831dd2e24cf4a51ec252998c2d743
2021-12-09 12:04:32 +01:00
Fawzi Mohamed
ce82c058df add .mjs as extension for javascript files in defaultLanguageMapping
Change-Id: I40d43193ba9b7dac38d7a474aad2d739e6c39dc6
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2021-12-06 09:16:22 +00:00
Maximilian Goldstein
708e0fc06f qmljsinterpreter: Fix directory imports not being found in selector paths
Previously qml files in selector paths would not properly locate directory imports,
now when an import in a selector path fails we try to go up to the next non-selector
directory and look for the imported directory there.

Fixes: QTCREATORBUG-25127
Change-Id: Ib9b364981b49068637aa97d6f75abf7f1f5878cc
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2021-12-03 14:48:01 +00:00
Thomas Hartmann
0e696e19fe QmlJsCheck: Allow new connection syntax in Connections
Change-Id: Ibbef3f8e8230d727d3183fa1615e0f38373a3c7f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2021-12-02 11:04:40 +00:00
Christian Kandeler
8f611286f7 Fix some compiler warnings
Change-Id: I9128afcf56bd47cb6627012bb6b0d13395b432ac
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-11-22 13:39:08 +00:00
Thomas Hartmann
39738dee77 QmlJS: Add error message for Component with multiple children
Component is only allowed to have a single child element, that will
be the root element of the component.

If there is no child at all we create a warning. Having no child is
temporarily required.

Change-Id: I5c0d9d9cdf1be106b20ed4f1134a973d58126498
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-11-12 20:04:19 +00:00
Christian Stenger
f686bce68f QmlJS: Soften strict equality check Pt II
Disable strict equality check for undefined values as there
are too many ways the code model just assumes "undefined" as
the information would be present at runtime only or to avoid
too complex evaluation.

Task-number: QTCREATORBUG-25917
Change-Id: I7c6da04f52ba767c4ef5c21078dc14ac4de86687
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-11-08 08:04:42 +00:00
hjk
17a545115b QmlJS: Proliferate FilePath use, part 3
Change-Id: I3c293a9974414b669a1af8b98afb76a4eb4fbd11
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-10-29 08:55:29 +00:00
hjk
761ce1feb1 QmlJS: Proliferate FilePath use, part 2
Change-Id: I631df6ba5e782e2db9e03de4e5df843d15c19f37
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-10-28 14:08:13 +00:00
hjk
d68bb4687c QmlJS: Proliferate FilePath and QtcProcess use in QmlJSPluginDumper
Change-Id: Ie483bb2e9b5d812d380470949564a6bc57801fa9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-10-27 07:57:13 +00:00
Orgad Shaneh
3871e40f43 Fix qHash-related size compatibility warnings by MSVC
Change-Id: I3b7981ce78b67db4b996f99682284a0b911d8cd7
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-10-20 15:03:51 +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
Miikka Heikkinen
e0611c0cfa QmlDesigner: Add support for Component type
Component type is added to Component Library and can be dragged to
the scene. Items under the component are not shown in the scene.

Fixes: QDS-5093
Change-Id: I0c80647e73124866a8b772022a761ca6cbb545a1
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-10-05 09:10:16 +00:00
Eike Ziller
31bcc0ca2c Merge remote-tracking branch 'origin/5.0' into 6.0
Change-Id: I311d1128c6a299c1db8717a12b40393055a889bb
2021-10-05 09:13:56 +02:00
Thomas Hartmann
969d659713 QmlDesigner: Allow resolvedUrl in ui.qml files
Change-Id: I220582466ffe62392b78419b9a2f6b83cf73f9af
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2021-09-30 08:41:57 +00:00
Christiaan Janssen
525039daeb QmlProject: port changes from QtForMcus
Task-number: QTCREATORBUG-26041
Change-Id: I5068381fb2c4c901d8621e0b8358db77d2cb0b21
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-09-30 06:19:46 +00:00
Eike Ziller
3d4d7c7e14 Merge remote-tracking branch 'origin/5.0'
Conflicts:
	src/plugins/clangtools/clangtoolssettings.cpp
	src/plugins/clangtools/executableinfo.cpp
	src/plugins/clangtools/executableinfo.h

Change-Id: Id8caf63e3e594792467d3447870086bd2d8f73b9
2021-09-13 17:03:55 +02:00
Christian Stenger
13be5e7eb4 QmlJS: Fix crash
Fixes: QTCREATORBUG-26151
Change-Id: Ibfc2a17f0eb8eb7c4804045dba9a1963249ba860
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>
2021-09-09 10:16:09 +00:00
Eike Ziller
95de5c93b1 QmlJS: Fix issues with getting modulePaths
This patch

- improves performance by removing the usage of QRegularExpression for
trivial string operations (this is called 3000 times after configuring
Qt Creator)

- fixes handling of version number like "2.-1" which are the result of
imports with only a major version number like "import QtQuick 2"

Task-number: QTCREATORBUG-25899
Fixes: QTCREATORBUG-26178
Fixes: QTCREATORBUG-26216
Change-Id: Ic792909513f4fe25ac72043645f297ee41890375
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2021-09-07 08:16:48 +00:00
Eike Ziller
6d44c28f0a Merge remote-tracking branch 'origin/5.0'
Conflicts:
	src/libs/utils/qtcprocess.cpp

Change-Id: I1f7419d927e8534dfdcd10db998f97a6efd4d3e4
2021-08-18 09:48:39 +02:00
Ulf Hermann
fdaa9b1c10 QmlJS: Destroy local snapshot before modifying its original
If we keep the copy of the snapshot around while it's being modified, we
trigger the copy-on-write mechanism. That is expensive, and destroying
the snapshot afterwards is also expensive.

Task-number: QTCREATORBUG-25899
Change-Id: I9b7e26baf63a4b47c85457e5657fee971a6ce132
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-08-17 08:55:31 +00:00
Eike Ziller
c7168d1063 Merge remote-tracking branch 'origin/5.0'
Conflicts:
	src/plugins/coreplugin/locator/executefilter.cpp

Change-Id: Iff5b82a9e491b782e4720138904f389d318b005c
2021-08-11 10:10:51 +02:00
Christian Stenger
af357c47fb QmlJS: Downgrade default log level
Avoid flooding logging messages by default and let the user enable
them explicitly.

Change-Id: I9f8fe044a460309e4462a5d88bd12a0ab6088731
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-08-10 07:05:02 +00:00
hjk
f46c8b5c92 Merge remote-tracking branch 'origin/5.0'
Change-Id: I9409f35cb9d1bc2e57631d2bfa3a0931ff5dd259
2021-07-21 09:18:52 +02:00
Thomas Hartmann
aba3a38a60 QmlJSCheck: Add error for mixing translation functions
Change-Id: I0f5fd2edf2d8bf13938d9e18eadada5c8c1b85f2
Reviewed-by: Tapani Mattila <tapani.mattila@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-07-20 10:36:01 +00:00
Christian Stenger
99ae8b19e6 QmlJS: Fix build with Qt5.14
Amends af88a7876b.

Change-Id: If3f45922dd822797d477ac8116b4fcbed86c746a
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-07-20 10:11:42 +00:00
Fawzi Mohamed
864c1da05b qmljs: fix order in BoundName
constructor and field order should be consistent

Change-Id: If698fd66cf67ab54c4be1638f19d758a54e33d5f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-07-20 10:10:40 +00:00
Fawzi Mohamed
2f13810633 qmljs: update gen-parser.sh and related patches
ensure that the script works with the current source
* update manual patches
* use reverse patches to simplify updating procedure
* describe updating procedure

Change-Id: I23f8ee5bd73506df03b8b6b75e535170dff5f2b5
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2021-07-20 09:02:25 +00:00