Commit Graph

500 Commits

Author SHA1 Message Date
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
hjk
c3f7ef5340 Several SettingsPages: Code cosmetics
De-Q_OBJECT-ify, remove unnecessary #includes, final-ize, etc.

Change-Id: I461d3e73400dacac90c22e7c84a40e3ea1718b6e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-01-30 15:04:58 +00:00
Cristian Adam
08202b9110 CMake Build: rename target qmljs to QmlJS
This is in sync with what qmake and qbs project have.

Change-Id: Id82bbd933a8331c3e2032e5068323c183b2a1814
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-01-16 17:32:24 +00:00
hjk
d43b793dd8 Core: Introduce a IOptionsPage::setCategoryIconPath
Less noise on the user side.

Change-Id: I34dea09e8a3c8639f5a7db89b22f8b825b946395
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-01-16 09:53:45 +00:00
Nikolai Kosjar
548e798885 TextEditor: Fix typo in a TextDocumentLayout function
Change-Id: I17153d9bfe9820f3ccc88f54bce1d494a522be33
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-12-18 10:15:50 +00:00
Ulf Hermann
1e587831d1 QmlJS: Scan app.qmltypes and lib.qmltypes for type information
app.qmltypes is being added as a new convention to Qt 5.15. These files
are to be found next to application binaries, and contain the QML types
those application register themselves, in contrast to QML types
registered from plugins loaded via the regular import mechanism.

lib.qmltypes works the same way, in principle, for libraries. This
change only adds it to the possible names for qmltypes files, though.

Change-Id: I1d7c5835c8c3e988d214c5cdb949ca677b48dfc5
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-10-31 09:07:57 +00:00
Ulf Hermann
58c023e7c4 QmlJS: Clean up qmljsmodelmanagerinterface.{h|cpp}
Avoid foreach, fix linter warnings, simplify types, apply coding style.

Change-Id: I7cec65e775ee14ce60e1e57077e917285d58c152
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-10-29 11:45:32 +00:00
Ulf Hermann
987288bcec QmlJSTools: make setupProjectInfoQmlBundles private
No one needs to call this function.

Change-Id: I5647475ef2ec7dce5dcf7834245985bfb45632e6
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2019-10-28 07:47:03 +00:00
Ulf Hermann
6371725dbf QmlJS: Clean up ViewerContext
The special ctor wasn't used anywhere, the default ctor can be replaced
by inline initialization, maybeAddPath is only meaningful in the model
manager and the language compatibility check should definitely not
pretend to be a general rule either.

Change-Id: I11cf25fe1c696550d33b56ce57316100321d564b
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-10-23 10:14:47 +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
Sona Kurazyan
8e31932c29 Remove usages of deprecated APIs of QLayout
Replaced:
  QLayout::setMargin() -> QLayout::setContentsMargins()
  QLayout::margin() -> QLayout::getContentsMargins()

Task-number: QTBUG-76491
Change-Id: If28ef6910b3afe5d04e4746b74f9362a3e3b3c8e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-09-02 13:01:07 +00:00
Christian Kandeler
6d3f236aab Utils::Environment: Use expanded values
The Environment class is supposed to support values with references to
other variables, but we failed to actually expand them in most places.

Fixes: QTCREATORBUG-22687
Change-Id: I108cb59d3b4571471423455240f6f4f1cf64bf05
Reviewed-by: hjk <hjk@qt.io>
2019-08-20 12:39:16 +00:00
Andre Hartmann
3b41b9b24b Locator: Extract MatchLevel and use it in several filters
... that already used index-based prioritising.

There are a few more with two- or three-level priority,
but these still use the old scheme with multiple lists
good/better/bestEntries and converting them would not
gain much.

Change-Id: I21f7cfe07a3ae8183db9cb62311697d03db6e4da
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-08-15 09:57:46 +00:00
Christian Stenger
3163ed4feb QmlJSTools: Fix compile
Needed because of conflicting patches went in
nearly at the same time.

Change-Id: I042637438d1b4e412ae39bc2e8bc5e1aa24527dc
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2019-07-31 08:05:04 +00:00
Andre Hartmann
1f82f86167 QmljsFunctionFilter: Simplify priority handling
Change-Id: Ib3cb7f597256a3d19cc6cab3a2efa3961ac0c478
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-07-31 07:02:09 +00:00
hjk
e3b1106afa Compile fix with recent Qt dev
The reasoning in 1b4766e26c did not take into account that the scope
of QT_NO_JAVA_STYLE_ITERATORS may change over time, as done with
f70905448f6 in Qt base.

Change-Id: Ib1966ff26c4d36d5f62e149d6b45baa4aecf825d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-07-29 08:54:18 +00:00
hjk
473a741c9f Utils: Rename FileName to FilePath
More in line with QFileInfo terminonlogy which appears to be
best-of-breed within Qt.

Change-Id: I1d051ff1c8363ebd4ee56376451df45216c4c9ab
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-28 12:23:26 +00:00
hjk
19e1cf1520 Replace uses of qVariantFromValue with QVariant::fromValue
Deprecated in Qt 5.14, alternative has been around since Qt 4 at least.

Change-Id: I4e3a53c289088368609e0d0ce2405a832d311308
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2019-05-27 12:33:29 +00:00
Orgad Shaneh
1e138fbe10 Remove excess blank lines after namespace
Change-Id: I4e4f83017f2bfc2cf842c4c971ed4b05e0447e6a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-05-27 06:50:16 +00:00
Eike Ziller
6fb9bf453f CMake build: Add ability to disable building of individual plugins
Adds a cache entry "BUILD_PLUGIN_${NAME}", defaulting to ON which
can be set to OFF to disable building of a plugin.

Adds a extend_qtc_plugin function that should be used to add
properties to a plugin after add_qtc_plugin, instead of the
standard CMake functions target_... . The new function results
in a no-op if the plugin was disabled.

Change-Id: I57f6799620aea0aaa8b56acead4815ccced95911
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2019-05-23 11:13:21 +00:00
Cristian Adam
d855b84c5d Qt Creator CMake port
Based on Tobias Hunger's work from a few months ago.

The CMake configuration needs libclang and Qt paths specified as
CMAKE_PREFIX_PATH.

Auto tests are run with "ctest". At the moment the pass rate is 87%.

Change-Id: Iba98e39bf22077d52706dce6c85986be67a6eab0
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-05-17 13:33:28 +00:00
Tobias Hunger
b810f6f1ba qmljstools: Remove dead files
Change-Id: I25c75054bc1433844ce8a52c3774f5a94bf07bab
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2019-05-14 14:30:21 +00:00
Christian Kandeler
83dd031960 ProjectExplorer: Rename KitInformation to KitAspect
The name "KitInformation" does not properly convey the fact that it
represents a certain *aspect* of a kit. The same goes for
"KitConfigWidget", which in addition was inconsistent with
"KitInformation".
We now use "KitAspect" and "KitAspectWidget".

Change-Id: I9804ee4cedc4d61fad533ea1dd4e4720e67fde97
Reviewed-by: hjk <hjk@qt.io>
2019-02-11 11:55:01 +00:00
Ivan Donchevskii
1dee275f58 ClangFormat: Add cursor position to the indenter interface
Sometimes it's imnportant where the cursor currently is
to properly format the code without affecting the current line.

Change-Id: I8b1fb11d2303adb5f960c7cb80a0ed2e6e45010f
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2019-01-31 10:25:18 +00:00
Alessandro Portale
f5974ad993 Fix warning: "Don't call QVector::first() on temporary QList/QVector"
[-Wclazy-detaching-temporary]

Change-Id: I23f5cbd80bb92d3f9f1bfb5ae07493818958c5b0
Reviewed-by: hjk <hjk@qt.io>
2019-01-28 11:03:39 +00:00
Ivan Donchevskii
d7058e1afe ClangFormat: Refactor indenter to allow ClangFormat unit-tests
We do not build texteditor files in unit-tests so some tricks
were required to make ClangFormatIndenter available.

First simple unit-test proofs it builds and runs.

Change-Id: I81d5ea099bd27fd1c1ed8b5b7877299dcc62a67f
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2019-01-22 09:52:15 +00:00
Tim Jenssen
372e239d2d QmlJS: remove qtquick1 leftovers
QT_INSTALL_IMPORTS and the used ProjectInfo.qtImportsPath variable
were only used for QtQuick1.

Change-Id: I34da0cfc77effa84f3a7578e7f91fed0768a9bf4
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2019-01-18 13:16:30 +00:00
Alessandro Portale
134bb1b8b6 QmlJSTools: Modernize
modernize-*

Change-Id: Ifc270455ab7500d18798ac0130744662ad3303fb
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-12-07 18:42:04 +00:00
Eike Ziller
29c9f8080d Merge remote-tracking branch 'origin/4.8'
Conflicts:
	src/plugins/android/androidrunnerworker.cpp

Change-Id: Ibd8b99435365fb7e7d488313fd1d2b3a75adad1b
2018-11-29 13:36:14 +01:00
David Schulz
b61d11a446 QmlJsTools: add mimetype for JavaScript modules
Fixes: QTCREATORBUG-21517
Change-Id: I18b2b309279f40c3dd4cdee2e7cf27c25fa4984a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-11-26 06:35:00 +00:00
Marco Benelli
4646acad0d qmljs: update parser
Update the qtcreator qmljs parser to the
one of Qt 5.12. It supports EcmaScript 7.

Task-number: QTCREATORBUG-20341
Change-Id: I0d1cff71402ba17e22cde6b46c65614e162280de
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
2018-11-22 11:21:32 +00:00
Robert Loehning
747d1ef9f1 Remove unused variables
Change-Id: I8b49a2eea7509abb685d751a0f038dc3b4f555ca
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-09-07 14:02:23 +00:00
Alessandro Portale
3d3f14e3fe Prefer using 'override' instead of 'virtual'
warning: prefer using 'override' or (rarely) 'final' instead of
'virtual' [modernize-use-override]

Change-Id: I6dac7a62b627fa1353b4455e1af92f869c2571cc
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
2018-07-11 16:31:35 +00:00
Marco Benelli
5aef87f155 qmljs: cleanup locator's entries when closing a project
Task-number: QTCREATORBUG-13459
Change-Id: Icebe06a8a49389511a12506728f2109dc0b95287
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2018-05-23 10:40:34 +00:00
Tobias Hunger
053e4494cf Qml: Consistently use nullptr
Fixed by clang-tidy modernize-use-nullptr.

Change-Id: Ibe0dddaacbabd47b5a0519ae361132818d5b8be2
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
2018-05-08 07:43:40 +00:00
Tobias Hunger
0cb0c0451d QmlJsEditor/QmlJsTools: Use override consistently
clang-tidy fixes from modernize-use-override check.

Change-Id: I29716dcf73946b5762568d349a3f5a3da4f656e6
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
2018-05-07 15:44:57 +00:00