Use QString instead of an empty QStringLiteral
[-Wclazy-empty-qstringliteral]
Use the static QFileInfo::exists() instead. It's documented to be
faster. [-Wclazy-qfileinfo-exists]
Unused CppTools::ClangDiagnosticConfigs
[-Wclazy-unused-non-trivial-variable]
Change-Id: Ia4098d1191d6fcfc6e0774f71c39acdea3f0f36c
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
...from the diagnostic configuration.
If no custom diagnostic configuration is set in Projects Mode > Clang,
one is created and set for the current project. Otherwise the current
custom diagnostic set in the project settings is modified.
Change-Id: I5c48280c90f0e807e7333122d504dda302a8b0a9
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
...as selecting text in the tooltip was difficult and eventually got
disabled due to other problems - see
d58c0a9ac8.
This adds support for actions in TextMarks. They are displayed as
QToolButtons in a dedicated column in the tooltip.
Change-Id: I84ee3c3e4af573a80953786881d1333b00e4200c
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
This is for a follow-up change that will allow to copy the diagnostic
text from the tooltip to the clipboard.
Change-Id: Iad5343a819c84ca83d562f69dcf2f50e1d4785c4
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
They are also used by the qml code model, and may be used by additional
code models in the future.
Change-Id: If216cbeb7b77be0f3b6f31671c71d913206315cb
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
We already avoided showing inline annotations for diagnostics in
non-project files. But given many diagnostics the visualization is still
quite noisy. E.g. consider opening not self-contained header files or
files for which we do not have any project open, as it can happen if the
debugger jumps to such a file.
So leave only the text mark icon on the left and avoid all the rest:
underlines and refactoring icons in the editor, marks in the scrollbar
and task hub issues.
Change-Id: I05245981b21b38be650489a006593922dcb6896d
Reviewed-by: David Schulz <david.schulz@qt.io>
For build system diagnostics they are not displayed either.
Also, the error/warning is already encoded in the icon and the color.
However, the category is still shown in the tooltip.
Change-Id: I190ab17691c32786cefc20d058010c65cda5ace9
Reviewed-by: David Schulz <david.schulz@qt.io>
The patch is mostly mechanical, but contains also a few spurious changes
from values references for some local variables, foreach -> ranged for
etc that I coulnd't resist.
Change-Id: I58f0bd972546895eb318607cbfbd7ac35caf3f23
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Using the already established icons for code model errors and warnings
to Utils to mak them accessible for other code models.
Change-Id: If9f8efde60cf20411e043aeb2831a9254398bcaf
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
When navigating to headers that are not part of the project, avoid
showing the inline diagnostics. In most cases, these files can't be
changed.
This helps also for the session-load case where files are opened/parsed
when no project information is available yet.
Change-Id: I7fce24af78b3b1efbf64dd27d8ca2a053e02d4ec
Reviewed-by: David Schulz <david.schulz@qt.io>
Displaying short descriptive text of a TextMark at line end.
Currently implemented for ClangTextMark and BookMark.
Change-Id: Idc6b579bda0382ad94b2e236b715696396b10460
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Moving defaultToolTip and color from TextMarkRegistry to TextMark.
Allowing every instance of a TextMark object to define these
information.
Change-Id: Iec1794372cf902b34d343402074e3999e7f9faf7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Use a single QLabel - No need for all the QLabels we used. Also, a
single QLabel enables selecting and copying all the diagnostics, which
is handy when displayed in the info bar.
* Avoid call to Utils::ToolTip::hideImmediately() if the location is
clicked from the info bar.
* Simplify code and API
Change-Id: Ib991364e4d6f40ef02dada8ebbb90fe6ff8ae1a1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
...because those errors can lead to a substantial performance/functional
regression.
The actual diagnostics (possibly with children) are shown as details in
the info bar.
The info bar can be hidden with the "Do Not Show Again" button.
Re-enabling the info bar is possible with the new editor tool bar
button.
Change-Id: I03394ff8e3c84127946b0b791930b28a385f5a46
Reviewed-by: David Schulz <david.schulz@qt.io>
...for consistency and to avoid future file name clashes.
Change-Id: If595c8debfa1ceb01a1bb0ed34649fa513660503
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
Instead of describing icons via file name or in the themed icons case
via
a string that is a list of mask/color pairs, we have now a class for it.
Icons are now listed in per-plugin *icons.h headers.
RunControl::m_icon was The only place left where an icon property was in
fact a string. This patch changes that member to be a Utils::Icon.
Change-Id: Ibcfa8bb25e6d2e330c567ee7ccc0b97ead603177
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Otherwise the copy constructor will be used too and we get an error
because it is private.
Change-Id: Ibfe70939ebe34fa9a524b9844a20d962eb09bd97
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Diagnostics are now moved to the clang backend process. Fixits are
supported too.
Change-Id: I20faacf466bbf78dec479220c3d7b336a47bc453
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>