Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Port QRegExp to QRegularExpression" #507

Merged
merged 1 commit into from
Sep 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 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,12 +2356,10 @@ void MainWindow::registerMoleQueue()
StringList exts = ffm.fileExtensions(FileFormat::Read | FileFormat::File);

// Create patterns list
QList<QRegularExpression> patterns;
QList<QRegExp> patterns;
for (auto it = exts.begin(), itEnd = exts.end(); it != itEnd; ++it) {
patterns << QRegularExpression(
QRegularExpression::wildcardToRegularExpression(
extensionToWildCard(QString::fromStdString(*it))),
QRegularExpression::CaseInsensitive);
patterns << QRegExp(extensionToWildCard(QString::fromStdString(*it)),
Qt::CaseInsensitive, QRegExp::Wildcard);
}

// Register the executable:
Expand Down
Loading