Commit dbd172bc authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

It's utf-8 by default in qt6

It's UTF8 by default in qt6
parent f2cc59c8
......@@ -1830,7 +1830,9 @@ void Bin::slotReloadClip()
KMessageBox::sorry(this, i18n("Unable to write to file %1", path));
} else {
QTextStream out(&f);
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
out.setCodec("UTF-8");
#endif
out << doc.toString();
f.close();
KMessageBox::information(
......
......@@ -106,7 +106,9 @@ void SubtitleModel::importSubtitle(const QString &filePath, int offset, bool ext
qDebug() << "srt/vtt/sbv File";
//parsing srt file
QTextStream stream(&srtFile);
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
stream.setCodec(QTextCodec::codecForName("UTF-8"));
#endif
QString line;
QStringList srtTime;
QRegExp rx("([0-9]{1,2}):([0-9]{2})");
......@@ -168,7 +170,9 @@ void SubtitleModel::importSubtitle(const QString &filePath, int offset, bool ext
return;
}
QTextStream stream(&assFile);
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
stream.setCodec(QTextCodec::codecForName("UTF-8"));
#endif
QString line;
qDebug() << " correct ass file " << filePath;
scriptInfoSection.clear();
......
......@@ -1868,7 +1868,9 @@ bool RenderWidget::startWaitingRenderJobs()
}
QTextStream outStream(&file);
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
outStream.setCodec("UTF-8");
#endif
#ifndef Q_OS_WIN
outStream << "#!/bin/sh\n\n";
#endif
......
......@@ -260,7 +260,9 @@ void EffectTreeModel::editCustomAsset(const QString &newName, const QString &new
QFile file(dir.absoluteFilePath(currentName + QStringLiteral(".xml")));
if (file.open(QFile::WriteOnly | QFile::Truncate)) {
QTextStream out(&file);
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
out.setCodec("UTF-8");
#endif
out << doc.toString();
}
file.close();
......
......@@ -203,7 +203,9 @@ void FilterTask::run()
f1.open(QIODevice::WriteOnly);
QTextStream stream(&f1);
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
stream.setCodec("UTF-8");
#endif
stream << dom.toString();
f1.close();
dom.clear();
......
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