Commit 15a7f382 authored by David Redondo's avatar David Redondo 🏎 Committed by Aleix Pol Gonzalez
Browse files

kcms/mouse: Reduce number specializations of valueLoaderPart

Instead provide a sensible default implementation
parent c726bc90
......@@ -19,38 +19,7 @@ namespace
template<typename T>
T valueLoaderPart(QVariant const &reply)
{
Q_UNUSED(reply);
return T();
}
template<>
bool valueLoaderPart(QVariant const &reply)
{
return reply.toBool();
}
template<>
int valueLoaderPart(QVariant const &reply)
{
return reply.toInt();
}
template<>
quint32 valueLoaderPart(QVariant const &reply)
{
return reply.toInt();
}
template<>
qreal valueLoaderPart(QVariant const &reply)
{
return reply.toReal();
}
template<>
QString valueLoaderPart(QVariant const &reply)
{
return reply.toString();
return reply.value<T>();
}
template<>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment