QTimer: fix typo in singleShot optimization for 0 msecs

The SIGNAL/SLOT/METHOD(x) macros prepend a character between
'0' and '2' inclusive, and not '0' and '3'.

Change-Id: Ibdbf442422925a43f956b2ba70f1f9c6a2812305
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Giuseppe D'Angelo 2012-04-22 22:11:07 +01:00 committed by Qt by Nokia
parent 8f85b84f4e
commit a5565bcac0

View File

@ -343,7 +343,7 @@ void QTimer::singleShot(int msec, Qt::TimerType timerType, QObject *receiver, co
if (msec == 0) {
// special code shortpath for 0-timers
const char* bracketPosition = strchr(member, '(');
if (!bracketPosition || !(member[0] >= '0' && member[0] <= '3')) {
if (!bracketPosition || !(member[0] >= '0' && member[0] <= '2')) {
qWarning("QTimer::singleShot: Invalid slot specification");
return;
}