Debugger: Avoid duplicate commit and close

The delegate triggers a commit and close already when
the focus is switched. So, the additional calls will
end up in a warning deep inside QAbstractItemView
and not processed.
Get rid of the obsolete calls and the warnings.

Change-Id: Ic27f6b1aa0b73f4bb82b0878650d8ae8ae8f87d2
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Christian Stenger
2023-03-23 12:52:44 +01:00
parent 81a5e2143c
commit 59be9e98bf

View File

@@ -241,11 +241,6 @@ QWidget *ConsoleItemDelegate::createEditor(QWidget *parent,
"margin-top: 4px;"
"background-color: transparent;"
"}");
connect(editor, &ConsoleEdit::editingFinished, this, [this, editor] {
auto delegate = const_cast<ConsoleItemDelegate*>(this);
emit delegate->commitData(editor);
emit delegate->closeEditor(editor);
});
return editor;
}