Disable rich text for ui_msgbox()-generated dialogs

No strings that gets passed to `ui_msgbox()` use HTML, and it causes
newlines to be ignored unless replaced by <br>
`MainWindow::showMessage()` can still accept rich text, but it's now
optional and disabled by default
This commit is contained in:
Alexander Babikov
2025-04-16 19:56:48 +05:00
parent cfe6779a5e
commit 46978a808c
5 changed files with 17 additions and 17 deletions

View File

@@ -142,11 +142,10 @@ ui_msgbox_header(int flags, void *header, void *message)
// any error in early init
if (main_window == nullptr) {
QMessageBox msgBox(QMessageBox::Icon::Critical, hdr, msg);
msgBox.setTextFormat(Qt::TextFormat::RichText);
msgBox.exec();
} else {
// else scope it to main_window
main_window->showMessage(flags, hdr, msg);
main_window->showMessage(flags, hdr, msg, false);
}
return 0;
}