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

MenuEdit: Do not use autoconnection mechanism for slots used in QMenu #132

Merged
merged 2 commits into from
Nov 15, 2023

Conversation

tetektoza
Copy link
Contributor

@tetektoza tetektoza commented Nov 15, 2023

Currently whenever UI gets loaded and we try to connect a slot with a signal emitted in QAction, for example in appending frame, inserting it, etc. we get warnings like these:

qt.core.qmetaobject.connectslotsbyname: QMetaObject::connectSlotsByName: No matching signal for on_actionAdd_Frame_triggered()

This is because MOC tries to automatically connect functions which have "on_objectname_triggered" signature, and it can't find a matching signal for it by default. So the solution for that is to simply not use the autoconnection mechanism by changing names of those slots, removing "on" prefix from them - this way we won't get those warnings whenever we load certain parts of GUI.

Currently whenever UI gets loaded and we try to connect a slot with a
signal emitted in QAction, for example in appending frame, inserting it,
etc. we get warnings like these:

qt.core.qmetaobject.connectslotsbyname: QMetaObject::connectSlotsByName: No matching signal for on_actionAdd_Frame_triggered()

This is because MOC tries to automatically connect functions which have
"on_objectname_triggered" signature, and it can't find a matching signal
for it by default. So the solution for that is to simply not use the
autoconnection mechanism by changing names of those slots, removing
"on" prefix from them.
QMenu

Currently whenever UI gets loaded and we try to connect a slot with a
signal emitted in QAction, for example in appending frame, inserting it,
etc. we get warnings like these:

qt.core.qmetaobject.connectslotsbyname: QMetaObject::connectSlotsByName: No matching signal for on_actionAdd_Frame_triggered()

This is because MOC tries to automatically connect functions which have
"on_objectname_triggered" signature, and it can't find a matching signal
for it by default. So the solution for that is to simply not use the
autoconnection mechanism by changing names of those slots, removing
"on" prefix from them.
@tetektoza tetektoza changed the title EditMenu: Do not use autoconnection mechanism for slots used in QMenu MenuEdit: Do not use autoconnection mechanism for slots used in QMenu Nov 15, 2023
@AJenbo AJenbo merged commit 6d3e680 into diasurgical:master Nov 15, 2023
5 checks passed
@tetektoza tetektoza deleted the fix_connectslotsbyname_warnings branch November 16, 2023 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants