On Mon, Apr 25, 2011 at 6:54 PM, Olivier Goffart <[email protected]> wrote:
> In this case, we have to see if we can fix it in Qt. I do not see any solution > on top of my head. We have to discuss if it is ok to break this use case if > there is no solution. The Qt documentation, about signals and slots[1] says this: "Since slots are normal member functions, they follow the normal C++ rules when called directly. However, as slots, they can be invoked by any component, regardless of its access level, via a signal-slot connection. This means that a signal emitted from an instance of an arbitrary class can cause a private slot to be invoked in an instance of an unrelated class." This makes a promise that any class can use a private slot without access checking. It doesn't say how that slot was declared, just that the private slot can be invoked by any other class. The change to Q_PRIVATE_SLOT introduces access checking of slots and breaks the promise, and so it needs to be left unchanged until Qt 5. Regards, Eli. [1] http://doc.qt.nokia.com/latest/signalsandslots.html#slots
