fix formatting

Signed-off-by: maskers <97827489+mskrss@users.noreply.github.com>
(cherry picked from commit 6d017b5f0b9fd878d387bf33585221ea079e305b)
This commit is contained in:
maskers 2024-08-21 22:39:27 +03:00 committed by github-actions[bot]
parent e234c66818
commit 417bb2fce6

View File

@ -101,8 +101,8 @@ std::optional<QString> GuiUtil::uploadPaste(const QString& name, const QString&
return {}; return {};
if (baseUrl.toString() == "https://api.mclo.gs" && text.count("\n") > MaxMclogsLines) { if (baseUrl.toString() == "https://api.mclo.gs" && text.count("\n") > MaxMclogsLines) {
auto truncateResponse = auto truncateResponse = CustomMessageBox::selectable(
CustomMessageBox::selectable(parentWidget, QObject::tr("Confirm Truncate"), parentWidget, QObject::tr("Confirm Truncate"),
QObject::tr("The log exceeds mclo.gs' limit: %1 lines (max %2).\n" QObject::tr("The log exceeds mclo.gs' limit: %1 lines (max %2).\n"
"Prism can keep the first %3 and last %4 lines, trimming the middle.\n\n" "Prism can keep the first %3 and last %4 lines, trimming the middle.\n\n"
"If you choose 'No', mclo.gs will only keep the first %2 lines, cutting off " "If you choose 'No', mclo.gs will only keep the first %2 lines, cutting off "
@ -115,7 +115,9 @@ std::optional<QString> GuiUtil::uploadPaste(const QString& name, const QString&
QMessageBox::Warning, QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel, QMessageBox::No) QMessageBox::Warning, QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel, QMessageBox::No)
->exec(); ->exec();
if (truncateResponse == QMessageBox::Cancel) { return {} ; } if (truncateResponse == QMessageBox::Cancel) {
return {};
}
shouldTruncate = truncateResponse == QMessageBox::Yes; shouldTruncate = truncateResponse == QMessageBox::Yes;
} }
} }