Skip to content

Commit

Permalink
Merge pull request #504 from matterhorn103/qt6
Browse files Browse the repository at this point in the history
Port QRegExp to QRegularExpression
  • Loading branch information
ghutchis authored Sep 24, 2024
2 parents ab4b00b + b82f17a commit 1eec5b4
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions avogadro/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1810,7 +1810,7 @@ void MainWindow::setBackgroundColor()
GLWidget* glWidget(nullptr);
if ((glWidget = qobject_cast<GLWidget*>(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]);
Expand All @@ -1821,7 +1821,7 @@ void MainWindow::setBackgroundColor()
cColor[2] = static_cast<unsigned char>(color.blue());
cColor[3] = static_cast<unsigned char>(color.alpha());
scene->setBackgroundColor(cColor);
if(pipeline)
if (pipeline)
pipeline->setBackgroundColor(cColor);
if (glWidget)
glWidget->update();
Expand All @@ -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());
}
Expand Down Expand Up @@ -2356,10 +2356,12 @@ void MainWindow::registerMoleQueue()
StringList exts = ffm.fileExtensions(FileFormat::Read | FileFormat::File);

// Create patterns list
QList<QRegExp> patterns;
QList<QRegularExpression> 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:
Expand Down

0 comments on commit 1eec5b4

Please sign in to comment.