Commit Graph

20 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
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
Jarek Kobus
7dd51acdfa Utils: Get rid of UTILS_DELETE_MOVE_AND_COPY
Use Q_DISABLE_COPY_MOVE, it exactly the same.

Change-Id: I574d52a0abdf9101f86054f881f6ce0cd498bb36
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2022-05-25 07:13:43 +00:00
David Schulz
14067cca86 LanguageClient: filter completion results
Use the optional filter text or the label of a completion item to filter
out results that do not match the current completion prefix. Fixes
completing code with language servers that do not provide server side
filtering.

Done with: Thorbjørn Lindeijer

Change-Id: Id27b88bb4e8f0b8b68d6ee49bd1d41ec11d54c45
Reviewed-by: Thorbjørn Lindeijer <bjorn@lindeijer.nl>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-06-01 09:33:30 +00:00
Andre Hartmann
a7bf0c0ea1 GenericProposalModel: Rename PrefixMatch to ProposalMatch
Change-Id: I70e583d489f27b2dad1b9ab874091e638bbaff1f
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-07-25 06:53:16 +00:00
Andre Hartmann
b5a82a4d58 GenericProposalModel: Allow substring matches
So far, if we had these three functions:

  int getSomething() { return 44; }
  int get_something() { return 43; }
  int something() { return 42; }

then we did not get a completion for getSomething()
or get_something() if we just typed "some", as only
the prefix was taken into account.

This patch adds support for substring matches, and
adds these with lower priority to the proposal list.

Task-number: QTCREATORBUG-19170
Fixes: QTCREATORBUG-19918
Change-Id: Ifc5e2149e4b1fa995f1f8550efc84e7ff4fb1522
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-07-23 10:20:17 +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
David Schulz
cf30c12624 TextEditor: make the format of completion item detail text adjustable
Instead of always assuming content in the form of rich text allow each
item individually to define it's text format for the detail text that is
shown as a tooltip of a completion item.

Fixes: QTCREATORBUG-22429
Change-Id: I9fa71373a743c26fa06d48acc5f0509584830ca0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-05-23 11:42:49 +00:00
Nikolai Kosjar
975173af11 CodeAssist: Ensure perfect match for keywords
...as otherwise the completion windows stays open and gets in the way.

Fixes: QTCREATORBUG-21767
Change-Id: Ib0a841b9d9de52109439f067c466478744361814
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-05-23 08:08:30 +00:00
Orgad Shaneh
41dee83bec TextEditor: Modernize
override, auto, nullptr, member initializers.

Change-Id: I04c6ebb683849568973bd7782fb5a3279267141e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-09-20 08:48:49 +00:00
Ivan Donchevskii
da4be3fdb7 Clang: Use new libclang code completion fix-its feature
Each completion coming from libclang now has it's own
list of fix-its which are required to be applied before
completion itself.

This saves one extra reparse cycle and gives an ability
to provide both kinds of completion (initial and corrected
one) for cases like shared_ptr, unique_ptr or any other
class with overloaded arrow operator.

Each of these extra fix-its is applied together with
corresponding completion dircetly before completion itself.

Change-Id: Ide37e45bb15fa2f1375cd6b86ecd43ced3593046
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-07-27 07:34:44 +00:00
Laurent Montel
227acdea75 TextEditor: Clean forward declaration
Change-Id: If338617551893e3ce3c7a68ff1abfc60de8cf610
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-09-28 09:39:46 +00:00
Ivan Donchevskii
48392fac9e Clang: Show full completion match first
If prefix is equal to some completion then show it
before anything else.

Task-number: QTCREATORBUG-15445
Change-Id: I976da4a829b818e843d31a76d2818eb5bbedda93
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-06-09 14:28:51 +00:00
Ivan Donchevskii
8922fbf4be Clang: change global completions order
Give CamelCase completions lower priority

Task-number: QTCREATORBUG-18319
Change-Id: I812d22616e8ab0e3d186bcf7a6a569de22be2a07
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-06-09 14:28:16 +00:00
hjk
39a38d5679 Wholesale conversion to #pragma once
Kudos to cgmb and https://github.com/cgmb/guardonce

Change-Id: Ifa8970734b8d43fd08c9260c645bdb0228633791
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-03-30 15:20:19 +00:00
Marco Bubke
8caedbd00d TextEditor: Remove copy and move in AssistProposalItemInterface
You should not not copy it anyway and it provides problems if you use move
only data types.

Change-Id: If9eab1ca265d89ccab9d947a534820da359d6054
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-02-17 10:36:52 +00:00
Marco Bubke
f41c6b0c4b Clang: Remove TextEditorWidget from AssistProposalItemInterface
Change-Id: I0ac924f88c1347d1b0027c47118b7ed21daf4869
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-02-02 11:26:58 +00:00
Nikolai Kosjar
03e6b15532 TextEditor: Fix compilation with MSVC2013
Change-Id: I0392c6f0256acc4dfcd14c793f7791a9142edd79
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2016-02-01 16:01:16 +00:00
Marco Bubke
ecca269292 Clang: Add ClangPreprocessorAssistProposalItem
Change-Id: Ifb27b9a21b9a2fe9a04496bbb70fa3fa07d1f89c
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2016-02-01 14:38:31 +00:00
Marco Bubke
c903f4974f TextEditor: Introduce AssistProposalItemInterface
For unit test we need to break every dependency to the TextEditor
Widget etc.. With an abstract interface we can implement it in clang
without relying on unwanted dependencies. It makes it also easier to
compute the values deferred.

Change-Id: I1b313a1625f4e80bd324ab4bf1a7c4f6b690abe9
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2016-02-01 14:01:35 +00:00