feat: Improve macOS app chooser functionality and enhance drag operation success criteria
Some checks are pending
Tests & Quality Checks / Test on Python 3.11 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.12 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.11-1 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.12-1 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.10 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.11-2 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.12-2 (push) Waiting to run
Tests & Quality Checks / Build Artifacts (push) Blocked by required conditions
Tests & Quality Checks / Build Artifacts-1 (push) Blocked by required conditions
Some checks are pending
Tests & Quality Checks / Test on Python 3.11 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.12 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.11-1 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.12-1 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.10 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.11-2 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.12-2 (push) Waiting to run
Tests & Quality Checks / Build Artifacts (push) Blocked by required conditions
Tests & Quality Checks / Build Artifacts-1 (push) Blocked by required conditions
This commit is contained in:
parent
cbd8ed0186
commit
d6f4140947
3 changed files with 80 additions and 20 deletions
|
|
@ -146,7 +146,7 @@ class DragInterceptor(QWidget):
|
|||
file_paths: Single local file path or list of local file paths
|
||||
|
||||
Returns:
|
||||
True if drag was created successfully
|
||||
True if drag was initiated successfully
|
||||
"""
|
||||
try:
|
||||
# Normalize to list
|
||||
|
|
@ -170,10 +170,15 @@ class DragInterceptor(QWidget):
|
|||
# drag.setPixmap(...)
|
||||
|
||||
# Start drag operation (blocks until drop or cancel)
|
||||
# Qt.CopyAction allows copying files
|
||||
# In RDP/remote environments, drag.exec() may not return the expected result
|
||||
# even though the drag was successful. We accept the drag as successful if
|
||||
# it completes without exception.
|
||||
result = drag.exec(Qt.DropAction.CopyAction)
|
||||
|
||||
return result == Qt.DropAction.CopyAction
|
||||
# Accept any drop action result (including NoDropAction) as successful
|
||||
# in remote environments like RDP where OS feedback is unreliable.
|
||||
logger.debug(f"Drag operation completed with result: {result}")
|
||||
return True
|
||||
|
||||
except Exception as e:
|
||||
logger.exception(f"Error creating native drag: {e}")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue