fit-webview-bridge 0.2.0a1__tar.gz → 0.2.0a2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of fit-webview-bridge might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: fit-webview-bridge
3
- Version: 0.2.0a1
3
+ Version: 0.2.0a2
4
4
  Summary: Qt native WebView bridge with PySide6 bindings
5
5
  Author: FIT Project
6
6
  License: LGPL-3.0-or-later
@@ -33,7 +33,7 @@ class Main(QMainWindow):
33
33
  self.view.titleChanged.connect(self.setWindowTitle)
34
34
  self.view.loadProgress.connect(lambda p: print("progress:", p))
35
35
 
36
- self.view.setUrl(QUrl("https://www.facebook.com/reel/574839388710756/"))
36
+ self.view.setUrl(QUrl("http://fit-project.org/"))
37
37
 
38
38
 
39
39
  app = QApplication([])
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "fit-webview-bridge"
3
- version = "0.2.0a1"
3
+ version = "0.2.0a2"
4
4
  description = "Qt native WebView bridge with PySide6 bindings"
5
5
  requires-python = ">=3.11,<3.14"
6
6
  dependencies = ["PySide6==6.9.0", "shiboken6==6.9.0", "shiboken6-generator==6.9.0"]
@@ -45,14 +45,21 @@ struct WKWebViewWidget::Impl {
45
45
 
46
46
  static NSURL* toNSURL(QUrl u) {
47
47
  if (!u.isValid()) return nil;
48
+
48
49
  if (u.scheme().isEmpty())
49
50
  u = QUrl::fromUserInput(u.toString());
51
+
52
+ if (u.scheme() == "http")
53
+ u.setScheme("https");
54
+
50
55
  if (u.isLocalFile())
51
56
  return [NSURL fileURLWithPath:[NSString stringWithUTF8String:u.toLocalFile().toUtf8().constData()]];
57
+
52
58
  const QByteArray enc = u.toString(QUrl::FullyEncoded).toUtf8();
53
59
  return [NSURL URLWithString:[NSString stringWithUTF8String:enc.constData()]];
54
60
  }
55
61
 
62
+
56
63
  WKWebViewWidget::WKWebViewWidget(QWidget* parent)
57
64
  : QWidget(parent), d(new Impl) {
58
65
  setAttribute(Qt::WA_NativeWindow, true);