-
-
Notifications
You must be signed in to change notification settings - Fork 117
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
Codebase: emiting a signal forcedly from outside is a bad practice #540
Comments
What could be an alternative approach? |
This issue has been automatically marked as stale because it has not had recent activity. It will be now be reviewed manually. Thank you for your contributions. |
Good approach is suggested by Qt documentation:
|
Fix potential memory leak: passing ZimView as a parent QObject to WebView makes WebView to be destroyed automatically with ZimView. Signal currentZimIdChanged() isn't used anywhere, removed from code.
Fix potential memory leak: passing ZimView as a parent QObject to WebView makes WebView to be destroyed automatically with ZimView. Signal currentZimIdChanged() isn't used anywhere, removed from code.
Signal currentZimIdChanged() isn't used anywhere, removed from code.
Signal currentZimIdChanged() isn't used anywhere, removed from code.
Partial fix of #540: do not emit others object signals.
This issue has been automatically marked as stale because it has not had recent activity. It will be now be reviewed manually. Thank you for your contributions. |
…imView as this is a bad practice according QObject documentation.
…ZimView as it's bad practice according to QObject documentation.
…ZimView as it's bad practice according to QObject documentation.
…ZimView as it's bad practice according to QObject documentation.
…ZimView as it's bad practice according to QObject documentation.
…ZimView as it's bad practice according to QObject documentation.
The TabBar should only emit it themself when it comes from the current tab.
@asashnov I rechallenge you on this: what is left to do? |
kelson42@ Part3 would be illiminating |
This issue has been automatically marked as stale because it has not had recent activity. It will be now be reviewed manually. Thank you for your contributions. |
1 similar comment
This issue has been automatically marked as stale because it has not had recent activity. It will be now be reviewed manually. Thank you for your contributions. |
@shaopengLinCan we move forward on this issue while PR currently in review waits for the reviewer? Do you have an opinion or a proposal on this issue? |
So the mp_library emits are needed because they were directly using the kiwix library that don't emit signals. I will do a PR soon and design decisions can happen there. |
@ShaopengLin Thank you. I have to admit that the rational behind this issue are not clear to me. So, trust you to understand it :) |
@veloman-yunkan Like proposed, can you please quickly implement the fix? |
kiwix-desktop 'master' (830e19b)
Found during working on #454
From src/zimview.cpp:
According to Qt documentation, this is a bad practice.
By signals, only the object itself should notify that its internal state has changed:
https://doc.qt.io/qt-5/signalsandslots.html
The text was updated successfully, but these errors were encountered: