See friend declaration below. That's the reason why we decided to use
'class' almost everywhere.
Change-Id: Icd8ba99528eac28721b403cac0a992ee4d367265
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
5e872c0fcd changed the base class to TreeModel which
needs to have TreeItem inserted to fully work as intended.
This patch makes the overview model work without running
into countless soft asserts when using the builtin code model.
Change-Id: I875529bef03ea2cd9a226b05410fd05e247eded1
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Nikita Baryshnikov <nib952051@gmail.com>
When we get the file working copy it never contains "\r\n"
line endings. Let's provide the same behavior when we have
no working copy and read the file from disk.
Task-number: QTCREATORBUG-19905
Change-Id: I720d62426860dcdcdd8520db5430d9f4f5900ab6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Otherwise it looks like the options can be customized without copying
the configuration.
Change-Id: I7df26f8f2e3f566f659d12258730d2f514e9d71b
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
If a built-in/read-only configuration is selected, show a hint that it
needs to be copied to make customizations.
Change-Id: I62fc51b7548ec7cd6a156a0be84d9dcb41849ee7
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Move ownership and add the placeholder for future clang based
OverviewModel.
Change-Id: Ia44d2c1d0db59b40239d1f7934bf37a02e4b14e6
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Do not return Document or Symbol. Instead use Link
or LineColumn directly as return values.
Change-Id: I1863d7c3b4985ffe2ae5454622227075ebdc2de7
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Introduce abstract model to be able to use clang
based version of it in follow up patches.
Fix warnings and modernize source code a little.
Move OverviewModel to CppTools.
Change-Id: Idcc9bf03cad047026a456bd01063597a1eb95147
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
...by clarifying the widget hierarchy. Ensure that the combo box at the
top is perceived as the main widget:
* Remove the "Configuration to use:" label so the combo box gets more
horizontal space and thus dominance. Also, rename the group box
header/label from "Clang Diagnostic Warnigns" to "Clang Diagnostic
Configuration".
* Move the command line text edit below the combo box into its own tab
page to clarify the relation to the tidy/clazy tabs.
Change-Id: I97a0785678e33b94746046d07a911422b1469890
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Basically move it from CppTools to CPlusPlus
to be able to use it there.
Change-Id: I0af80f93bdc029824397ceafdf940cb86c4382b0
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This also fixes a crash on loading (some?) projects introduced
in 577bf7c08a.
Change-Id: Ie35d466fa3b84b183118fe93f55393a4c59755de
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
The group identifier is as good as the actual object, so use that
on the generator and the consumer side.
Change-Id: I6ccd54a2362631af0b50583f12563b8e41a5dd78
Reviewed-by: David Schulz <david.schulz@qt.io>
As a side effect, clazy/tidy options become available for project
specific customization in the projects mode.
Change-Id: Id72762dedd857915139c15f532d2f1c6d1f43edb
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
On diagnostic config change, affected documents are closed behind the
scenes. Visible ones are parsed immediately, invisible ones are tagged
for parse once they become visible.
Task-number: QTCREATORBUG-16263
Change-Id: Id4dcc69f1a4bfccc597e798d6821f8718f86e352
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: David Schulz <david.schulz@qt.io>
...and return -I for ones in project.
In case -isystem is set for all includes we don't get
proper reparse when the included file is in angle brackets
and is changed.
Change-Id: Iba912edfc488aed2a4484f6a742a7c36099e8a13
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Move locator and find filters ownership and initialization
to ModelManager. Initialize builtin filters by default and
provide methods to set them from plugins.
Change-Id: I4cc82ecff3415329a5f97b1be9dcc45e6103bf5a
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This includes also the query data for the help system (F1) for an
identifier under cursor.
Regressions (libclang changes necessary):
- Function signatures do not contain default values.
- Aliases are not resolved for/at:
- template types
- qualified name of a type
Fixes/Improvements:
- Resolve "auto"
- On a template type, show also the template parameter.
- For a typedef like
typedef long long superlong;
the tooltip was "long long superlong", which was confusing.
Now, "long long" is shown.
New:
- Show first or \brief paragraph of a documentation comment.
- Show size of a class at definition.
- Show size of a field member in class definition.
Task-number: QTCREATORBUG-11259
Change-Id: Ie1a07930d0e882015d07dc43e35bb81a685cdeb8
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Mouse hover on e.g. "QString" is supposed to show
QString
The QString class provides...
The sentence was removed unintentionally by
commit a7e8406ced
TextEditor: Remove unneeded functions in BaseHoverHandler
Change-Id: I356e66c0c21c528822c0f2e37f8058fa7b7d89bf
Reviewed-by: David Schulz <david.schulz@qt.io>
This is in preparation for clang code model to provide its own hover
handler.
Change-Id: Ifbdd96f427989bd5d1fbc4badb9c38108485c2f2
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
And add them to other clang code model arguments.
These flags provide architecture for cross-compilation
when ios kit is selected.
Task-number: QTCREATORBUG-19437
Task-number: QTCREATORBUG-19430
Change-Id: I7a485f49d637371bb28b2096086d7d8a4b0c404a
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reason: 'a' is also used for "Files in Any Project",
so there was no way of using both filters exclusively.
Task-number: QTCREATORBUG-19531
Change-Id: Icba0e993b004eb72b8cc419f52b171c5289bc0a1
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Always exclude clang include paths which do not come
with libclang used by code model.
This solves the issue with GCC that uses system clang
include folder on macOS.
Task-number: QTCREATORBUG-19397
Change-Id: I3b4845248a3cf03a95fbd4038856f8fb31346bfa
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* Omit QLatin1{Char|String}
* Use member initialization
* Use range-based-for
(and fixed the cases with non-const Qt container)
* Sort includes to common style
Change-Id: Ibc33a732bb153862efd6d5febfac758229cb61d4
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
... by additionally keeping local (currently non-owning) pools per
"interesting" type.
Current situation:
- The global object pool does not scale well for looking up
objects, as iteration plus qobject_cast typically iterates
over all pooled objects.
- User code that can use typed results from the object
pool need to have access to the full type definition anyway,
i.e. depend on the plugin of the target class anyway.
The patch here solves the scaling problem is to have local
type-specific pools to which objects register in their
constructors and deregister in their destructors.
This patch here does *not* change the ownership model of the
pooled objects, however, it opens the possibility to change
the ownership model per type (e.g. by not putting things into
the global pool at all anymore and make the local pool 'owning')
and the intent is to handle that in later patchs.
Even without the follow-up patches this here is a performance
improvement for the cases that access the local pools instead
the global one, i.e. "practically all".
Change-Id: Ib11a42df2c4ecf5e1155534730083a520dd1995b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>