Edit comment always selects already inserted comments
The Dialog used for getting the comments always selects the complete text and hence it's quite easy to accidentally delete the comment. This happens as a QInputDialog is used which is designed for handling a single input. The passed text is to be deleted. From the documentation:
QString QInputDialog::getMultiLineText(QWidget *parent, const QString &title,
const QString &label, const QString &text = QString(), bool *ok = nullptr,
Qt::WindowFlags flags = Qt::WindowFlags(), Qt::InputMethodHints inputMethodHints = Qt::ImhNone)
title is the text which is displayed in the title bar of the dialog. label is the text which is shown to the user (it should say what should be entered). text is the default text which is placed in the plain text edit. inputMethodHints is the input method hints that will be used in the edit widget if an input method is active.
To solve this, it might be necessary to create a custom dialog.