bugfixes
This commit is contained in:
parent
86034358b7
commit
6db67ee445
5 changed files with 9 additions and 10 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue