Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
3ee35345 by Alexandre Janniaux at 2026-01-19T17:47:02+00:00
contrib: qt: fix qt-tools compilation on macos

We disabled html parser support in the contrib for qt-tools, but the
cocoa platform is still built and uses the parser without guards,
leading to the following compilation error:


        qt/src/plugins/platforms/cocoa/qcocoamessagedialog.mm:46:18:
        error: no member named 'setHtml' in 'QTextDocument'
        46 |     textDocument.setHtml(text);
           |     ~~~~~~~~~~~~ ^

In qtextdocument, the methods are guarded by this define:

        #ifndef QT_NO_TEXTHTMLPARSER
        QString toHtml() const;
        void setHtml(const QString &html);
        #endif

- - - - -


2 changed files:

- + contrib/src/qt/0001-macos-guard-text-html.patch
- contrib/src/qt/rules.mak


Changes:

=====================================
contrib/src/qt/0001-macos-guard-text-html.patch
=====================================
@@ -0,0 +1,16 @@
+--- a/src/plugins/platforms/cocoa/qcocoamessagedialog.mm       2026-01-17 
00:40:51
++++ b/src/plugins/platforms/cocoa/qcocoamessagedialog.mm       2026-01-17 
00:43:14
+@@ -42,9 +42,13 @@
+     if (!Qt::mightBeRichText(text))
+         return text;
+ 
++#ifndef QT_NO_TEXTHTMLPARSER
+     QTextDocument textDocument;
+     textDocument.setHtml(text);
+     return textDocument.toPlainText();
++#else
++    return "";
++#endif
+ }
+ 
+ static NSControlStateValue controlStateFor(Qt::CheckState state)


=====================================
contrib/src/qt/rules.mak
=====================================
@@ -55,6 +55,7 @@ qt: qtbase-everywhere-src-$(QTBASE_VERSION_FULL).tar.xz 
.sum-qt
        $(APPLY) 
$(SRC)/qt/0001-Use-DirectWrite-font-database-only-with-Windows-10-a.patch
        $(APPLY) $(SRC)/qt/0003-Do-not-link-D3D9.patch
        $(APPLY) 
$(SRC)/qt/0001-WIP-Core-Add-operator-to-our-bidirectional-meta-iter.patch
+       $(APPLY) $(SRC)/qt/0001-macos-guard-text-html.patch
        $(MOVE)
 
 ifdef HAVE_WIN32



View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/3ee353455cb44e3eedbdd73a9bea555c123ddd79

-- 
View it on GitLab: 
https://code.videolan.org/videolan/vlc/-/commit/3ee353455cb44e3eedbdd73a9bea555c123ddd79
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance
_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to