From 6b0cc8f9fca72363f42e45f8b5204662a52853e4 Mon Sep 17 00:00:00 2001 From: "Matthew J. Milner" Date: Tue, 17 Sep 2024 00:06:05 +0200 Subject: [PATCH 1/2] Port QRegExp to QRegularExpression Signed-off-by: Matthew J. Milner --- avogadro/mainwindow.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/avogadro/mainwindow.cpp b/avogadro/mainwindow.cpp index 51f12e5e..d666bba5 100644 --- a/avogadro/mainwindow.cpp +++ b/avogadro/mainwindow.cpp @@ -2356,10 +2356,12 @@ void MainWindow::registerMoleQueue() StringList exts = ffm.fileExtensions(FileFormat::Read | FileFormat::File); // Create patterns list - QList patterns; + QList patterns; for (auto it = exts.begin(), itEnd = exts.end(); it != itEnd; ++it) { - patterns << QRegExp(extensionToWildCard(QString::fromStdString(*it)), - Qt::CaseInsensitive, QRegExp::Wildcard); + patterns << QRegularExpression( + QRegularExpression::wildcardToRegularExpression( + extensionToWildCard(QString::fromStdString(*it))), + QRegularExpression::CaseInsensitive); } // Register the executable: From b82f17a0bbd3661c570b5a253d9cf09293d9eff7 Mon Sep 17 00:00:00 2001 From: "Matthew J. Milner" Date: Tue, 17 Sep 2024 00:22:06 +0200 Subject: [PATCH 2/2] clang-format Signed-off-by: Matthew J. Milner --- avogadro/mainwindow.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/avogadro/mainwindow.cpp b/avogadro/mainwindow.cpp index d666bba5..f545b9b9 100644 --- a/avogadro/mainwindow.cpp +++ b/avogadro/mainwindow.cpp @@ -1810,7 +1810,7 @@ void MainWindow::setBackgroundColor() GLWidget* glWidget(nullptr); if ((glWidget = qobject_cast(m_multiViewWidget->activeWidget()))) scene = &glWidget->renderer().scene(); - pipeline = &glWidget->renderer().solidPipeline(); + pipeline = &glWidget->renderer().solidPipeline(); if (scene) { Vector4ub cColor = scene->backgroundColor(); QColor qtColor(cColor[0], cColor[1], cColor[2], cColor[3]); @@ -1821,7 +1821,7 @@ void MainWindow::setBackgroundColor() cColor[2] = static_cast(color.blue()); cColor[3] = static_cast(color.alpha()); scene->setBackgroundColor(cColor); - if(pipeline) + if (pipeline) pipeline->setBackgroundColor(cColor); if (glWidget) glWidget->update(); @@ -1843,7 +1843,7 @@ void MainWindow::setRenderingSettings() dialog.exec(); QSettings settings; settings.setValue("MainWindow/ao_enabled", pipeline->getAoEnabled()); - settings.setValue("MainWindow/fog_enabled", pipeline->getFogEnabled()); + settings.setValue("MainWindow/fog_enabled", pipeline->getFogEnabled()); settings.setValue("MainWindow/ao_strength", pipeline->getAoStrength()); settings.setValue("MainWindow/ed_enabled", pipeline->getEdEnabled()); } @@ -2361,7 +2361,7 @@ void MainWindow::registerMoleQueue() patterns << QRegularExpression( QRegularExpression::wildcardToRegularExpression( extensionToWildCard(QString::fromStdString(*it))), - QRegularExpression::CaseInsensitive); + QRegularExpression::CaseInsensitive); } // Register the executable: