Linguist: Disable form and QML preview by default


To show a translated string in context, Qt Linguist can render the
the .ui or .qml file referenced by the current message. The
path of that file is taken from the translation file, which may come
from an untrusted source, and rendering a QML file instantiates its
objects and can execute code. Both previews were enabled by default, so
opening a translation file could load and run a referenced form without
any action from the user.

Add a Form preview action and default to false. Also default the
existing QML preview action, to disabled.
A form is loaded and rendered only after the user turns on the matching
action, which also reveals the Sources and Forms panel.
The action states are not stored, so both previews start disabled on
every launch.

Fixes: QTBUG-148639
Change-Id: I8bcd6712d81eb02a95747c6642cc1e3fb481ea8c
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
commitbce85894439cf665a62773d19aa5df208df28e31
parent99a84e8913006d17d78277d73befadcea98a1c8a
authorMasoud Jami <masoud.jami@qt.io>
committerMasoud Jami <masoud.jami@qt.io>
commit timeMon, 24 Aug 2026 09:44:31 +0000