diff --git a/rpcs3/rpcs3qt/main_window.cpp b/rpcs3/rpcs3qt/main_window.cpp index 1787ab334c..d0bf4b2211 100644 --- a/rpcs3/rpcs3qt/main_window.cpp +++ b/rpcs3/rpcs3qt/main_window.cpp @@ -653,7 +653,7 @@ void main_window::InstallPackages(QStringList file_paths) const QString info_string = QStringLiteral("%0\n\n%1%2%3%4%5").arg(file_info.fileName()).arg(info.title).arg(info.local_cat) .arg(info.title_id).arg(info.version).arg(info.changelog); - if (QMessageBox::question(this, tr("PKG Decrypter / Installer"), tr("Do you want to install this package?\n\n%0").arg(info_string), + if (QMessageBox::question(this, tr("PKG Decrypter / Installer"), tr("Do you want to install this package?\n\n%0").arg(info_string), QMessageBox::Yes | QMessageBox::No, QMessageBox::No) != QMessageBox::Yes) { gui_log.notice("PKG: Cancelled installation from drop.\n%s", sstr(info_string)); diff --git a/rpcs3/rpcs3qt/patch_manager_dialog.cpp b/rpcs3/rpcs3qt/patch_manager_dialog.cpp index e21be43982..6ced600e2b 100644 --- a/rpcs3/rpcs3qt/patch_manager_dialog.cpp +++ b/rpcs3/rpcs3qt/patch_manager_dialog.cpp @@ -835,7 +835,29 @@ void patch_manager_dialog::dropEvent(QDropEvent* event) else { patch_log.error("Errors found in patch file %s", path); - QMessageBox::critical(this, tr("Validation failed"), tr("Errors were found in the patch file.\n\nLog:\n%0").arg(QString::fromStdString(log_message.str()))); + QString summary = QString::fromStdString(log_message.str()); + + if (summary.count(QLatin1Char('\n')) < 5) + { + QMessageBox::critical(this, tr("Validation failed"), tr("Errors were found in the patch file.\n\nLog:\n%0").arg(summary)); + } + else + { + QString message = tr("Errors were found in the patch file."); + QMessageBox mb(QMessageBox::Icon::Critical, tr("Validation failed"), message, QMessageBox::Ok, this); + mb.setInformativeText(tr("To see the error log, please click \"Show Details\".")); + mb.setDetailedText(tr("%0").arg(summary)); + + // Smartass hack to make the unresizeable message box wide enough for the changelog + const int log_width = QLabel(summary).sizeHint().width(); + while (QLabel(message).sizeHint().width() < log_width) + { + message += " "; + } + + mb.setText(message); + mb.exec(); + } } } } @@ -1025,7 +1047,29 @@ bool patch_manager_dialog::handle_json(const QByteArray& data) else { patch_log.error("Errors found in downloaded patch file"); - QMessageBox::critical(this, tr("Validation failed"), tr("Errors were found in the downloaded patch file.\n\nLog:\n%0").arg(QString::fromStdString(log_message.str()))); + QString summary = QString::fromStdString(log_message.str()); + + if (summary.count(QLatin1Char('\n')) < 5) + { + QMessageBox::critical(this, tr("Validation failed"), tr("Errors were found in the downloaded patch file.\n\nLog:\n%0").arg(summary)); + } + else + { + QString message = tr("Errors were found in the downloaded patch file."); + QMessageBox mb(QMessageBox::Icon::Critical, tr("Validation failed"), message, QMessageBox::Ok, this); + mb.setInformativeText(tr("To see the error log, please click \"Show Details\".")); + mb.setDetailedText(tr("%0").arg(summary)); + + // Smartass hack to make the unresizeable message box wide enough for the changelog + const int log_width = QLabel(message).sizeHint().width(); + while (QLabel(message).sizeHint().width() < log_width) + { + message += " "; + } + + mb.setText(message); + mb.exec(); + } } return true; diff --git a/rpcs3/rpcs3qt/update_manager.cpp b/rpcs3/rpcs3qt/update_manager.cpp index 12f1ef139f..112146b607 100644 --- a/rpcs3/rpcs3qt/update_manager.cpp +++ b/rpcs3/rpcs3qt/update_manager.cpp @@ -302,7 +302,7 @@ void update_manager::update(bool auto_accept) changelog_content.append(tr("• %0: %1").arg(entry.version, entry.title)); } - QMessageBox mb(QMessageBox::Icon::Question, tr("Update Available"), m_update_message, QMessageBox::Yes | QMessageBox::No,m_downloader->get_progress_dialog() ? m_downloader->get_progress_dialog() : m_parent); + QMessageBox mb(QMessageBox::Icon::Question, tr("Update Available"), m_update_message, QMessageBox::Yes | QMessageBox::No, m_downloader->get_progress_dialog() ? m_downloader->get_progress_dialog() : m_parent); if (!changelog_content.isEmpty()) {