This commit is contained in:
claudi 2026-01-28 11:43:31 +01:00
parent 86034358b7
commit 6db67ee445
5 changed files with 9 additions and 10 deletions

View file

@ -3,8 +3,8 @@
from pathlib import Path
from typing import List, Optional
from PySide6.QtCore import Qt, Signal
from PySide6.QtGui import QDrag, QMimeData
from PySide6.QtCore import QMimeData, Qt, QUrl, Signal
from PySide6.QtGui import QDrag
from PySide6.QtWidgets import QWidget
from webdrop_bridge.core.validator import PathValidator, ValidationError
@ -102,5 +102,3 @@ class DragInterceptor(QWidget):
return False
# Import QUrl here to avoid circular import at module level
from PySide6.QtCore import QUrl # noqa: E402, F401

View file

@ -25,8 +25,8 @@ def main() -> int:
# Set up logging
log_file = None
if config.log_file_path:
log_file = Path(config.log_file_path)
if config.log_file:
log_file = config.log_file
setup_logging(
name="webdrop_bridge",

View file

@ -151,13 +151,13 @@ class MainWindow(QMainWindow):
# Back button
back_action = self.web_view.pageAction(
self.web_view.WebAction.Back
self.web_view.WebAction.Back # type: ignore
)
toolbar.addAction(back_action)
# Forward button
forward_action = self.web_view.pageAction(
self.web_view.WebAction.Forward
self.web_view.WebAction.Forward # type: ignore
)
toolbar.addAction(forward_action)
@ -170,7 +170,7 @@ class MainWindow(QMainWindow):
# Refresh button
refresh_action = self.web_view.pageAction(
self.web_view.WebAction.Reload
self.web_view.WebAction.Reload # type: ignore
)
toolbar.addAction(refresh_action)

View file

@ -39,7 +39,7 @@ class RestrictedWebEngineView(QWebEngineView):
Args:
request: Navigation request to process
"""
url = request.url
url = request.url()
# If no restrictions, allow all URLs
if not self.allowed_urls: