Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ void MainWindowPrivate::initWidgets()
int index = stackedWidget->currentIndex();
if (index == PageName::errorwidget)
return;
if (index == PageName::transferringwidget || index == PageName::waitwidget)
if (index == PageName::transferringwidget || index == PageName::waitwidget || index == PageName::connectwidget)
stackedWidget->setCurrentIndex(PageName::errorwidget);
Comment on lines +116 to 117

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟠 High · Disconnect navigation runs off GUI thread

When a backend disconnect is emitted by the detached IPC worker thread while connectwidget is current, the contextless disconnected lambda runs in the thread emitting the signal, then calls setCurrentIndex() and setErrorType() on widgets from that thread. For the newly included connect page, this makes disconnect navigation a cross-thread widget access, so the UI can fail to update or crash.

Connect the lambda with a GUI-thread QObject context so Qt queues the widget updates to the UI thread.

Prompt for AI agents
In `src/plugins/data-transfer/core/gui/linux/mainwindow_p_linux.cpp` at lines 116-117:

**Disconnect navigation runs off GUI thread**

When a backend disconnect is emitted by the detached IPC worker thread while `connectwidget` is current, the contextless `disconnected` lambda runs in the thread emitting the signal, then calls `setCurrentIndex()` and `setErrorType()` on widgets from that thread. For the newly included connect page, this makes disconnect navigation a cross-thread widget access, so the UI can fail to update or crash.

Connect the lambda with a GUI-thread QObject context so Qt queues the widget updates to the UI thread.

errorwidget->setErrorType(ErrorType::networkError);
});
Expand Down
Loading