Better to use if (node.loadingStep() != NodePrivate::NotLoading) { ... } here.