It has some platform specific warts, filepath.h is somewhat
cheaper and less ugly overall.
Partially clean up surroundings
Change-Id: Ida1fd470ec020f69c446109427f92a08e879789f
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Import versions as well as versionless imports can confuse
the help engine when performing context help lookups, which
leads in some cases to falling back to the wrong help items.
Remove the version for looking up help items.
Fixes: QTCREATORBUG-31280
Change-Id: Ida765369f52804186ca005ceec23cd9d795220c5
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Semih Yavuz <semih.yavuz@qt.io>
When the project info changes, we should update the qmlls version
which the current opened document is using.
Fixes: QTCREATORBUG-31208
Change-Id: Ief338efd863ea7472a4e5b68a5b6e7d601fd0f80
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Don't try to start qmlls if the found path doesn't exist.
When there is no Qt version found in the project (this happens
when you open a qml file without providing its build folder, or
open it without the project info so no linked Qt version is found)
we might end up with incorrect path where no actual qml executable
exist for that path. Check the existence of the binary before assigning
it as the path for qmlls.
Fixes: QTCREATORBUG-31207
Change-Id: I626ace796401e72462eb850d4bd88c1ef51cf53a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Enabler need to get set after reading the settings.
Silences soft asserts.
Change-Id: I7e70279537a87462e607e51a40d9fef565b46fa8
Reviewed-by: hjk <hjk@qt.io>
Qmlls client was still alive eventhough it was turned off via the
settings page. This was causing both qmlls highlighter and the embedded
highlighter do the job at the same time. Disable qmlls client
appropriately.
Fixes: QTCREATORBUG-31148
Change-Id: I9577a78f9c861cf2fe718ffe58f3d7f77a916b9a
Reviewed-by: David Schulz <david.schulz@qt.io>
Move implementations either to the TextEditorWidget, TextDocument, or to
the caller side. This makes the TextDocumentManipulator basically a
repeater so we can easily replace it with a TextEditorWidget in the
next step.
Change-Id: I04de3cb295b56fbaae99145f8e579fe405b065a5
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Collecting relevant pieces in preparation of settings aspectification.
Change-Id: Ia221de3babf301f4f5d3583d346eeb9f91046aa4
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Where they were missing. The text is shown as a paragraph in the
extension manager.
Change-Id: I6e15c89fe4023b222e9c476f4312e13fcb0905c0
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
The TextDocumentManipulatorInterface was introduced to decouple
modification operations from QTextDocument. But nowadays all tests and
production code usages are backed by a QTextDocument, so we can remove
this abstraction layer again. The first step is to merge the interface
and all manipulator implementations.
Change-Id: Idd1609df549d3b120dd516d5161af9aa8aa571ca
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
- Rename topic as "Configure QML Language Server", as QMLLS
is now turned on by default
- Describe new preferences
- Remove "QML Language Server" from checkbox labels
- Add a link to the docs to the change log
Task-number: QTCREATORBUG-30604
Change-Id: I397b1747a3d23d728c78dc2eae000839655c4f32
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Apperantly, qmlls semantic highlighting is not as powerful as the
embedded code model's highlighter. Disable lsp based highlighting until
qmlls semantic highlighting reaches the feature parity with the QtC
highlighter. This is tracked by QTBUG-126550.
Task-number: QTBUG-126550
Fixes: QTCREATORBUG-31083
Change-Id: I6cab94d4ba1d1cde50b62ce03a6b1cc5b6d7d27b
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Rename qmljseditingsettingspage.* to qmljseditorsettings.*,
re-arrange some includes, use settings() for the singleton access
etc.
Change-Id: Iff36a99baf0afd238a935386e9111818be5d7987
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Do not select qmlls executables from versions below 6.8 by default,
as those have less features than QtC's builtin codemodel. Add an
option to re-enable using qmlls versions from Qt 6.7 or below,
which is off by default.
Fixes: QTCREATORBUG-31088
Change-Id: I56bfd39bc980996a92232cbcb424252d755cdfc0
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Not the intended final state, but more uniform.
Change-Id: I406d53032ff76631ddd542df8e3afa232d93a7fc
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Instead of adding a second toolbar widget, replace the current one. This
avoids weird situations where you get two outline toolbar widgets, one
provided by qmljseditorwidget and another one provided by qmlls.
Turning the language server on deletes the combobox created by
qmljseditorwidget, such that qmljseditorwidget has to recreate
its combobox after the language server stopped being in use.
Also make sure that m_outlineCombo is set to nullptr after it gets
deleted, such that late jumpToOutlineElement and
updateOutlineIndexNow() calls do no try to attempt stuff on an already
free'd pointer.
Change-Id: Ie323a7b3e7a4d5e24407fcedf8383dd2f0efe525
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Edited the short descriptions to answer the question
"What can I do with this extension" to help users decide
whether they need it.
In long descriptions, tell users what else they need to
be able to use the plugin.
Change-Id: Iefce7505b61fc77cf38cc915f1f7dbd25c9cb570
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Avoid the redirect that is inevitable nowerdays.
Also, change necessitas.kde.org to www.qt.io, since the orgininal page
is offline.
Change-Id: Ib1823f0df97d2df87822fd2bb7552e2f2c7e971e
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Change the default values for enabling qmlls to true. Don't use the
latest qmlls version by default for now because qmlls will crash on qt
5.15 projects.
Also remove the "experimental" from the checkbox text.
Fixes: QTCREATORBUG-30851
Change-Id: I6cac396817eecb0d3bd071668d0588ec6eef1d4f
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This puts the implementation introduced in acf1ecb47f into use, after
significant simplifications in the class hierarchy. CRTP is not used
anymore, and the new tag based dispatch is also used for Layout::addItem,
effectively reducing the number of different code paths.
The Lua based settings access is disabled for now.
Change-Id: Idb6d1a25675378757c5267bdb630bcd4c1f52d34
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This greatly simplifies code that produces change sets with a single
EditOp.
Change-Id: If042bb91e5132b7141d88404cfbd3ba12632b52d
Reviewed-by: David Schulz <david.schulz@qt.io>
... and make use of it.
In most contexts, apply() immediately follows setChangeSet(), so
combining the two can save a lot of code on the call site.
Change-Id: I421001bd47000cb64678a57b19760becf59a4863
Reviewed-by: David Schulz <david.schulz@qt.io>
Check for enum key name starting upper case to avoid processing
code that may match other cases as well.
Task-number: QTCREATORBUG-19226
Change-Id: I07b62b492e2b220b7fbb3eb3fc2fb3136b554254
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Highlights the enum and its values if valid.
Task-number: QTCREATORBUG-19226
Change-Id: Icca90b0a5d83a4ecdccfe220bcd0a3547b2e6104
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Improves handling of Qml based enums inside qml documents.
* completion of enums
* follow the enum
* highlighting values inside the declaration
* displaying the enum declaration inside the outline
* minor static checks
Task-number: QTCREATORBUG-19226
Change-Id: Ia07fd9a8b7fa3106f2ea53198bfdcc50eecb7307
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Add a checkbox to the qmljseditingsettingspage that generates qmlls
ini files by default for new projects.
If this checkbox is checked, then initial CMake configurations (when
enabling a kit for a project) and reconfigurations (when pressing the
"Re-configure with Initial parameters"-button) will set
QT_QML_GENERATE_QMLLS_INI to ON if QT_QML_GENERATE_QMLLS_INI was not
set yet.
Fixes: QTCREATORBUG-30394
Change-Id: I58f89558d25ef107e501bd67702f26554bd6aeaa
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Give each editor a context and register editor actions individually for
that context. This removes the need to tell the action handler the
current editor. Additionally all actions are now available in editor
widgets outside of the EditorManager.
Change-Id: I0109866b180889762f8bd8aa07874d8d7c55bfa6
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Color properties set with hex color values display a
color tool tip, but named colors failed for Qt6 while
it was still working with Qt5.
Change-Id: I6457bbdc86dd7f036bc48dc40cfa16cda570b95f
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Check if qmlls is enabled before showing tooltips from the QtC's code
model. This way, other hoverhandlers, like the one used for language
servers, have the possibility to show their tooltip.
Task-number: QTCREATORBUG-29826
Change-Id: I5d879c7d4c04a27bc668e8900f54984788b02727
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Use an elapsed timer in the syntax highlighter to periodically return
from the highlight and push a continue highlight to the end of the event
loop.
This allows the user to interact with the editor in between those
batches. If the user modifies the document in between highlighting
batches, the area that still needs a rehighlight is increased if needed.
This also reverts 62ea85ee6a and the
related changes.
Task-number: QTCREATORBUG-28727
Change-Id: I7c394dbdff658330bb72f3b68b9928980947db75
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Update the latestVersion in the loop. Otherwise we always compare to
initial value and consequently the last installed version incorrecyly
becomes the latest version.
Fixes: QTCREATORBUG-30423
Change-Id: I7083928c5e371f0337677eacf1b3b4da50358a7c
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>