TextEditor: explicitly set focus to bookmarks note text

Allows the user to directly start typing in additional information for a
bookmark after triggering the shortcut. This seemed to have happened
automatically before, but since this is desired behavior anyhow it's
okay to call it explicitly.

Fixes: QTCREATORBUG-30829
Change-Id: I77eef2092052e61397f3a73f15c32e909eda01a0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
David Schulz
2024-05-22 06:51:24 +02:00
parent 5453d13290
commit 1a89bfbe34

View File

@@ -876,6 +876,7 @@ void BookmarkManager::edit()
auto layout = new QFormLayout(&dlg);
auto noteEdit = new QLineEdit(b->note());
noteEdit->setMinimumWidth(300);
noteEdit->setFocus();
auto lineNumberSpinbox = new QSpinBox;
lineNumberSpinbox->setRange(1, INT_MAX);
lineNumberSpinbox->setValue(b->lineNumber());