|
|
@ -19,7 +19,7 @@ QtErrorDisplay::~QtErrorDisplay() = default;
|
|
|
|
void QtErrorDisplay::ShowError(ResultCode error, std::function<void()> finished) const {
|
|
|
|
void QtErrorDisplay::ShowError(ResultCode error, std::function<void()> finished) const {
|
|
|
|
callback = std::move(finished);
|
|
|
|
callback = std::move(finished);
|
|
|
|
emit MainWindowDisplayError(
|
|
|
|
emit MainWindowDisplayError(
|
|
|
|
tr("An error has occured.\nPlease try again or contact the developer of the "
|
|
|
|
tr("An error has occurred.\nPlease try again or contact the developer of the "
|
|
|
|
"software.\n\nError Code: %1-%2 (0x%3)")
|
|
|
|
"software.\n\nError Code: %1-%2 (0x%3)")
|
|
|
|
.arg(static_cast<u32>(error.module.Value()) + 2000, 4, 10, QChar::fromLatin1('0'))
|
|
|
|
.arg(static_cast<u32>(error.module.Value()) + 2000, 4, 10, QChar::fromLatin1('0'))
|
|
|
|
.arg(error.description, 4, 10, QChar::fromLatin1('0'))
|
|
|
|
.arg(error.description, 4, 10, QChar::fromLatin1('0'))
|
|
|
@ -32,7 +32,7 @@ void QtErrorDisplay::ShowErrorWithTimestamp(ResultCode error, std::chrono::secon
|
|
|
|
|
|
|
|
|
|
|
|
const QDateTime date_time = QDateTime::fromSecsSinceEpoch(time.count());
|
|
|
|
const QDateTime date_time = QDateTime::fromSecsSinceEpoch(time.count());
|
|
|
|
emit MainWindowDisplayError(
|
|
|
|
emit MainWindowDisplayError(
|
|
|
|
tr("An error occured on %1 at %2.\nPlease try again or contact the "
|
|
|
|
tr("An error occurred on %1 at %2.\nPlease try again or contact the "
|
|
|
|
"developer of the software.\n\nError Code: %3-%4 (0x%5)")
|
|
|
|
"developer of the software.\n\nError Code: %3-%4 (0x%5)")
|
|
|
|
.arg(date_time.toString(QStringLiteral("dddd, MMMM d, yyyy")))
|
|
|
|
.arg(date_time.toString(QStringLiteral("dddd, MMMM d, yyyy")))
|
|
|
|
.arg(date_time.toString(QStringLiteral("h:mm:ss A")))
|
|
|
|
.arg(date_time.toString(QStringLiteral("h:mm:ss A")))
|
|
|
@ -46,7 +46,7 @@ void QtErrorDisplay::ShowCustomErrorText(ResultCode error, std::string dialog_te
|
|
|
|
std::function<void()> finished) const {
|
|
|
|
std::function<void()> finished) const {
|
|
|
|
callback = std::move(finished);
|
|
|
|
callback = std::move(finished);
|
|
|
|
emit MainWindowDisplayError(
|
|
|
|
emit MainWindowDisplayError(
|
|
|
|
tr("An error has occured.\nError Code: %1-%2 (0x%3)\n\n%4\n\n%5")
|
|
|
|
tr("An error has occurred.\nError Code: %1-%2 (0x%3)\n\n%4\n\n%5")
|
|
|
|
.arg(static_cast<u32>(error.module.Value()) + 2000, 4, 10, QChar::fromLatin1('0'))
|
|
|
|
.arg(static_cast<u32>(error.module.Value()) + 2000, 4, 10, QChar::fromLatin1('0'))
|
|
|
|
.arg(error.description, 4, 10, QChar::fromLatin1('0'))
|
|
|
|
.arg(error.description, 4, 10, QChar::fromLatin1('0'))
|
|
|
|
.arg(error.raw, 8, 16, QChar::fromLatin1('0'))
|
|
|
|
.arg(error.raw, 8, 16, QChar::fromLatin1('0'))
|
|
|
|