make more use of auto and thus avoid having to specify the same type twice

This commit is contained in:
Axel Kohlmeyer
2024-07-04 11:12:40 -04:00
parent 10e3595b57
commit cefe76919c
8 changed files with 47 additions and 47 deletions

View File

@ -281,7 +281,7 @@ void SlideShow::play()
}
// reset push button state. use findChild() if not triggered from button.
QPushButton *button = qobject_cast<QPushButton *>(sender());
auto *button = qobject_cast<QPushButton *>(sender());
if (!button) button = findChild<QPushButton *>("play");
if (button) button->setChecked(playtimer);
}
@ -315,7 +315,7 @@ void SlideShow::prev()
void SlideShow::loop()
{
QPushButton *button = qobject_cast<QPushButton *>(sender());
auto *button = qobject_cast<QPushButton *>(sender());
do_loop = !do_loop;
button->setChecked(do_loop);
}