Skip to content

Don't emit documentClosed repeatedly for the same document

Igor Kushnir requested to merge work/no-duplicate-document-closed-emissions into master

Numerous slots are connected to this signal. They are all invoked repeatedly and redundantly. The number of the invocations equals one plus the number of times the closed document was activated via reopening (e.g. by Most-Recently-Used Document Switcher or by Document View).

Connecting DocumentController::notifyDocumentClosed with Qt::UniqueConnection connection type in openDocumentInternal() ensures that the documentClosed signal is emitted once.

Merge request reports