fix qt6 compile

This commit is contained in:
defnax 2026-06-27 15:33:28 +02:00 committed by GitHub
parent 177141a042
commit 460afb7824
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -361,7 +361,13 @@ QString MimeTextEdit::toHtml(const QByteArray &encoding) const
if (encoding.isEmpty()) {
html = QTextEdit::toHtml();
} else {
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
// Qt 6: toHtml() takes no arguments
html = doc->toHtml();
#else
// Qt 5: toHtml() accepts encoding parameter
html = doc->toHtml(encoding);
#endif
}
if (doc) {
doc->setDefaultStyleSheet(oldSheet);