Core/kernel: Make some signals private.
authorStephen Kelly <stephen.kelly@kdab.com>
Thu, 18 Oct 2012 12:29:06 +0000 (14:29 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Thu, 25 Oct 2012 13:56:14 +0000 (15:56 +0200)
commitdee57bc91080740201a0bf0b8c42eb374ee696f3
treeedc27d73f41475ccb7c3e83c671f361f79693eeb
parent611c0081ff265354405882b40b323d7cb20ca967
Core/kernel: Make some signals private.

There are more opportunities in QtCore and the rest of Qt to make signals
private instead of public. This is a test-dart to see if there is any
reason not to do this.

It would be nice to make QObject::destroyed private, but as it has a
default argument it would be source incompatible to anyone connecting
to the SIGNAL(destroyed()) instead of SIGNAL(destroyed(QObject*)).

Currently the function-pointer-based connect syntax does not accept
a functor (or lambda) with a different number of arguments than the
signal. Olivier says a fix for that might come in 5.1, but for now
the qfiledialog2 test is changed to not use that anymore.

Also, the function pointer for a private signal can not be assigned to
a local variable, so the qmetamethod test is changed to not do so
anymore.

Change-Id: Iaf776b822f9ba364f2c184df0c6b23811da56e44
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
13 files changed:
src/corelib/kernel/qcoreapplication.cpp
src/corelib/kernel/qcoreapplication.h
src/corelib/kernel/qeventdispatcher_unix.cpp
src/corelib/kernel/qobject.cpp
src/corelib/kernel/qobject.h
src/corelib/kernel/qsocketnotifier.cpp
src/corelib/kernel/qsocketnotifier.h
src/corelib/kernel/qtimer.cpp
src/corelib/kernel/qtimer.h
src/corelib/kernel/qwineventnotifier.cpp
src/corelib/kernel/qwineventnotifier.h
tests/auto/corelib/kernel/qmetamethod/tst_qmetamethod.cpp
tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp