qt5base-lts/tests/auto
Kent Hansen dac23b9a57 Add QMetaMethod::fromSignal() function
Given a member function that's a signal, returns the corresponding
QMetaMethod. Inspired by the implementation of the template-based
QObject::connect().

The primary use case for this function is to have an effective and
exact (not subject to shadowing) way of checking whether a known
signal was connected to in reimplementations of
QObject::connectNotify(QMetaMethod), avoiding string comparisons.
Example:

void MyObject::connectNotify(const QMetaMethod &signal)
{
    if (signal == QMetaMethod::fromSignal(&MyObject::mySignal)) {
        // Someone connected to mySignal ...
    }
}

Change-Id: I5e4de434275fe543c004d569dcaa9ceda3442f03
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-04-27 10:37:02 +02:00
..
cmake cmake: temporarily set tests/auto/cmake insignificant on mac 2012-04-27 03:10:06 +02:00
compilerwarnings/data Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
concurrent Remove insignification from QtConcurrentFilter test. 2012-04-19 13:26:51 +02:00
corelib Add QMetaMethod::fromSignal() function 2012-04-27 10:37:02 +02:00
dbus Finish cleaning up com.trolltech -> org.qtproject in QtDBus 2012-04-16 00:07:39 +02:00
gui Implement inline downscaling in png reader, to save memory 2012-04-27 10:37:02 +02:00
guiapplauncher
network Uncomment qnetworkproxyfactory autotest 2012-04-26 17:52:12 +02:00
opengl Re-enable QGLThreads autotest on Mac OS X. 2012-04-19 13:26:51 +02:00
other Don't use the QRegExp methods that modify the object [QtGui] 2012-04-24 19:36:55 +02:00
printsupport Re-enable QPrinterInfo test on Mac OS X. 2012-04-19 04:13:04 +02:00
shared Added some convenience API for platform input contexts 2012-04-01 20:13:51 +02:00
sql QSqlQueryModel::setQuery() don't use deprecated reset() 2012-04-23 19:20:19 +02:00
testlib Merge remote-tracking branch 'origin/master' into api_changes 2012-04-10 15:31:45 +02:00
tools Remove QMetaObjectExtraData and put everything into QMetaObject 2012-04-25 20:19:29 +02:00
widgets Removed parallel_test from parallel-unsafe autotest. 2012-04-27 08:17:09 +02:00
xml Merge remote-tracking branch 'origin/master' into api_changes 2012-04-16 12:04:34 +02:00
auto.pro Re-enable network tests on Mac OS. 2012-04-24 16:06:28 +02:00
network-settings.h Don't require exact IMAP server version in autotests 2012-04-03 12:45:46 +02:00
platformquirks.h Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00
test.pl Remove "All rights reserved" line from license headers. 2012-01-30 03:54:59 +01:00