Commit Graph

25 Commits

Author SHA1 Message Date
Kai Köhne
56baf8c058 Remove GPL-3.0+ from license identifiers
Since we also license under GPL-3.0 WITH Qt-GPL-exception-1.0,
this applies only to a hypothetical newer version of GPL, that doesn't
exist yet. If such a version emerges, we can still decide to relicense...

While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only

Change was done by running

  find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR GPL-3.0 WITH Qt-GPL-exception-1.0/LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0/g" {} \;

Change-Id: I5097e6ce8d10233993ee30d7e25120e2659eb10b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-06 11:15:13 +00:00
David Schulz
0bd6d7a69f LanguageClient: move completion rerequest logic
...from the code assistant to the language client specific assist
implementation. This further reduces the complexity of the code
assistant.

Change-Id: I08ba5eecea826d3ccfe7f1f5a8791a085299d6ef
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-11-29 06:04:30 +00:00
David Schulz
5eca1ff873 LanguageClient: use internal filtering if we got all completions
... at the current position. This reduces the amount of requested
completions.

Change-Id: I0fa35269bc123513217e3b3abd2c921bd92d8d10
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-11-11 10:11:33 +00:00
Lucie Gérard
a7956df3ca Use SPDX license identifiers
Replace the current license disclaimer in files by
a SPDX-License-Identifier.

Task-number: QTBUG-67283
Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-08-26 12:27:18 +00:00
David Schulz
28447355ba Editor: reuse generic proposal widget
Do not close already visible proposal widget if we get new results for
the same base position. Just replace the model of the widget and update
the prefix.

Change-Id: I298aba6eb8177edc17fea783189a2f987dbf15a2
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-09-02 11:04:55 +00:00
hjk
251287f0d3 Avoid warning on empty expressions
For some reason, Q_UNUSED includes already a semicolon, adding one
on the user side creates an additional empty statement.

Change-Id: I9c5e8fac381345a60792cb75e2938fd53958d3b0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-07-23 11:55:59 +00:00
Alessandro Portale
2e2059e8b5 TextEditor: Modernize
modernize-*

Change-Id: Ic497fea1942a77cf017be3b0033f92e3807066f1
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: hjk <hjk@qt.io>
2018-11-30 17:35:18 +00:00
Nikolai Kosjar
5601ac2952 TextEditor: Fix requesting more proposals than needed
Since

    commit d61d29cf16
    Introduce a basic client for the language server protocol

extra proprosals were requested in the fragile case on a change
notification, e.g. for function signature completion. Restrict this to
the language client proposal, as it was actually intended.

The language client does not support prefixes, so introduce this concept
for deciding whether to request new proposals or not.

Done-with: David Schulz
Change-Id: Ibc1ad82dbeeea93b85f279c59b8c7289fe6ec726
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-10-23 13:10:52 +00:00
Eike Ziller
49f3442a72 CodeAssist: Use settable property for IAssistProposal::isFragile
Removes the need to create yet another subclass (for overriding a
virtual method) in some situations.

Change-Id: I55d70de60b4f8d127a175d996f797700c2f172a6
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-09-18 15:33:52 +00:00
hjk
246c33ccba TextEditor: Avoid warning about unused parameter
Change-Id: I3f04f378330df85b8da3574d4bad2d74c4a4f4c7
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-03-29 05:56:02 +00:00
Nikolai Kosjar
535cc76cac Clang: Avoid dot-arrow-correction if dot is gone
Change-Id: Iba23a17ba9345ed4f08e16faad02054903c04afc
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-03-23 17:26:06 +00:00
David Schulz
ac2005b4e8 CodeAssist: The correction is just used inside C++ proposal.
Adding an empty default implementation to the base and
Removing boilerplate code from the specialized classes.

Change-Id: I4469d9f05d2ff153c0867c10683f86b4f656fd3d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-04-26 11:45:31 +00:00
David Schulz
6e4a719738 CodeAssist: Move base position to interface.
Every proposal needs to have a base postion.
Move it to the base class to reduce duplicated code.

Change-Id: I0b1b8282dfe955d251646661f755bf9f585fbad1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-04-26 11:45:21 +00:00
Tobias Hunger
397e7f4843 Update License according to agreement with Free Qt Foundation
* Update files in src/plugins

Change-Id: Ia5d77fad7d19d4bb3498e78661982f68729adb22
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-19 15:57:01 +00:00
Eike Ziller
3c85058694 Update License
Change-Id: I711d5fb475ef814a1dc9d2822740e827f3f67125
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2015-01-16 12:37:56 +01:00
Eike Ziller
8295b503be License update
Change-Id: I3c22ef2685d7aa589f5d0ab74d693653a4c32082
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2014-10-09 11:41:44 +02:00
Robert Loehning
746c5d8863 Incremented year in copyright info
Change-Id: Ib5423fdd064e4546f848c0b640b0ed0514c26d3a
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-01-08 08:29:47 +01:00
Robert Loehning
298531e370 Incremented year in copyright info
Change-Id: Ic6a9ff0359625021ebc061d22db6811814534205
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-01-29 16:27:03 +01:00
hjk
386ca7c8dd Adjust license headers
Change-Id: Ice592c6de9951ee3b2c4cb52ed0bb3b6770e0825
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2012-10-05 17:12:56 +02:00
Eike Ziller
e0e8cf3ada Contact -> qt-project.org
Change-Id: I7134d7de30bcf9f9dcfad42520dd45ee083a852d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-07-19 13:23:21 +02:00
hjk
2931a499e6 Long live the king!
Change-Id: I2b72b34c0cfeafc8bdbaf49b83ff723544f2b6e2
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-01-26 19:55:36 +01:00
hjk
31600758de all: s/info@qt.nokia.com/qt-info@nokia.com/
Change-Id: If18afb5d4665924e7d9250dccbc60a65e6daa75e
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2011-11-03 10:33:19 +01:00
Leandro Melo
2e9931f9ae Documentation: More on code assist
Change-Id: Icd4edd9fbd2067e46b1c8933d8e9139dafba3e67
Reviewed-on: http://codereview.qt.nokia.com/183
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@nokia.com>
2011-05-27 15:25:30 +02:00
Leandro Melo
8e84872ace Documentation: Code assist API
Change-Id: Id703725708823edc24171f7c1b28befe99032d63
Reviewed-on: http://codereview.qt.nokia.com/154
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2011-05-27 08:44:13 +02:00
Leandro Melo
bec4f02495 New code assist API
This is a re-work of our completion engine. Primary goals are:

- Allow the computation to run in a separate thread so the GUI is not locked.
- Support a model-based approach. QStrings are still needed (filtering, etc), but
internal structures are free to use more efficient representations.
- Unifiy all kinds of *assist* into a more reusable and extensible framework.
- Remove unnecessary dependencies on the text editor so we have more generic
and easily "plugable" components (still things to be resolved).
2011-05-18 10:46:20 +02:00