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
|
#ifndef QT_NO_CURSOR
|
||||||
QApplication::restoreOverrideCursor();
|
QApplication::restoreOverrideCursor();
|
||||||
#endif
|
#endif
|
||||||
QMessageBox msgBox;
|
QMessageBox::critical(this, tr("Critical error!"), tr("Error parsing file (std::bad_alloc)."), QMessageBox::Ok,
|
||||||
msgBox.setWindowTitle(tr("Error!"));
|
QMessageBox::Ok);
|
||||||
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();
|
|
||||||
#ifndef QT_NO_CURSOR
|
#ifndef QT_NO_CURSOR
|
||||||
QApplication::setOverrideCursor(Qt::WaitCursor);
|
QApplication::setOverrideCursor(Qt::WaitCursor);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -687,14 +687,8 @@ void VPattern::LiteParseTree()
|
||||||
#ifndef QT_NO_CURSOR
|
#ifndef QT_NO_CURSOR
|
||||||
QApplication::restoreOverrideCursor();
|
QApplication::restoreOverrideCursor();
|
||||||
#endif
|
#endif
|
||||||
QMessageBox msgBox;
|
QMessageBox::critical(nullptr, tr("Critical error!"), tr("Error parsing file (std::bad_alloc)."), QMessageBox::Ok,
|
||||||
msgBox.setWindowTitle(tr("Error!"));
|
QMessageBox::Ok);
|
||||||
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();
|
|
||||||
#ifndef QT_NO_CURSOR
|
#ifndef QT_NO_CURSOR
|
||||||
QApplication::setOverrideCursor(Qt::WaitCursor);
|
QApplication::setOverrideCursor(Qt::WaitCursor);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue
Block a user