[partition] Fix build for old Qt

This commit is contained in:
Adriaan de Groot 2021-11-03 11:14:22 +01:00
parent a9a287fa59
commit a0cb4b63a8

View File

@ -194,7 +194,12 @@ getPVGroups( const QString& deviceName )
vgSet.insert( vgName ); vgSet.insert( vgName );
} }
// toList() was deprecated, but old-old versions don't support QStringList construction like this
#if QT_VERSION < QT_VERSION_CHECK( 5, 15, 0 )
return vgSet.toList();
#else
return QStringList { vgSet.cbegin(), vgSet.cend() }; return QStringList { vgSet.cbegin(), vgSet.cend() };
#endif
} }
} }
else else