https://qt6.jp/2015/07/codereview-120860/
関数渡しの qmlRegisterSingletonType() で QObject * 型の返り値が nullptr の際のクラッシュを改善しました