Fixed compile warnings about QVariant::canConvert()

This commit is contained in:
Magnus Hellströmer
2024-09-09 01:39:22 +02:00
parent 3c4a0ed2b4
commit e332d3bf31

View File

@@ -57,9 +57,9 @@ bool NumerotationContext::addValue(const QString &type,
const QVariant &value,
const int increase,
const int initialvalue) {
if (!keyIsAcceptable(type) && !value.canConvert(QVariant::String))
if (!keyIsAcceptable(type) && !value.canConvert<QString>())
return false;
if (keyIsNumber(type) && !value.canConvert(QVariant::Int))
if (keyIsNumber(type) && !value.canConvert<int>())
return false;
QString valuestr = value.toString();