Commit Graph

1298 Commits

Author SHA1 Message Date
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
David Schulz
59a77a4965 TextEditor: add text cursor to assist interface
This will allow us to request assistance for a specific selection
instead of just the position.

Change-Id: Ib8e5b32d4a8f2936e5a6f1b7ac968d7f1d8d9de6
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-05-13 09:18:53 +00:00
Fawzi Mohamed
82b2878fac qmljseditor: preserve state when reformatting
Only editing position was preserved (and incorrect column) when
reformatting qml, preserve also scoll position (and correct column
position).

Fixes: QTCREATORBUG-25507
Change-Id: Ieaec2c5390e437f32b4b97b2bbb47975895f96d8
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2022-05-12 15:20:08 +00:00
Cristian Adam
88781a003f CMake: Qt Creator Static build support
This adds the build system feature that allows Qt Creator's libraries
and plugins to be compiled statically.

Fixes some symbol clashes when all plugins are linked into the same
executable.

Support for actually loading static plugins will be added in a separate
commit.

The feature is controlled by QTC_STATIC_BUILD which by default is OFF.

Change-Id: I1fab7953c43e42dc75619e35660029ee067106df
Reviewed-by: hjk <hjk@qt.io>
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-04-29 07:16:53 +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
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
David Schulz
519804a0d2 QmlJSEditor: prevent possible crash on font settings change
Fixes: QTCREATORBUG-27116
Change-Id: Iac38bd4ef20e739da4c4b8b1c072fd2cd648a66a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-03-17 13:55:10 +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
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
Eike Ziller
3749cfc896 InfoBar: Make adding more buttons possible
Change-Id: Ic0c946cf3f87fe46cd06391f38e0bc71374ad340
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-01-18 09:33:20 +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
Alessandro Portale
2000491108 QmlJsEditor: Delay the call of registerIconOverlayForMimeType
Calling FileIconProvider::registerIconOverlayForMimeType during plugin
construction caused the warning:

Accessing MimeDatabase for application/x-qt.ui+qml before plugins are
initialized

Better register it in extensionsInitialized.

Amends: 613a9a13c8

Change-Id: I08ebcad461019464dec04954aa8b436d96f503cc
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-12-14 10:05:53 +00:00
Alessandro Portale
613a9a13c8 QmlJsEditor: Use the "Design" file icon overlay for .ui.qml files
Change-Id: I4f324c7a839b6f58cdee028dd9c147384a56a3dd
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-12-13 08:35:11 +00:00
hjk
104ea4accc Make some qHash and comparison operators overloads hidden friends
Restricts lookup scope more to necessary bits.

Change-Id: Ia42c95aaa70534843b7f6a90bfc56d2a1202c612
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-12-06 17:10:49 +00:00
David Schulz
bfe6c46f9f QmlJSEditor: block non Utf8 codecs
Additionally adjust the postioning of the initial setCodec to all other
forced codecs.

Change-Id: Id60bfdac858851e5ad6554ff2dbcb3dd5b806c0b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-11-09 05:14:02 +00:00
Eike Ziller
7bb21fcfff Merge remote-tracking branch 'origin/5.0' into 6.0
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri

Change-Id: I87b19a51b1950d19eff95086848b0728ba2f0ebd
2021-10-08 15:58:02 +02:00
Tim Jenssen
7d5c9be52b qmljseditor: fix crash at shutdown
Change-Id: Ifae7ec5f378c0b2d3e667bd26a509fbcbefadecf
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2021-10-06 14:48:02 +00:00
hjk
81acd0c62a Utils: Remove uses of deprecated PathChooser::path()
There's filePath() nowadays.

Change-Id: Ief06bd07a69a287d6a5ca3c41eb7069dba869d52
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-09-28 06:39:02 +00:00
David Schulz
4324f3e8c1 Editor: pass AssistInterface to createProcessor
The interface can be used for checking the context of a codeassist
request to determine
the correct processor that has to be created.

Change-Id: I47ddb05c46399566e27bae21711f11a3a4132c3f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-09-16 08:25:36 +00:00
Eike Ziller
8e51295959 Merge remote-tracking branch 'origin/5.0'
Conflicts:
	src/libs/utils/processreaper.cpp
	src/plugins/clangcodemodel/clangmodelmanagersupport.cpp
	src/plugins/cmakeprojectmanager/cmakeprocess.cpp

Change-Id: Ie248bcb02a80f3e02ab19d73033ce2ba31e7fd83
2021-09-07 11:05:40 +02:00
Thomas Hartmann
d7994871b6 QmlJS: Prepend "My" to default component name
Task-number: QDS-3313
Change-Id: I1bd9944a63333d38c9fd77801ef63d7d55787878
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-09-03 08:31:26 +00:00
Jarek Kobus
cd3f82f247 Pass QFutureInterface by reference
No need for a copy.

Change-Id: I0308da77199942ef49e36fb04e81713cb9d9a901
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-08-30 12:06:12 +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 Kandeler
6530a4fdc7 Fix some compiler warnings
Change-Id: I4eaf47bda086b83618f461ab19d1715c67e27ae1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-09 11:52:07 +00:00
hjk
ff57cb548d Vcs: Use more FilePath for file paths
Change-Id: I855cde65d034a9647972a7fddf1e8266d7ccfa88
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-08-02 14:40:33 +00:00
hjk
5731965045 Utils: Use FilePath in DropSupport
Change-Id: Id048d0dab4c58be367a081bb8041214abd6dbf98
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-02 06:59:53 +00:00
hjk
edcedabed9 Vcs: Use FilePath in IVersionControl API
Adapt first level of users.

Change-Id: Ifcd7bff45631ff3b9e26a9e3176daa6cf0cf2e56
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-07-29 13:20:23 +00:00
hjk
1bde4ddbec ProjectExplorer: Use FilePaths in project tree nodes
Change-Id: I31b15c428d9b962333947b1e32641fd80f61d069
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-16 13:45:06 +00:00
Leena Miettinen
50f9180cd2 QML/JS Editor: Fix UI text
Task-number: QTCREATORBUG-25915
Change-Id: I96da82dee989cc1833e1219f33cbee072df19f83
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2021-07-08 08:00:33 +00:00
David Schulz
b6367b6359 Core: use FilePaths to notify files changed internally
Change-Id: I2fce65ad340f18292fc0286233e78aaf769a130d
Reviewed-by: hjk <hjk@qt.io>
2021-06-23 12:03:10 +00:00
Kai Köhne
bf04c98c1c Do not pass QStringView by const reference
That's what the documentation says:

  https://doc.qt.io/qt-6/qstringview.html#details

Change-Id: I0b41fc4abad1601c0ed416a505534cf7ae7633e1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-06-17 09:54:42 +00:00
David Schulz
79b9a2fea6 TextEditor: filepathify RefactoringChanges
Change-Id: Ie97e484bcdeaa0cb2f5d04b3c79ace55ff2e426c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-08 11:40:10 +00:00
David Schulz
356bfcc9fd Utils: filepathify Link
Change-Id: Ie62500bde139158e776f9698ee0ea00c2a113f93
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-05-25 17:32:18 +00:00
Jarek Kobus
91f136ef3a Use Utils::FutureSynchronizer instead of QFutureSynchronizer
Change-Id: Iecfa676f58e5ca82be7c9c94233dcc8d3654c2d7
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-05-12 22:08:02 +00:00
Jarek Kobus
492f13578e Fix a possible crash in FindReferences on shutdown
Cancel and wait for all threads started by FindReferences
in its destructor.

Task-number: QTCREATORBUG-25711
Change-Id: I83c3ea832a173a7fff5c52e0c0136dfff2234afe
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-05-12 11:12:45 +00:00
Eike Ziller
1c8395fca9 Fix build with Qt 6
Amends 1e26327472

Change-Id: Ibbd1a71e46f6b4ea6feb81983a2bc9a49661cc3d
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-05-12 10:24:53 +00:00
Jarek Kobus
2007aceab0 Make SemanticHighlighter::run() cancelable
In case the task needs to be canceled, stop doing its job
and return as soon as possible.

Change-Id: Id5a3462d9f0a19eda782aebdd4c25407318118db
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-05-11 10:03:34 +00:00
Jarek Kobus
1e26327472 Synchronize all started threads in SemanticHighlighter d'tor
This fixes a possible crash on session switch or on shutdown.

Task-number: QTCREATORBUG-25708
Change-Id: I5dcc2420dca27b9856f47616c6f465ae8f059942
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-05-11 10:03:16 +00:00
hjk
8e352af0ec Core: Add a default parameter to various ICore::*path functions
Saves some code on the user side.

Change-Id: I32cd220b6e533f5497a1865f9c34ab9db4cfda79
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-04-27 06:52:05 +00:00
Eike Ziller
c1f90aeca2 ICore: Change some path API to use FilePath
Change-Id: Id841d6177206a021c9e606ce560b47d1ae6e52b9
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2021-04-26 08:03:47 +00:00
Leena Miettinen
a497c13774 QDS Components: Replace "item" with "component" in UI text
Task-number: QDS-3778
Change-Id: I67cfaad948fe9a43b2312cdb5e248d0849b7c6d9
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-03-19 08:43:13 +00:00
Eike Ziller
261967a5f4 Fix search result font for symbol searches
SearchResultItem defaults to the standard application font,
we need to tell it to use the text editor font explicitly,
like the specialized addResult method did that was removed.

Amends d3deefc3a4

Fixes: QTCREATORBUG-25396
Change-Id: Id8d41d93c96fbfd6d993568a37d42509da452665
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-03-02 11:13:52 +00:00
Christian Kandeler
d3deefc3a4 Core: Streamline SearchResultWindow interface
That is, make SearchResultItem the one data type for adding search
results.
This will allow us to add additional properties to search results
without adding more and more parameters to a bunch of functions.

Change-Id: Ic2740477ae47449cee75caa2525727fe2b460f91
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-02-18 16:46:08 +00:00
Jarek Kobus
d74edd2806 Remove unused includes of mutex classes
Change-Id: I5a34cda0b27786cb37e642479b11fbd24b8b5c36
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-02-18 07:02:07 +00:00
Tim Jenssen
b801a9339d Merge remote-tracking branch 'origin/4.14'
Change-Id: I70504e096be620434f38cd990c593950da8b24ba
2021-01-07 14:23:46 +00:00
Christian Stenger
e7a65dd3c9 QmlJSEditor: Ensure extra selections are ordered
The code model may provide selections that are not ordered
as they appear inside the document due to the declarative
nature of QML.
Ordering before using them avoids couple of warnings stating
"overlay selections not in order".

Change-Id: Ie912e94aa01ffde52b01dca7a9bde24ae02e8b33
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>
2021-01-07 11:07:45 +00:00
Alessandro Portale
a3857a996a Don't access static functions/fields via instance
Courtesy of readability-static-accessed-through-instance

Amends: b2a766a79a

Round #2: This time done with Qt Creator's Analyzer, which
found other occurences than run-clang-tidy.py

Change-Id: I479e280c7abcf2d24baccbb0af69ae4bda05198e
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2020-11-27 13:26:07 +00:00
Eike Ziller
5ca70bdcb3 Merge remote-tracking branch 'origin/4.14'
Change-Id: Iea84f23cf394de13e99a9ed777c8c113e4eff473
2020-11-19 15:38:13 +01:00
Alessandro Portale
b2a766a79a Don't access static functions/fields via instance
Courtesy of readability-static-accessed-through-instance

Change-Id: I71f54244f1e091315dac2943d9e1bfad6efa56a9
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2020-11-19 08:42:14 +00:00
Jarek Kobus
d2e1feceac Don't clash signal names with other methods
In case when signal name clashes with other method name -
rename accordingly.
Remove some repeated signal declarations - they are already
declared in superclass.

Change-Id: Ie1430b85d6436d26996494fa44c7554fb354b6ce
Reviewed-by: hjk <hjk@qt.io>
2020-11-18 12:20:43 +00:00