Commit 1dccb551 authored by Julius Künzel's avatar Julius Künzel 💬
Browse files

[Qt6] Try to fix

parent 2529261a
......@@ -180,7 +180,7 @@ void SubtitleModel::importSubtitle(const QString &filePath, int offset, bool ext
#else
std::optional<QStringConverter::Encoding> inputEncoding = QStringConverter::encodingForName(encoding.data());
if (inputEncoding) {
stream.setEncoding(inputEncoding);
stream.setEncoding(inputEncoding.value());
}
// else: UTF8 is the default
#endif
......@@ -248,7 +248,7 @@ void SubtitleModel::importSubtitle(const QString &filePath, int offset, bool ext
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
stream.setCodec(QTextCodec::codecForName(encoding));
#else
stream.setEncoding(QStringConverter::encodingForName(encoding.data()));
stream.setEncoding(QStringConverter::encodingForName(encoding.data()).value());
#endif
QString line;
qDebug() << " correct ass file " << filePath;
......
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