Commit Graph

535 Commits

Author SHA1 Message Date
Eike Ziller
502223337d Merge remote-tracking branch 'origin/7.0'
Conflicts:
	src/plugins/clangformat/clangformatconfigwidget.cpp
	src/plugins/clangformat/clangformatplugin.cpp
	src/plugins/cppeditor/cppcodestylepreferencesfactory.cpp
	src/plugins/cppeditor/cppcodestylepreferencesfactory.h
	src/plugins/nim/settings/nimcodestylepreferencesfactory.cpp
	src/plugins/nim/settings/nimcodestylepreferencesfactory.h
	src/plugins/qmljstools/qmljscodestylepreferencesfactory.cpp
	src/plugins/qmljstools/qmljscodestylepreferencesfactory.h
	src/plugins/texteditor/codestyleselectorwidget.cpp
	src/plugins/texteditor/icodestylepreferencesfactory.h

Change-Id: I20ee430a7f0085774c9df1aa5487046ba4f404c1
2022-05-10 12:13:36 +02:00
Artem Sokolovskii
bbc44cfb90 ClangFormat: Fix settings checkboxes disappearance
- Fixed settings checkboxes disappearance after open a project
- Fixed impossibility to save settings

Task-number: QTCREATORBUG-26948
Change-Id: Ia73a61bf56b99adea9ed45c9d656860b185a3d7e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-05-10 09:40:53 +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
Fawzi Mohamed
a3b1dfd34a 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: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-04-22 10:43:38 +00:00
Christian Stenger
d0e854e390 QmlJSTools: Fix compile with Qbs
Amends 87e52ad189. While at it reorder includes to
match QC style.

Change-Id: I8bbfdd4db9409a7348e7a2cbcb954972a2a2f9b4
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-04-08 04:57:00 +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
Artem Sokolovskii
059d20ed22 ClangFormat: Fix unsaving properties for global settings
- Fixed behavior "Formatting mode" combobox settings isn't
saved after pressing "Ok" button when no one project is
open. Now it works as expected, settings save after press
"Ok" button.
- Added additional applying interface for ICodeStylePreferenceFactory
which allows pass-through apply call from dialog to the editor.

Note: it doesn't work with read-only code style profiles

Change-Id: If4f0c85e3105550db4ffd9860e94b678f0d9b386
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-03-30 16:32:08 +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
Eike Ziller
f562ebf239 Mimetypes: Make implementation switchable between new and old
- configure with QTC_USE_NEW_MIMEDATABASE to switch to the new one in
  utils/mimetypes2/
- added utils/mimeutils.h header for the Qt Creator specific static
  wrappers, that also includes the "public" headers for MimeType et al
  from the new or old implementation, depending on configuration
- change all utils/mimetypes/ includes to utils/mimeutils.h
- move the implementation for the wrappers to
  utils/mimetypes(2)/mimeutils.cpp
- also move the MimeDatabase declaration in the "old" implementation
  back to utils/mimetypes/mimedatabase.h

Change-Id: Ie8de229c035d6cd9a5e4739dc0fa78d9c17228e3
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-02-25 07:19:58 +00:00
Fawzi Mohamed
b22ca3c467 qmljs: fix scan out of build dir
Scan outside the build directory was possible on mac and windows.
Avoid it by checking the relative path to the build directory.

Change-Id: I6a7082998429f902745146446bf89fc0cc75ca54
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit bdd7fcbac2)
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-02-14 09:49:12 +00:00
Fawzi Mohamed
bdd7fcbac2 qmljs: fix scan out of build dir
Scan outside the build directory was possible on mac and windows.
Avoid it by checking the relative path to the build directory.

Change-Id: I6a7082998429f902745146446bf89fc0cc75ca54
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2022-02-11 13:17:18 +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
Alessandro Portale
26bf18e1fe Core: Turn LocatorFilterEntry ofn ILocatorFilter::accept to const &
In ILocatorFilter::accept and all the overrides.

Change-Id: I27cd6babb66d91aad57e85572a1cdc77aef4fd79
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-02-11 07:35:30 +00:00
David Schulz
3a6dff6743 ProjectExplorer: filepathify actualTabSettings
Change-Id: I4b08b96d56bfeed0348d82bb96ff70d5f8ad583b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-02-04 11:51:52 +00:00
hjk
25f5771aa4 Rename QtSupport::BaseQtVersion to QtVersion
... and the Utils::QtVersion enum to Utils::QtMajorVersion to avoid
conflicts.

Change-Id: Ib688c67388272b7204a91444155f60b8c18a56bd
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-01-24 12:13: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
Maximilian Goldstein
3d47a0ef09 qmljsmodelmanager: Add additional directories to find qmltypes
This works around the issue that we only looked for qmltypes in the
directory the binary ends up being stored in. This did not work
for macOS and Windows as those are stored in subdirectories due
the platform specific ways binaries are stored there.

Now we also look in the directory where the qmltypes should be located
on these platforms.

Task-number: QTCREATORBUG-24987
Change-Id: I23d46e68f8fad0b4e2e8a01fc7c41360f1e6961e
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-12-07 10:15:11 +00:00
Eike Ziller
195abefe7d EditorManager: Remove QString openEditor(At) overloads
In favor of the FilePath/Link ones.

Change-Id: I5caf9e0f8de304ff4ee12329557aa50a6f3a0c69
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-11-02 08:11:14 +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
Christian Kandeler
284817fae6 Merge CppTools into CppEditor
There was no proper separation of responsibilities between these
plugins. In particular, CppTools had lots of editor-related
functionality, so it's not clear why it was separated out in the first
place.
In fact, for a lot of code, it seemed quite arbitrary where it was put
(just one example: switchHeaderSource() was in CppTools, wheras
switchDeclarationDefinition() was in CppEditor).
Merging the plugins will enable us to get rid of various convoluted
pseudo-abstractions that were only introduced to keep up the artificial
separation.

Change-Id: Iafc3bce625b4794f6d4aa03df6cddc7f2d26716a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-09-01 14:53:58 +00:00
Tim Jenssen
22121885fe baseqtversion: commands are FilePathes
also renamed the qmlscene* qmlRuntime*

Change-Id: Ifd522e21f5ce30aaa54060fdcebee2cd8b9463c4
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-07-14 09:50:01 +00:00
Robert Löhning
e065107fa5 QmlJSTools: Guard against null pointer access
Fixes: QTCREATORBUG-25943
Change-Id: If9e6528b0dc5642dbd150e7d20aeb9347f3d4465
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Erik Verbruggen <erik.verbruggen@me.com>
2021-07-07 09:45:52 +00:00
hjk
6f5d78a297 QtSupport: Use FilePath for several BaseQtVersion members
uicCommand(), designerCommand(), linguistCommand(), qscxmlcCommand(),
qmlsceneCommand(), qmlplugindumpCommand().

No change in functionality intented.

Change-Id: I43121de559019f96c2c1ff3b423974dddfc37124
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-01 09:30:29 +00:00
Fawzi Mohamed
73c40bcefa qmljstools::LocatorData: improve safety
* check that we create LocatorData in the same thread as the
  ModelManagerInterface
* pass this as connect context, to ensure signal disconnect

Change-Id: I5e51af90c521fd8c83a6cfe2d105832f5a02a04f
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
(cherry picked from commit 584f0476ec)
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-06-28 07:07:57 +00:00
David Schulz
e13c2b7403 MimeDatabase: add FilePath convenience function
Change-Id: I59c825490b3b5c49f3c177584ea4cc885c4f920b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-23 12:03:28 +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
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
Kai Köhne
4f8474e532 Simplify handling of qmlplugindump
Much of it isn't needed anymore:
- we do not build a debug version of qmlplugindump anymore since Qt 5.0
- on mac, qmlplugindump is not an app bundle since Qt 5.1
- since commit 6871f31b4e, the env parameter was just passed through

So if we take out this and all the infrastructure around it,
qmlplugindump is just a tool that we can handle like all the other
tools.

Change-Id: Ifa583ce7052a9030858312ab7c2e20f7ebce4051
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>
2021-03-23 08:41:01 +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
Erik Verbruggen
7dc82b1af9 MCU: Do not add fall-back path for QUL kits
Fixes: UL-3609
Change-Id: I9912c7476f3b45346835d60be61fed7399046162
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-02-16 10:33:52 +00:00
Jarek Kobus
6a2088d8ec Provide empty implementation for ILocatorFilter::refresh()
Make this method just virtual, not a pure virtual.
Remove all empty reimplementations of this method.

Change-Id: Idf10e492355e8519172facd421ea0b2b13ce3b80
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-02-11 13:32:30 +00:00
Eike Ziller
cb96b91dd4 Refactor Locator filter settings saving
Unify setting saving. Do not write settings that stay at the default, so
defaults could change and take effect.

For this we explicitly differentiate between default and user settings.
Make QJsonDocument the basis for saving settings, because QDataStream
cannot really handle structured data where parts could be missing.

Write locator settings to a different settings group, so we do not
destroy reading older settings from older Qt Creator versions.

Task-number: QTCREATORBUG-24762
Change-Id: I5909e2d79313f6fc26159bb644fdfb43781b6c38
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-02-04 07:33:10 +00:00
Eike Ziller
eaefcbd8f0 Use new, more evocative MessageManager API
At various places where semantics doesn't change.

Change-Id: Ib4d4a5c9f067e109126c6de88257f9e198a71447
Reviewed-by: hjk <hjk@qt.io>
2020-12-16 09:30:44 +00:00
Jarek Kobus
3796b66423 Remove unneeded include
Change-Id: Ifb857526ee559a4e1c8d48602fd89b3030238691
Reviewed-by: hjk <hjk@qt.io>
2020-12-08 14:44:34 +00:00
Eike Ziller
5e67bc5055 Fix build with Qt6
Add missing includes for "incomplete type" issues.
Remove usage of QDesktopWidget.
Don't compile native WebKit help backend (missing native widget integration).
Add SvgWidget dependency.

Task-number: QTCREATORBUG-24098
Change-Id: I1b3afb54d385940ff283824870fa7454866212a4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-10-26 08:44:21 +00:00
Fawzi Mohamed
103b35bcd5 qml: fix refactoring to separate component
* avoid extra spaces
* warn about existing files

Fixes: QTCREATORBUG-21091
Change-Id: Ic9ed4444bd028455e1b2d1755e6c43f352dfd5e3
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-09-30 08:32:38 +00:00
Eike Ziller
cf2a651c3b Make QmlJS(Tools) build with Qt5 & Qt6
Port from QStringRef to QStringView

Change-Id: I472d16f20e40ca52b8e5d481850a6bd8a1a38f3b
Reviewed-by: hjk <hjk@qt.io>
2020-09-17 09:37:23 +00:00
Eike Ziller
3944162039 Merge remote-tracking branch 'origin/4.13' into master
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri
	src/plugins/cmakeprojectmanager/cmakebuildstep.cpp
	src/plugins/cmakeprojectmanager/cmakebuildstep.h
	tests/auto/debugger/tst_namedemangler.cpp
	tests/auto/qml/codemodel/check/tst_check.cpp

Change-Id: Iefd5f71c03c0078513b76a92af764a4fb22ee4c2
2020-08-10 15:56:54 +02:00
Christian Stenger
002b3907f6 QmlJSTools: Fix plugin unit test
Amends 58ea14aea7.

Change-Id: I27d68572cffd9d2e37b3dbf8c47c75633db5d806
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-07-28 14:43:29 +00:00
Christian Stenger
deda9b7e37 QmlJSTools: Remove unused include
Change-Id: I4bc61fdebd9b2c20497e7569cdb5f5000317f22d
Reviewed-by: hjk <hjk@qt.io>
2020-07-20 10:23:26 +00:00
hjk
e1c88116b3 Core/Utils: Migrate further to Utils::Id
The coreplugin/id.h header is kept for downstream for now.

Change-Id: I8c44590f7b988b3770ecdc177c40783e12353e66
(cherry picked from commit 430a33dcd9)
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-07-06 11:15:18 +00:00
hjk
430a33dcd9 Core/Utils: Migrate further to Utils::Id
The coreplugin/id.h header is kept for downstream for now.

Change-Id: I8c44590f7b988b3770ecdc177c40783e12353e66
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-07-06 06:07:13 +00:00
hjk
361b80cb9b ExtensionSystem: Remove PluginSpec::isHiddenByDefault
Not used anymore.

Change-Id: Ic73ba3024b9e6157ff044cb23450fc9dad3c4c02
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-06-16 09:08:36 +00:00
Christian Kamm
96c860159b QmlJS: Track futures to allow testing
Tests often want to wait for all async tasks to finish before
progressing.

Change-Id: I61738df730ca341b5c9d227569d961cd1991b296
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Philip Van Hoof <philip@codeminded.be>
2020-05-21 07:53:11 +00:00
Eike Ziller
bac32dc740 Merge remote-tracking branch 'origin/4.12'
Conflicts:
	src/plugins/coreplugin/dialogs/shortcutsettings.cpp

Change-Id: I1f21845350bb69268ca51bc77167a8244adce22a
2020-03-26 15:26:27 +01:00
hjk
dd980e23f8 ProjectExplorer: Remove Target::applicationTargets()
That's BuildSystem::applicationTargets() nowadays.

Change-Id: I01cf0a491e4cb289af08f529fd15c85bfcdf5493
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-03-25 10:42:22 +00:00
David Schulz
00c0306040 Editor: Add Qt Script mime type
Fixes: QTCREATORBUG-23715
Change-Id: I4c7da375a11fb35c66e19769746267b2b661ee55
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-03-24 08:26:13 +00:00
Fawzi Mohamed
b09a48599e Update qmljs parser to Qt 5.15 parser
* parser side support for annotations, inline components, new UiVersion
  and all the things included in QT 5.15 parser
* SourceLocation moved from QmlJS:AST to QmlJS
* Visitors now need to handle throwRecursionDepthError
* BaseVisitor for visitors that want to override all visit

Task-number: QTCREATORBUG-23591
Change-Id: I682a30d0b08b6c929739fd0e339ef6fbde3eb630
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-03-03 15:31:10 +00:00
Igor Sidorov
a9e40ad14c Add final specifies to classes
Warning -Wfinal-dtor-non-final-class in clang trunk

Change-Id: I2bf17064bf8898eab10b82b69583a283157766d0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-02-05 09:33:55 +00:00