gcc 12 errors out with this:
src/mainwindow.cpp:430:16: error: ordered comparison of pointer with integer zero (‘QAction*’ and ‘int’)
430 | if (act<0) return;
This comparison doesn't really make sense on a pointer, but it makes a lot of sense on the index returned in the previous line, so I think this is a genuine bug. The attached patch fixes it.