Summary: | QtRuby: connecting to protected and private slots always works | ||
---|---|---|---|
Product: | [Unmaintained] bindings | Reporter: | Caleb Tennis <caleb> |
Component: | general | Assignee: | kde-bindings |
Status: | RESOLVED UNMAINTAINED | ||
Severity: | normal | CC: | opensource |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Caleb Tennis
2005-08-04 23:49:13 UTC
On Friday 05 August 2005 10:16, Christian Loose wrote: [bugs.kde.org quoted mail] I tried this in C++ and it does exactly the same thing. This program gives no compile or runtime errors: class TrySlots: public QMainWindow { Q_OBJECT public slots: void myPublicSlot(); protected slots: void myProtectedSlot(); private slots: void myPrivateSlot(); ... void TrySlots::myPublicSlot() { printf("In myPublicSlot()\n"); } void TrySlots::myProtectedSlot() { printf("In myProtectedSlot()\n"); } void TrySlots::myPrivateSlot() { printf("In myPrivateSlot()\n"); } ... TrySlots * win = new TrySlots(); QPushButton * b = new QPushButton(win); win->show(); QObject::connect(b, SIGNAL(clicked()), mw, SLOT(myPublicSlot())); QObject::connect(b, SIGNAL(clicked()), mw, SLOT(myProtectedSlot())); QObject::connect(b, SIGNAL(clicked()), mw, SLOT(myPrivateSlot())); When I click the button, it outputs: In myPublicSlot() In myProtectedSlot() In myPrivateSlot() -- Richard Wow, you're right. I've always taken this behavior for granted and coded based on the premise. The signalsandslots doc at the Trolltech website explains this as an expected type of behavior, so I'm a little surprised. This is not a bug. This is even documented in Qt: The Signal/Slot mechanism ignores visibility. Thank you for the bug report. As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists. If this bug is no longer persisting or relevant please change the status to resolved. QtRuby only existed for Qt4 and Korundum, which never got updated for 5.x This is unmaintained and any effort towards QtRuby for Qt6 will be from scratch. Therefore, closing this ticket |