Refactoring. Delete repetitive code.
--HG-- branch : feature
This commit is contained in:
parent
1a25b82019
commit
2406334138
|
@ -1565,14 +1565,8 @@ void MainWindow::FullParseFile()
|
|||
#ifndef QT_NO_CURSOR
|
||||
QApplication::restoreOverrideCursor();
|
||||
#endif
|
||||
QMessageBox msgBox;
|
||||
msgBox.setWindowTitle(tr("Error!"));
|
||||
msgBox.setText(tr("Error parsing file."));
|
||||
msgBox.setInformativeText("std::bad_alloc");
|
||||
msgBox.setStandardButtons(QMessageBox::Ok);
|
||||
msgBox.setDefaultButton(QMessageBox::Ok);
|
||||
msgBox.setIcon(QMessageBox::Warning);
|
||||
msgBox.exec();
|
||||
QMessageBox::critical(this, tr("Critical error!"), tr("Error parsing file (std::bad_alloc)."), QMessageBox::Ok,
|
||||
QMessageBox::Ok);
|
||||
#ifndef QT_NO_CURSOR
|
||||
QApplication::setOverrideCursor(Qt::WaitCursor);
|
||||
#endif
|
||||
|
|
|
@ -687,14 +687,8 @@ void VPattern::LiteParseTree()
|
|||
#ifndef QT_NO_CURSOR
|
||||
QApplication::restoreOverrideCursor();
|
||||
#endif
|
||||
QMessageBox msgBox;
|
||||
msgBox.setWindowTitle(tr("Error!"));
|
||||
msgBox.setText(tr("Error parsing file."));
|
||||
msgBox.setInformativeText("std::bad_alloc");
|
||||
msgBox.setStandardButtons(QMessageBox::Ok);
|
||||
msgBox.setDefaultButton(QMessageBox::Ok);
|
||||
msgBox.setIcon(QMessageBox::Warning);
|
||||
msgBox.exec();
|
||||
QMessageBox::critical(nullptr, tr("Critical error!"), tr("Error parsing file (std::bad_alloc)."), QMessageBox::Ok,
|
||||
QMessageBox::Ok);
|
||||
#ifndef QT_NO_CURSOR
|
||||
QApplication::setOverrideCursor(Qt::WaitCursor);
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue
Block a user