@@ -543,10 +543,11 @@ void QtSLiMAppDelegate::updateRecentFileActions()
543543
544544 const QStringList recentFiles = readRecentFiles (settings);
545545 const int count = qMin (int (MaxRecentFiles), recentFiles.size ());
546+ QList<QAction *> actions = menu->actions ();
546547
547548 for (int i = 0 ; i < MaxRecentFiles; ++i)
548549 {
549- QAction *recentAction = menu-> actions () [i];
550+ QAction *recentAction = actions[i];
550551
551552 if (i < count)
552553 {
@@ -711,9 +712,9 @@ void QtSLiMAppDelegate::findRecipe(void)
711712
712713 if (result == QDialog::Accepted)
713714 {
714- QStringList resourceNames = findRecipePanel.selectedRecipeFilenames ();
715+ const QStringList resourceNames = findRecipePanel.selectedRecipeFilenames ();
715716
716- for (QString resourceName : resourceNames)
717+ for (const QString & resourceName : resourceNames)
717718 {
718719 // qDebug() << "recipe name:" << resourceName;
719720
@@ -769,8 +770,9 @@ void QtSLiMAppDelegate::openRecipe(void)
769770void QtSLiMAppDelegate::playStateChanged (void )
770771{
771772 bool anyPlaying = false ;
773+ const QWidgetList topLevelWidgets = qApp->topLevelWidgets ();
772774
773- for (QWidget *widget : qApp-> topLevelWidgets () )
775+ for (QWidget *widget : topLevelWidgets)
774776 {
775777 QtSLiMWindow *mainWin = qobject_cast<QtSLiMWindow *>(widget);
776778
@@ -1168,7 +1170,6 @@ QWidget *QtSLiMAppDelegate::globalImageWindowWithPath(const QString &path, const
11681170 return nullptr ;
11691171 }
11701172
1171- QFileInfo fileInfo (path);
11721173 int window_width = round (image.width () * scaleFactor);
11731174 int window_height = round (image.height () * scaleFactor);
11741175
0 commit comments