Move this inside the function and remove the `#ifdef` on the declaration, otherwise moc gets confused.