View Single Post
Old 07-28-2025, 02:28 PM   #22
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,915
Karma: 6120478
Join Date: Nov 2009
Device: many
Okay, with only the following additional change, your Hyphenopoly should now work in Sigil.

Code:
diff --git a/src/main.cpp b/src/main.cpp
index 26290878c..65145a89f 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -372,11 +372,20 @@ int main(int argc, char *argv[])
 
     // register the our own url scheme (this is required since Qt 5.12)
     QWebEngineUrlScheme sigilScheme("sigil");
+
+#if QT_VERSION < QT_VERSION_CHECK(6, 6, 0)
+    sigilScheme.setFlags( QWebEngineUrlScheme::SecureScheme |
+                          QWebEngineUrlScheme::LocalScheme |
+                          QWebEngineUrlScheme::LocalAccessAllowed |
+                          QWebEngineUrlScheme::ContentSecurityPolicyIgnored );
+#else
     sigilScheme.setFlags( QWebEngineUrlScheme::SecureScheme |
                           QWebEngineUrlScheme::LocalScheme |
                           QWebEngineUrlScheme::LocalAccessAllowed |
                           QWebEngineUrlScheme::ContentSecurityPolicyIgnored |
                           QWebEngineUrlScheme::FetchApiAllowed  );
+#endif
+
     // sigilScheme.setSyntax(QWebEngineUrlScheme::Syntax::Host);
     sigilScheme.setSyntax(QWebEngineUrlScheme::Syntax::Path);
     QWebEngineUrlScheme::registerScheme(sigilScheme);

I have now pushed this additional change to Sigil master.

So in the next release of Sigil, Hyphenopoly should work for anyone using Sigil built with Qt 6.6 and later. We currently ship with Qt 6.8.2 and plan to move to Qt 6.9.2 (or .3) sometime in the future.
KevinH is offline   Reply With Quote