Don't use deprecated QVariant::type() in Qt 6

This commit is contained in:
Martchus 2020-12-14 21:20:14 +01:00
parent 0a7d05256c
commit e4720ea587
1 changed files with 7 additions and 1 deletions

View File

@ -312,7 +312,13 @@ void DbQueryWidget::showResults()
if (value.isNull()) {
continue;
}
if (value.type() == QVariant::String && value.toString().isEmpty()) {
if (
#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
value.metaType() == QMetaType::fromType<QString>()
#else
value.type() == QVariant::String
#endif
&& value.toString().isEmpty()) {
continue;
}
columnHasValues = true;