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 pathlib import Path
|
||||||
from typing import List, Optional
|
from typing import List, Optional
|
||||||
|
|
||||||
from PySide6.QtCore import Qt, Signal
|
from PySide6.QtCore import QMimeData, Qt, QUrl, Signal
|
||||||
from PySide6.QtGui import QDrag, QMimeData
|
from PySide6.QtGui import QDrag
|
||||||
from PySide6.QtWidgets import QWidget
|
from PySide6.QtWidgets import QWidget
|
||||||
|
|
||||||
from webdrop_bridge.core.validator import PathValidator, ValidationError
|
from webdrop_bridge.core.validator import PathValidator, ValidationError
|
||||||
|
|
@ -102,5 +102,3 @@ class DragInterceptor(QWidget):
|
||||||
return False
|
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
|
# Set up logging
|
||||||
log_file = None
|
log_file = None
|
||||||
if config.log_file_path:
|
if config.log_file:
|
||||||
log_file = Path(config.log_file_path)
|
log_file = config.log_file
|
||||||
|
|
||||||
setup_logging(
|
setup_logging(
|
||||||
name="webdrop_bridge",
|
name="webdrop_bridge",
|
||||||
|
|
|
||||||
|
|
@ -151,13 +151,13 @@ class MainWindow(QMainWindow):
|
||||||
|
|
||||||
# Back button
|
# Back button
|
||||||
back_action = self.web_view.pageAction(
|
back_action = self.web_view.pageAction(
|
||||||
self.web_view.WebAction.Back
|
self.web_view.WebAction.Back # type: ignore
|
||||||
)
|
)
|
||||||
toolbar.addAction(back_action)
|
toolbar.addAction(back_action)
|
||||||
|
|
||||||
# Forward button
|
# Forward button
|
||||||
forward_action = self.web_view.pageAction(
|
forward_action = self.web_view.pageAction(
|
||||||
self.web_view.WebAction.Forward
|
self.web_view.WebAction.Forward # type: ignore
|
||||||
)
|
)
|
||||||
toolbar.addAction(forward_action)
|
toolbar.addAction(forward_action)
|
||||||
|
|
||||||
|
|
@ -170,7 +170,7 @@ class MainWindow(QMainWindow):
|
||||||
|
|
||||||
# Refresh button
|
# Refresh button
|
||||||
refresh_action = self.web_view.pageAction(
|
refresh_action = self.web_view.pageAction(
|
||||||
self.web_view.WebAction.Reload
|
self.web_view.WebAction.Reload # type: ignore
|
||||||
)
|
)
|
||||||
toolbar.addAction(refresh_action)
|
toolbar.addAction(refresh_action)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ class RestrictedWebEngineView(QWebEngineView):
|
||||||
Args:
|
Args:
|
||||||
request: Navigation request to process
|
request: Navigation request to process
|
||||||
"""
|
"""
|
||||||
url = request.url
|
url = request.url()
|
||||||
|
|
||||||
# If no restrictions, allow all URLs
|
# If no restrictions, allow all URLs
|
||||||
if not self.allowed_urls:
|
if not self.allowed_urls:
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
"""Unit tests for logging module."""
|
"""Unit tests for logging module."""
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
import logging.handlers
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from tempfile import TemporaryDirectory
|
from tempfile import TemporaryDirectory
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue