use QtRegExp for QT 5.12 on Ubuntu 20.04LTS
This commit is contained in:
@ -1106,7 +1106,11 @@ void LammpsGui::render_image()
|
||||
// add a run 0 and thus create the state of the initial system without running.
|
||||
// this will allow us to create a snapshot image.
|
||||
auto saved = ui->textEdit->textCursor();
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
|
||||
if (ui->textEdit->find(QRegExp(QStringLiteral("^\\s*(run|minimize)\\s+")))) {
|
||||
#else
|
||||
if (ui->textEdit->find(QRegularExpression(QStringLiteral("^\\s*(run|minimize)\\s+")))) {
|
||||
#endif
|
||||
auto cursor = ui->textEdit->textCursor();
|
||||
cursor.movePosition(QTextCursor::PreviousBlock);
|
||||
cursor.movePosition(QTextCursor::EndOfLine);
|
||||
|
||||
Reference in New Issue
Block a user