Material: fix build failure with Qt6

This commit is contained in:
wmayer
2023-09-29 10:09:39 +02:00
parent e6e8c64cba
commit e3306cc11e
2 changed files with 15 additions and 0 deletions

View File

@@ -81,7 +81,9 @@ Material* MaterialLibrary::saveMaterial(Material& material, const QString& path,
if (file.open(QIODevice::WriteOnly | QIODevice::Text)) {
QTextStream stream(&file);
#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
stream.setCodec("UTF-8");
#endif
stream.setGenerateByteOrderMark(true);
// Write the contents