mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-12-04 15:39:34 +01:00
Replace newlines with HTML line breaks in message dialogs
* Keeps readability of translation strings without losing line breaks due to forced rich text display
This commit is contained in:
@@ -91,7 +91,9 @@ MessageBox::Button MessageBox::messageBox(QWidget* parent,
|
||||
msgBox.setTextFormat(Qt::RichText);
|
||||
msgBox.setIcon(icon);
|
||||
msgBox.setWindowTitle(title);
|
||||
msgBox.setText(text);
|
||||
// Replace newlines with HTML line breaks
|
||||
auto fixedText = text;
|
||||
msgBox.setText(fixedText.replace("\n", "<br>"));
|
||||
|
||||
if (m_overrideParent) {
|
||||
// Force the creation of the QWindow, without this windowHandle() will return nullptr
|
||||
|
||||
Reference in New Issue
Block a user