Commit Graph

24 Commits

Author SHA1 Message Date
Christian Stenger
c377794c35 QmlJSEditor: Change way of writing settings for static analyzer
Instead of writing out a binary blob use a string list when
reading or writing the settings.
The setting is introduced with QC11 the first time, so this
should not harm too much - therefore no transition of old
settings have been added.

Change-Id: Ica4654f49b71478cb07434dff9d42fd9562be87b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-06-12 07:05:12 +00:00
Christian Stenger
6e2e7a63e6 QmlJS: Allow reset of the customized analyzer
Provide a context menu to reset the enabled and disabled
messages of the static analyzer to the internal default.

Change-Id: I98bde71899ad4de50d0e170bf0d2892b87989ceb
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2023-05-04 11:03:29 +00:00
Christian Stenger
427640063e QmlJS: Allow disabling static analyzer messages
Provide settings to define a customized set of enabled
static analyzer messages.

Fixes: QTCREATORBUG-29095
Change-Id: Id629e383dd9e3beeef98026759ac66716dc43d23
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2023-05-04 10:49:07 +00:00
hjk
70b02d23e1 LayoutBuilder: Rework
Everying is a LayoutItem now, and everything is split into
a proper setup and execution phase.

Execution happens only via LayoutBuilder (directly or via
convenience wrappers in LayoutItem).

No direct access to the widget in creation, funnel out is
via the new bindTo() facility.

Change-Id: I7eb38fd736ae57a68f9a72a6add5c767da82b49f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-05-03 13:44:02 +00:00
hjk
8cf500c5bc Utils: Make Layouting a top level namespace
The whole machinery is now almost only layoutbuilder.{h,cpp},
mostly independent of the rest of Utils. Idea is to finish the
separation to make it stand-alone usable also outside creator.

Change-Id: I958aa667d17ae26b21209f22412309c5307a579c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-04-25 13:31:25 +00:00
Semih Yavuz
5b220e3a49 Fix typo in method name
Change-Id: Icd8c057fa55cf1fb5d7cba7ab283237a20ab091f
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-04-05 12:49:01 +00:00
Semih Yavuz
8bf24bac3a Remove auto-format-on-file-save dependency from custom formatter widgets
We can use custom formatter not only with auto-formatting on file save,
but also tools/qmljs/reformat file action. Hence, command and arguments
lineedits of custom formatter should only be enabled/disabled by
useCustomFormatter checkbox. useCustomFormatter also should not depend
on auto-format-on-file-save checkbox's state.

Change-Id: If1a634612f38395fd846166f4cc72593f5150f91
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Xavier BESSON <developer@xavi-b.fr>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-03-24 09:31:33 +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
Kai Köhne
56baf8c058 Remove GPL-3.0+ from license identifiers
Since we also license under GPL-3.0 WITH Qt-GPL-exception-1.0,
this applies only to a hypothetical newer version of GPL, that doesn't
exist yet. If such a version emerges, we can still decide to relicense...

While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only

Change was done by running

  find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR GPL-3.0 WITH Qt-GPL-exception-1.0/LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0/g" {} \;

Change-Id: I5097e6ce8d10233993ee30d7e25120e2659eb10b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-06 11:15:13 +00:00
Xavier BESSON
3694d00dce Optionally use qmlformat for Qt Quick auto format on save
Task-number: QTCREATORBUG-28192
Task-number: QTCREATORBUG-26602
Change-Id: I22a3917e8a4de4aaf297e9d9d622bdede782c6a6
Reviewed-by: Xavier BESSON <developer@xavi-b.fr>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-11-29 08:06:34 +00:00
Fawzi Mohamed
3baf305f9b Automatic qmlls support (experimental)
Looks for qmlls (the qml language server of Qt) and if available
and set in the preferences uses it instead of the embedded code
model for the supported features.

Its usage is driven by two flags that can be set in the QtQuick > QML/JS
Editing preferences: "use qmlls" activates the use of qmlls if available;
"use latest qmlls" always uses the qmlls of the latest Qt, instead of
the one of the target (with the one used to compile QtCreator as
fallback).

To support disabling/enabling of qmlls as soon as one changes the
preferences the singleton QmllsSettingsManager can emit a signal
on changes.
It also keeps track of the latest qmlls binary known.

QmlJS::ModelmanagerInterface::ProjectInfo is also extended to keep track
of the qmlls binary.

QmlJSEditorDocument uses the ProjectInfo and QmllsSettingsManager to
decide if a LanguageClient::Client should be started for that
document.

The client uses the QmllsClient subclass to keep track of the path of
the qmlls clients and use the same qmlls process or all files that
use the same binary.

Currently qmlls <6.4.0 are not considered because they might have too
many issues.

The enabling/disabling of warnings and highlight is a bit cumbersome
because they are handled together in the semantic highlighter, but
must be handled separately depending on the qmlls capabilities.

The disabling is done at the latest moment stopping the visualization
of the embedded model warnings/highlights/suggestions.
The computation of the semantic info is not suppressed to support the
other features (find usages, semantic highlighting if active,...).
When qmlls supports more features a complete removal of the semantic
info construction could be evaluated.

Change-Id: I3487e1680841025cabba6b339fbfe820ef83f858
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-10-12 16:09:04 +00:00
Alessandro Portale
0a6523e7f1 QmlJSEditor: Convert to using Tr::tr
Change-Id: I7e6bc774cdac0ead8ef944a46db120d290419f18
Reviewed-by: hjk <hjk@qt.io>
2022-09-22 16:37:56 +00:00
Alessandro Portale
3e8f6bbf82 QmlJSEditor: inline .ui files
qmljscomponentnamedialog.ui
qmljseditingsettingspage.ui

Change-Id: I3d0410c22c4c08e58fe92cae16d1daf465b3facd
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-09-02 08:17:22 +00:00
Lucie Gérard
a7956df3ca Use SPDX license identifiers
Replace the current license disclaimer in files by
a SPDX-License-Identifier.

Task-number: QTBUG-67283
Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-08-26 12:27:18 +00:00
Leena Miettinen
14965f5792 UI text: Fix grammar errors and capitalization issues
Change-Id: Iefb1075cc0b14eb8c0e99b6c96c31a91c2b079f0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-06-28 13:54:10 +00:00
Tapani Mattila
d35b9547f8 QmlJsEditor: Change "always open with QDS" setting type to combo box
Task-number: QDS-6807
Change-Id: I7e98781ee423be25a13fac5eee84caae5b11562f
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-05-17 11:19:55 +00:00
Thomas Hartmann
8d327c1cf7 QmlProject: Add option to always open ui.qml files in qds
This patch adds an option to always open ui.qml files in
Qt Design Studio. If that option is enabled an info bar is used
to propose the option.

Change-Id: Ia80ecd87de7fcf4c5824e7a8bb806c3d4d77b935
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-01-24 16:01:19 +00:00
Aleksei German
103a602f8d QmlDesigner: Auxiliary data auto-fold
- Made TextEditorWidget::restoreState() virtual
 - Added function to fold qml Auxiliary Data
 - Extended settings page to fit the new option

Task: QDS-1667
Change-Id: Id1256fcc72a67ac822888d5fd2e23d6076349573
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-03-04 08:43:46 +00:00
hjk
4ef57eeaed QmlJsEditor: Use now-standard pattern for settings page setup
Change-Id: I6de2ef5df605a103c99c5304590d8b8b2cf3ee3e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-01-29 12:47:10 +00:00
hjk
e9d8ff21b0 Remove unused QObject parent arguments on options pages
In the new plugin setup scheme they are data members of the
plugin pimpl and never use the parent.

Change-Id: I28fe150393e8159064dcfbd113ce0320af50fd58
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-09-11 06:03:40 +00:00
Eike Ziller
e9272d848b QmlJsEditor: Avoid unneeded exports of constants
Change-Id: I332ff9a01963fe4d37dce9ecd0586d8f0fa6573c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-07-19 07:21:26 +00:00
Alessandro Portale
5242f58173 QmlJSEditor: Modernize
modernize-*

Change-Id: I4dceb82c3904069a0d9848b2af61122d9282cb36
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-12-10 18:54:57 +00:00
Eike Ziller
d1ec4c1204 Clean up options page category display name and icon set up
In cases where plugins extend an existing settings category of a plugin
that they depend on anyhow, they do not need to specify the translated
display name and icon for that category.
Some options pages were already not setting the icon, but still the
translated name, which makes even less sense.
Clean up this mess, only setting display name and icon if that is
necessary.

Change-Id: I8bc9d0c51b11d48f1d847337838704d663e70b45
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2018-04-23 11:12:26 +00:00
Michael Dönnebrink
ed6abae46d QmlJSEditor: Add option to automatically format QML/JS file on save
Change-Id: Ide1810efdef98595705daa32c83fecc2ad367a49
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
2016-11-02 19:38:38 +00:00