summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-03-10 10:33:34 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-03-10 10:33:34 (GMT)
commit0d6d25e6796a85ea44d982a8ec618d920371c7a9 (patch)
tree71b497a5370b0707b4da324b6918bce7f4901879 /src/corelib/kernel
parent878c2a984b78cdfc88e4474f6719f07662c7ac68 (diff)
parent12d63b05a942281e688d857d17c190564c77b698 (diff)
downloadQt-0d6d25e6796a85ea44d982a8ec618d920371c7a9.zip
Qt-0d6d25e6796a85ea44d982a8ec618d920371c7a9.tar.gz
Qt-0d6d25e6796a85ea44d982a8ec618d920371c7a9.tar.bz2
Merge remote branch 'qt/4.7' into qml-4.7
Conflicts: src/declarative/util/qdeclarativestateoperations.cpp
Diffstat (limited to 'src/corelib/kernel')
-rw-r--r--src/corelib/kernel/qmetatype.cpp2
-rw-r--r--src/corelib/kernel/qtimer.cpp14
-rw-r--r--src/corelib/kernel/qvariant.cpp2
3 files changed, 17 insertions, 1 deletions
diff --git a/src/corelib/kernel/qmetatype.cpp b/src/corelib/kernel/qmetatype.cpp
index 8f2d025..30af6fa 100644
--- a/src/corelib/kernel/qmetatype.cpp
+++ b/src/corelib/kernel/qmetatype.cpp
@@ -590,6 +590,8 @@ bool QMetaType::isRegistered(int type)
int QMetaType::type(const char *typeName)
{
int length = qstrlen(typeName);
+ if (!length)
+ return 0;
int type = qMetaTypeStaticType(typeName, length);
if (!type) {
QReadLocker locker(customTypesLock());
diff --git a/src/corelib/kernel/qtimer.cpp b/src/corelib/kernel/qtimer.cpp
index e17c995..7650f6a 100644
--- a/src/corelib/kernel/qtimer.cpp
+++ b/src/corelib/kernel/qtimer.cpp
@@ -339,8 +339,20 @@ QT_END_INCLUDE_NAMESPACE
void QTimer::singleShot(int msec, QObject *receiver, const char *member)
{
- if (receiver && member)
+ if (receiver && member) {
+ if (msec == 0) {
+ // special code shortpath for 0-timers
+ const char* bracketPosition = strchr(member, '(');
+ if (!bracketPosition || !(member[0] >= '0' && member[0] <= '3')) {
+ qWarning("QTimer::singleShot: Invalid slot specification");
+ return;
+ }
+ QByteArray methodName(member+1, bracketPosition - 1 - member); // extract method name
+ QMetaObject::invokeMethod(receiver, methodName.constData(), Qt::QueuedConnection);
+ return;
+ }
(void) new QSingleShotTimer(msec, receiver, member);
+ }
}
/*!
diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp
index 07c9e53..f5d7c0d 100644
--- a/src/corelib/kernel/qvariant.cpp
+++ b/src/corelib/kernel/qvariant.cpp
@@ -1511,6 +1511,7 @@ QVariant::QVariant(const char *val)
*/
/*!
+ \since 4.7
\fn QVariant::QVariant(const QEasingCurve &val)
Constructs a new variant with an easing curve value, \a val.
@@ -2204,6 +2205,7 @@ QDateTime QVariant::toDateTime() const
}
/*!
+ \since 4.7
\fn QEasingCurve QVariant::toEasingCurve() const
Returns the variant as a QEasingCurve if the variant has type() \l