Commit Graph

1258 Commits

Author SHA1 Message Date
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
Jarek Kobus
27c962f503 Remove QStringRef leftovers
Change-Id: I3cf4a4f58b9c7a8572745c73451c483f3d52e606
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-11-16 22:11:38 +00:00
Jarek Kobus
2b414508b7 Remove unneeded includes
Change-Id: I67fee9303509b7080e123a2a5826e200ce498ce2
Reviewed-by: hjk <hjk@qt.io>
2020-11-12 12:14:11 +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
47955ed4fa Adapt to key sequence changes in Qt6
Use operator| instead of operator+ which was removed.
Individual keys in QKeySequence are now QKeyCombinations instead of
ints.

Task-number: QTCREATORBUG-24098
Change-Id: I43a6122cf660e6a6de7edbf3ac9954e0a39cec06
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-09-29 09:24:29 +00:00
Eike Ziller
cc502e3667 Remove bool return value from IEditor::restoreState()
It's never used, and actually there wouldn't be any sensible thing to do
with it.

Change-Id: Id8a8df18c7db4b98e5abbc034240bb90dc1dcaa9
Reviewed-by: hjk <hjk@qt.io>
2020-09-24 13:02:56 +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
David Schulz
dba4bff703 TextEditor: use Utils::FilePath as file member in AssistInterface
Change-Id: I3bf9b013b9350411f918efdb9d1a36a2c22bf972
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-09-04 10:14:21 +00:00
David Schulz
339db00f85 Core: replace QString with Utils::FilePath to get documents
Change-Id: I01777c227398be8bd3bf877c5429b84a75aa361b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-09-04 10:14:14 +00:00
Christian Kandeler
760d91665f TextEditor: Make threshold for automatic completion configurable
Fixes: QTCREATORBUG-19920
Change-Id: Id6be79485b1fb8c2ab4cce2706816949ae5e217b
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-08-13 13:49:44 +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
Henning Gruendl
bb79a7fb90 QmlDesigner: Fix duplicate items auto completion
Fix duplicate items in the auto completion result by trimming the
strings. Otherwise items like "Item " and "Item" will both show up in
the result.

Task-number: QDS-2561
Change-Id: I0244fed19cf358d5c72ee169cd8ffa13672edce2
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-08-03 12:51:48 +00:00
hjk
babc1006f2 Various Qt6 porting
Rename QHashSeedType to QHashValueType and use it also for return
values.

Use qHashMulti directly instead of continuing using temporary QPairs.
Avoids ugly namespace tricks to find the new pair overloads, and is
actually clearer.

Classes used in signals cannot be forward-declared.  ...

Change-Id: I22450a0c642437a43f876e8e89cc8788fff3db61
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-07-16 09:45:43 +00:00
hjk
3ab1713680 More small Qt 6 porting changes
Task-number: QTCREATORBUG-24098
Change-Id: Ia7d972a35d2a99b74dc409091833b1a215a3eb64
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-07-14 12:12:15 +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
Eike Ziller
7c329e1902 Merge remote-tracking branch 'origin/4.12'
Change-Id: I4935b6afdb13627f32e850a4c8b536de0269bc4b
2020-06-25 09:28:57 +02:00
Fawzi Mohamed
96c1b4119e QML: ensure that signal treated like functions/slots in completions
Renames enumerateSlots -> enumerateMethods to mirror the new usage

Fixes: QTCREATORBUG-24124
Change-Id: I31ac7d5f4bf568e1ab9c9463b1ebd0011dfcb9d6
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-06-24 22:44:16 +00:00
Eike Ziller
7c5ed6f7d9 Move InfoBar to Utils
The only reason it was required to be in Core plugin, was its use of Id,
which now is available in Utils.

Change-Id: I66ce863c24924e6448d339b3422538a7fe167336
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-06-18 06:39:54 +00:00
Christian Stenger
d4b915e001 QmlJSEditor: Support sorting of outline
Change-Id: Ia73f7007c22fd19e9f387084ad7a67bd47173095
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-06-05 05:22:57 +00:00
Christian Stenger
e2ae2ad41d QmlJSEditor: Support dragging of functions
Currently you can drag around items and properties.
Extend this by JS functions.

Fixes: QTCREATORBUG-21993
Change-Id: I2934450cbaf8646620b43ce33fdb523b5d2803ab
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-06-04 06:35:49 +00:00
Eike Ziller
5b364de168 Use dialogParent() instead of mainWindow()
There are very few reasons to use mainWindow() directly.
Especially for modal dialogs, using dialogParent() is important, since
that guarantees the stacking order in case of other dialogs currently
being open.

Change-Id: I7ad2c23c5034b43195eb35cfe405932a7ea003e6
Reviewed-by: hjk <hjk@qt.io>
2020-06-02 11:44:53 +00:00
Christian Stenger
7c92db106d QmlJSEditor: Clear old values when updating outline
Fixes: QTCREATORBUG-21335
Change-Id: I46b1ad52f62edf7865a44ade298ff2233ca4554a
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-05-27 12:18:02 +00:00
David Schulz
3559af69db TextEditor: move rename symbol action to text editor
Task-number: QTCREATORBUG-21578
Change-Id: I9a873dcd38bacb2287c45973b6be0091c3eb9480
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-05-12 04:28:19 +00:00
Eike Ziller
e9661e43cb Merge remote-tracking branch 'origin/4.12'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri
	src/libs/qtcreatorcdbext/qtcreatorcdbextension.cpp

Change-Id: If6963d1ef7b5a1ea6343f68c8e7ce6fb5f482f21
2020-04-28 15:48:36 +02:00
Christian Stenger
1cea268c92 QmlJSEditor: Fix semantic highlighting
Do not send empty ranges as they may mess up the
highlighting of the file.

Fixes: QTCREATORBUG-23729
Change-Id: I77adcccb3a3da890e87f0b2860b945819446a3a8
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-04-27 11:28:33 +00:00
Eike Ziller
d79febdde9 Merge remote-tracking branch 'origin/4.12'
Conflicts:
	src/plugins/cmakeprojectmanager/cmakekitinformation.cpp

Change-Id: I90ef0063ed24e23bcb3d73fff086f50324faa1e2
2020-04-24 13:58:05 +02:00
David Schulz
dee0997d38 QmlJSEditor: jump to file under cursor if it exists
Don't limit this functionality to files that are part of the snapshot,
but try to open all files. This will allow opening c++ files defined in
a qbs project file.

Fixes: QTCREATORBUG-22685
Change-Id: If2a2a2075e5d7113a7bb44625c0f29ef66138d3c
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-04-23 13:00:07 +00:00
Eike Ziller
deb0eaf795 Merge remote-tracking branch 'origin/4.12'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri
	src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp

Change-Id: I34c3d1fd5be90537e37d15e00b1a0d455d1bf81d
2020-04-14 09:47:38 +02:00
hjk
68c539bb9d Utils: Replace FileChooser::path() by filePath().toString()
Keep the old method for now to ease downstream porting.

The change is kept mechanical, there's a lot of cleanup possible now
on the user code side.

Change-Id: I936baedd45b7ba057f1c789a1bec896886f48eff
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-04-09 17:45:06 +00:00
Fabian Kosmale
7627e5f84e Fix highlighting for new QML keywords in Qt 5.15
Change-Id: I2e45321eccb209fa9c9c524d85dc9e08d8bd23fa
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-04-08 12:10:50 +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
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
hjk
e5d1e9d274 Work around QHash::unite deprecation
Change-Id: Ibf199b5e3f2ca99b7e0cafe20893a509d9eab906
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-02-25 10:43:10 +00:00
hjk
afd8bc2c9e De-Q_OBJECT-ify various IEditorFactory derived classes
Change-Id: I1470b06d4e10073bb6e4f7ae735f9829fab3bb7b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-02-13 12:38:35 +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
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
Alessandro Portale
24a25eed14 Use isEmpty() instead of count() or size()
Change-Id: I0a89d2808c6d041da0dc41ea5aea58e6e8759bb4
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-01-20 20:56:57 +00:00
David Schulz
7021b1f078 Workaround 5.15 deprecations in QTextStreams
Change-Id: Ifc2b7fd353e7c12346e9716115e830679cea7666
Reviewed-by: hjk <hjk@qt.io>
2020-01-17 13:50:57 +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
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