17 static Introspectable inst;
23 if (!variant.isValid ())
24 throw std::runtime_error {
"Invalid variant." };
26 const auto type = variant.userType ();
28 if (type <
static_cast<int> (QVariant::UserType))
29 return { {
"data", variant } };
31 if (Intros_.contains (type))
32 return Intros_ [type] (variant);
34 qWarning () << Q_FUNC_INFO
35 <<
"unregistered type"
38 throw std::runtime_error {
"Unregistered type: " + std::to_string (type) };