mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-06 06:55:09 +00:00
ux/core: Add module verification step for some critical libraries
- Prevents running the emu with downloaded dll files
This commit is contained in:
parent
14a388b3fe
commit
ca0ca2e5a8
5 changed files with 110 additions and 2 deletions
|
|
@ -4,6 +4,17 @@
|
|||
#include <QTextDocument>
|
||||
#include <QIcon>
|
||||
|
||||
static QString process_dialog_text(std::string_view text)
|
||||
{
|
||||
auto html = Qt::convertFromPlainText(QString::fromUtf8(text.data(), text.size()));
|
||||
|
||||
// Let's preserve some html elements destroyed by convertFromPlainText
|
||||
const QRegExp link_re{ R"(<a\shref='([a-z0-9?=&#:\/\.\-]+)'>([a-z0-9?=&#:\/\.\-]+)<\/a>)", Qt::CaseSensitive, QRegExp::RegExp2};
|
||||
html = html.replace(link_re, "<a href=\\1>\\2</a>");
|
||||
|
||||
return html;
|
||||
}
|
||||
|
||||
fatal_error_dialog::fatal_error_dialog(std::string_view text) : QMessageBox()
|
||||
{
|
||||
#ifndef __APPLE__
|
||||
|
|
@ -20,7 +31,7 @@ fatal_error_dialog::fatal_error_dialog(std::string_view text) : QMessageBox()
|
|||
%3<br>
|
||||
</p>
|
||||
)")
|
||||
.arg(Qt::convertFromPlainText(QString::fromUtf8(text.data(), text.size())))
|
||||
.arg(process_dialog_text(text))
|
||||
.arg(tr("HOW TO REPORT ERRORS:"))
|
||||
.arg(tr("Please, don't send incorrect reports. Thanks for understanding.")));
|
||||
layout()->setSizeConstraint(QLayout::SetFixedSize);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue