TextEditor: Init markWidth variable

Otherwise some overrides of extraAreaWidth() may leave passed
value unmodified and we may end up with uninitialized value.

Change-Id: Ica89019fc2cff93f0bc7d784624730ec9d8c0224
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Jarek Kobus
2022-11-30 00:09:37 +01:00
parent 05189a676f
commit f3ce23230e

View File

@@ -5886,7 +5886,7 @@ void TextEditorWidget::extraAreaMouseEvent(QMouseEvent *e)
{
QTextCursor cursor = cursorForPosition(QPoint(0, e->pos().y()));
int markWidth;
int markWidth = 0;
extraAreaWidth(&markWidth);
const bool inMarkArea = e->pos().x() <= markWidth && e->pos().x() >= 0;