Skip to content

Commit

Permalink
Fix reference to HttpProxy after Qt6 change
Browse files Browse the repository at this point in the history
After the switch to Qt6 (#156),
proxies were left broken due to a renaming in QNetworkProxy (which is
not properly documented in
https://doc.qt.io/qtforpython-6/PySide6/QtNetwork/QNetworkProxy.html#PySide6.QtNetwork.QNetworkProxy.ProxyType).

Rename to the enum scope to avoid a runtime error when trying to set
proxy.
  • Loading branch information
knuton committed Jun 12, 2024
1 parent 00336bd commit 02207d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kiosk/kiosk_browser/proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def find(f, xs):

def set_proxy_in_qt_app(hostname, port):
network_proxy = QNetworkProxy()
network_proxy.setType(QNetworkProxy.HttpProxy)
network_proxy.setType(QNetworkProxy.ProxyType.HttpProxy)
network_proxy.setHostName(hostname)
network_proxy.setPort(port)
QNetworkProxy.setApplicationProxy(network_proxy)
Expand Down

0 comments on commit 02207d1

Please sign in to comment.