Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport changes to v4.6.x branch #19979

Merged
merged 6 commits into from
Nov 26, 2023
Merged

Backport changes to v4.6.x branch #19979

merged 6 commits into from
Nov 26, 2023

Conversation

glassez and others added 2 commits November 21, 2023 10:32
The parent widget of lockMenu is going to be used to derive the
transient parent window. Currently the parent widget of lockMenu is
the main window, therefore the main window is also going to be the
transient parent for lockMenu's window handle.

In other words, the "View" menu and "Lock qBittorrent" menu are
going to be considered as siblings by the window manager even though
the latter is nested inside the former.

On platforms like wayland, such popup hierarchies are illegal, popups
must be properly nested. qtwayland works around it, but it also prints
warning messages.

This change makes lockMenu a child of the view menu so they are
properly nested from the window manager point of view.

PR qbittorrent#19967.
Closes qbittorrent#19955.
@glassez glassez added this to the 4.6.2 milestone Nov 21, 2023
brvphoenix and others added 3 commits November 25, 2023 18:08
The memory leak can be reproduced easily by opening two web pages of qbittorrent so that the WebUI pages are updated with full_update = true. If you have a large number of torrents, such as 100 torrents, you can observe a rapid increase in memory usage.

This is caused by the incorrect usage of dispose and empty methods in the js codes and none of them garbage collect the elements. If event listeners are added to the DOM elements, those DOM elements will not be garbage collected at all event if they are not referenced or out of the scope, which will cause memory leaks. If some elements are expected to be removed, the correct way is to use destroy method instead.

https://github.com/mootools/mootools-core/blob/master/Docs/Element/Element.md#element-method-dispose-elementdispose
https://github.com/mootools/mootools-core/blob/master/Docs/Element/Element.md#element-method-empty-elementempty
https://github.com/mootools/mootools-core/blob/master/Docs/Element/Element.md#element-method-destroy-elementdestroy

Closes qbittorrent#19034.
PR qbittorrent#19969.
The messages printed out via stdout is usually important and short so
there is no reason to buffer them.

Closes qbittorrent#19984.
PR qbittorrent#20018.
@glassez glassez merged commit c54f8bf into qbittorrent:v4_6_x Nov 26, 2023
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants