refactor: move msg_box out of engine qtutils into the dialog layer

The engine-side QtUtils no longer references QMessageBox; the two
dialog call sites use the identical olive::msg_box() inline helper.
This commit is contained in:
2026-07-20 01:01:18 +08:00
parent 03d4087124
commit 69cd8d3a75
5 changed files with 71 additions and 36 deletions
+3 -2
View File
@@ -33,6 +33,7 @@
#include "config/config.h"
#include "core.h"
#include "common/qtutils.h"
#include "dialog/msgbox.h"
#include "undo/undostack.h"
namespace olive
@@ -107,7 +108,7 @@ void SequenceDialog::set_name_is_editable(bool e)
void SequenceDialog::accept()
{
if (name_field_->isEnabled() && name_field_->text().isEmpty()) {
QtUtils::msg_box(this, QMessageBox::Critical,
msg_box(this, QMessageBox::Critical,
tr("Error editing Sequence"),
tr("Please enter a name for this Sequence."));
return;
@@ -178,7 +179,7 @@ void SequenceDialog::accept()
void SequenceDialog::set_as_default_clicked()
{
if (QtUtils::msg_box(
if (msg_box(
this, QMessageBox::Question, tr("Confirm Set As Default"),
tr("Are you sure you want to set the current parameters as defaults?"),
QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) {