Add extra declarations to make rcc output pass -Wmissing-declarations

The previously produced code was valid C++.  Add the declaration
nevertheless to help people who want to use the switch in their
own code.

Task-number: QTBUG-42119
Change-Id: Ia47cf3930684474ff65e5cf37335d7d7f57a1d31
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>