Reduce duplicate code

1 job for master in 42 minutes and 51 seconds (queued for 10 minutes and 41 seconds)
Status Job ID Name Coverage
  Build
passed #49343
linux kf5-qt5 qt5.12

00:42:51

37.0%