... and make use of it in the built-in code model and with clangd.
Task-number: QTCREATORBUG-16580
Change-Id: I8c331f56aa1bbf91c9f768be82a779a72f40c4c7
Reviewed-by: David Schulz <david.schulz@qt.io>
Saves some code on the user side.
Change-Id: I32cd220b6e533f5497a1865f9c34ab9db4cfda79
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This does not work with text wrapping since there are multiple
QTextLines inside a block but we can not adjust the line hight inside a
block. This needs to be addressed inside Qt.
This reverts commit dc64f3207b.
Change-Id: If6c28056da9891eeeb75f5939a42f08360013a80
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
... and make use of that in CppTool's "Find Usages" by assigning
different colors to read and write accesses.
Fixes: QTCREATORBUG-12734
Change-Id: I067db2c8d693bb2c5be44249931ee4f0269f7e52
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
There are very few reasons to use mainWindow() directly.
Especially for modal dialogs, using dialogParent() is important, since
that guarantees the stacking order in case of other dialogs currently
being open.
Change-Id: I7ad2c23c5034b43195eb35cfe405932a7ea003e6
Reviewed-by: hjk <hjk@qt.io>
Mainly re-using the existing pimpl as new widget implementation, and
using the primary storage out of the page (into texteditorsettings).
This one is structutally bit different as there is that second path
(Ctrl+Wheel) to modify font zoom.
Change-Id: I7b85c781c7c53a733b234754beb5bb54664be3fd
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Makes it possible to turn of specific overlays by unsetting the color.
Such color resulted in a black overlay until now, which is also kind of
unexpected.
Change-Id: I90732ae496af62b573b2e3b8d8c7fe56632ca8d9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Defaulting to C_TEXT in that case is correct, but the values
for C_TEXT are set via the palette, so other display features like
the current line highlighting and the block visualization,
which are painted _below_ the text, are not overridden.
So, the correct way for a style to set the same foreground and
background colors as C_TEXT, is to leave these colors unset.
Fixes: QTCREATORBUG-21661
Change-Id: I8cdb73e8edc5e3883e1ef107bd1c2b29e6d75b9c
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
The color from mix-ins should be always override the previous color. It
should only be tested for relative colors. It looks like the branches was
mixed up.
Change-Id: I9b8602ab65cab65f0df8ec2c111845cf2d8d33cf
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This is the first implementation of "color overriding mixins".
Mixins are already initialized with fore/background color =
QColor() = "invalid color" (see Format::createMixinFormat).
This patch uses above contract in FontSettings::addMixinStyle.
Only mixins with a valid fore- or background color can override
other style options' colors. Unset mixins will have no effect.
TEST=No functional change (will be enabled in a follow-up).
Requires Clang.
Task-number: QTCREATORBUG-16625
Change-Id: I983bb876c060963f6d66cc64881bc138e384f5e5
Reviewed-by: David Schulz <david.schulz@qt.io>
Set default bg color to NoBrush.
Previously caused incorrect painting when
underline style was set without background.
Task-number: QTCREATORBUG-18101
Change-Id: I4c1d86a3c711a3962e01ccf3a937dafa36b68ec2
Reviewed-by: David Schulz <david.schulz@qt.io>
Don't add a background to a format without a background
if a mixin is applied.
Task-number: QTCREATORBUG-17314
Change-Id: Ie76fe7f69e98e9cfdfa290c40f0774dbe6f86cea
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
We introduce relative colors to make it possible to change for
example the color of a declaration slightly.
Change-Id: I8c1991a8907207d3616be954504c68ea18c6deb1
Reviewed-by: David Schulz <david.schulz@qt.io>
The current default is black foreground, which is invisible on dark
color schemes.
Change-Id: Iaa2520422ea6a6b355c89d71d204a7620aa98fcd
(cherry picked from commit 2c3f3970d5)
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Required for providing defaults for non-existent entries that should
fall-back to text.
Change-Id: I8ce33257a55cf173a5e9b904b7da6326163b4261
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
The size of the array is fixed so we can simply use the memory patter as
a hash value.
Change-Id: If86a58b111a07b2bd9cecc12a03d74b93a914159
Task-number: QTCREATORBUG-16419
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
We don't clear the cache so that changes in the font settings are not
reflected in the editor.
Change-Id: I9d54992d0770b42e1055e99d9e8a2866dd698672
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
You can only set one text style but in many cases like
Function and Declaration it would be nice if they could be merged.
Change-Id: Icda892057b79eef1bea2fa8b2c5f0f7cbc5f518a
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
The TextEditor settings do not remember a global Color Scheme setting,
anymore, but rather a Color Scheme ber Theme. A .creatortheme can define
a default TextEditor Color Scheme (overridable in the settings). This
makes switching of schemes more pleasant.
Taks-number: QTCREATORBUG-15229
Change-Id: I3bd36a4dfa23feea2254be2df50fce064e8fe2af
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
In case the qtcreator.ini has a TextEditor section without a defined
ColorScheme value, Qt Creator decides to create a new "styles/customized
%i.xml" and select that as scheme.
I assume that this was implemented way back then, as migration code when
selectable Color Schemes were introduced. These days, it makes
maintenance (and implementation of QTCREATORBUG-15229) more difficult.
Let's remove it.
Task-number: QTCREATORBUG-15649
Change-Id: I49102d02fa8e582a92f6e39faa8c7d3b58f531b3
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Underlines colors was hard coded to the foreground color of some settings.
With this patch you can set the underline color and the underline style
to your taste.
Change-Id: Ibc64c2d2c89bf1827a2cadaf6aee9d50d08cd1ee
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>