summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2014-08-18 21:09:04 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-08-19 00:42:00 +0200
commit75b62f3a172c277e8b90ef536da354deccb54d24 (patch)
tree2312151dfcaf678dc738062c3b85b32b67b51c44 /src/corelib
parent65240c602b2238f090118af816a2b051da7cf032 (diff)
parentca524e5b70ccfeb6386cf0c5df83ffb86a8771fe (diff)
Merge "Merge remote-tracking branch 'origin/5.3' into 5.4" into refs/staging/5.4
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/kernel/qjni.cpp6
-rw-r--r--src/corelib/kernel/qobject.cpp12
-rw-r--r--src/corelib/statemachine/qstatemachine.cpp6
-rw-r--r--src/corelib/tools/qstring.cpp88
4 files changed, 100 insertions, 12 deletions
diff --git a/src/corelib/kernel/qjni.cpp b/src/corelib/kernel/qjni.cpp
index aa9b196e62..4581b70ca7 100644
--- a/src/corelib/kernel/qjni.cpp
+++ b/src/corelib/kernel/qjni.cpp
@@ -721,7 +721,7 @@ jboolean QJNIObjectPrivate::callStaticMethod<jboolean>(jclass clazz,
{
va_list args;
va_start(args, sig);
- jboolean res = callStaticMethod<jboolean>(clazz, methodName, sig);
+ jboolean res = callStaticMethod<jboolean>(clazz, methodName, sig, args);
va_end(args);
return res;
}
@@ -1026,7 +1026,7 @@ jlong QJNIObjectPrivate::callStaticMethod<jlong>(jclass clazz,
{
va_list args;
va_start(args, sig);
- jlong res = callStaticMethod<jlong>(clazz, methodName, sig);
+ jlong res = callStaticMethod<jlong>(clazz, methodName, sig, args);
va_end(args);
return res;
}
@@ -1119,7 +1119,7 @@ jdouble QJNIObjectPrivate::callStaticMethod<jdouble>(const char *className,
{
va_list args;
va_start(args, sig);
- jdouble res = callStaticMethod<jdouble>(className, methodName, sig);
+ jdouble res = callStaticMethod<jdouble>(className, methodName, sig, args);
va_end(args);
return res;
}
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp
index db2b086ff2..45bf4b62c5 100644
--- a/src/corelib/kernel/qobject.cpp
+++ b/src/corelib/kernel/qobject.cpp
@@ -4749,10 +4749,14 @@ bool QObject::disconnectImpl(const QObject *sender, void **signal, const QObject
int signal_index = -1;
if (signal) {
void *args[] = { &signal_index, signal };
- senderMetaObject->static_metacall(QMetaObject::IndexOfMethod, 0, args);
- if (signal_index < 0 || signal_index >= QMetaObjectPrivate::get(senderMetaObject)->signalCount) {
- qWarning("QObject::disconnect: signal not found in %s", senderMetaObject->className());
- return false;
+ for (; senderMetaObject && signal_index < 0; senderMetaObject = senderMetaObject->superClass()) {
+ senderMetaObject->static_metacall(QMetaObject::IndexOfMethod, 0, args);
+ if (signal_index >= 0 && signal_index < QMetaObjectPrivate::get(senderMetaObject)->signalCount)
+ break;
+ }
+ if (!senderMetaObject) {
+ qWarning("QObject::disconnect: signal not found in %s", sender->metaObject()->className());
+ return QMetaObject::Connection(0);
}
signal_index += QMetaObjectPrivate::signalOffset(senderMetaObject);
}
diff --git a/src/corelib/statemachine/qstatemachine.cpp b/src/corelib/statemachine/qstatemachine.cpp
index a147b85eb7..0e6fad48df 100644
--- a/src/corelib/statemachine/qstatemachine.cpp
+++ b/src/corelib/statemachine/qstatemachine.cpp
@@ -526,10 +526,6 @@ QList<QAbstractState*> QStateMachinePrivate::computeStatesToEnter(const QList<QA
QAbstractState *s = lst.at(j);
addStatesToEnter(s, lca, statesToEnter, statesForDefaultEntry);
}
- for (int j = src ? 1 : 0; j < lst.size(); ++j) {
- QAbstractState *s = lst.at(j);
- addAncestorStatesToEnter(s, lca, statesToEnter, statesForDefaultEntry);
- }
if (isParallel(lca)) {
QList<QAbstractState*> lcac = QStatePrivate::get(lca)->childStates();
foreach (QAbstractState* child,lcac) {
@@ -727,6 +723,7 @@ void QStateMachinePrivate::addStatesToEnter(QAbstractState *s, QState *root,
return;
}
}
+ addAncestorStatesToEnter(s, root, statesToEnter, statesForDefaultEntry);
}
}
@@ -1095,7 +1092,6 @@ void QStateMachinePrivate::setError(QStateMachine::Error errorCode, QAbstractSta
if (currentErrorState != 0) {
QState *lca = findLCA(QList<QAbstractState*>() << currentErrorState << currentContext);
addStatesToEnter(currentErrorState, lca, pendingErrorStates, pendingErrorStatesForDefaultEntry);
- addAncestorStatesToEnter(currentErrorState, lca, pendingErrorStates, pendingErrorStatesForDefaultEntry);
} else {
qWarning("Unrecoverable error detected in running state machine: %s",
qPrintable(errorString));
diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp
index 23c75f4e05..2ce8a3a45b 100644
--- a/src/corelib/tools/qstring.cpp
+++ b/src/corelib/tools/qstring.cpp
@@ -8029,6 +8029,11 @@ QString &QString::setRawData(const QChar *unicode, int size)
Returns the Latin-1 string stored in this object.
*/
+/*! \fn const char *QLatin1String::data() const
+
+ Returns the Latin-1 string stored in this object.
+*/
+
/*! \fn int QLatin1String::size() const
Returns the size of the Latin-1 string stored in this object.
@@ -8059,6 +8064,20 @@ QString &QString::setRawData(const QChar *unicode, int size)
go through QObject::tr(), for example.
*/
+/*!
+ \fn bool QLatin1String::operator==(const QByteArray &other) const
+ \since 5.0
+ \overload
+
+ The \a other byte array is converted to a QString using
+ the QString::fromUtf8() function.
+
+ You can disable this operator by defining \c
+ QT_NO_CAST_FROM_ASCII when you compile your applications. This
+ can be useful if you want to ensure that all user-visible strings
+ go through QObject::tr(), for example.
+*/
+
/*! \fn bool QLatin1String::operator!=(const QString &other) const
Returns \c true if this string is not equal to string \a other;
@@ -8085,6 +8104,20 @@ QString &QString::setRawData(const QChar *unicode, int size)
*/
/*!
+ \fn bool QLatin1String::operator!=(const QByteArray &other) const
+ \since 5.0
+ \overload operator!=()
+
+ The \a other byte array is converted to a QString using
+ the QString::fromUtf8() function.
+
+ You can disable this operator by defining \c
+ QT_NO_CAST_FROM_ASCII when you compile your applications. This
+ can be useful if you want to ensure that all user-visible strings
+ go through QObject::tr(), for example.
+*/
+
+/*!
\fn bool QLatin1String::operator>(const QString &other) const
Returns \c true if this string is lexically greater than string \a
@@ -8111,6 +8144,20 @@ QString &QString::setRawData(const QChar *unicode, int size)
*/
/*!
+ \fn bool QLatin1String::operator>(const QByteArray &other) const
+ \since 5.0
+ \overload
+
+ The \a other const char pointer is converted to a QString using
+ the QString::fromUtf8() function.
+
+ You can disable this operator by defining \c QT_NO_CAST_FROM_ASCII
+ when you compile your applications. This can be useful if you want
+ to ensure that all user-visible strings go through QObject::tr(),
+ for example.
+*/
+
+/*!
\fn bool QLatin1String::operator<(const QString &other) const
Returns \c true if this string is lexically less than the \a other
@@ -8137,6 +8184,20 @@ QString &QString::setRawData(const QChar *unicode, int size)
*/
/*!
+ \fn bool QLatin1String::operator<(const QByteArray &other) const
+ \since 5.0
+ \overload
+
+ The \a other const char pointer is converted to a QString using
+ the QString::fromUtf8() function.
+
+ You can disable this operator by defining \c
+ QT_NO_CAST_FROM_ASCII when you compile your applications. This
+ can be useful if you want to ensure that all user-visible strings
+ go through QObject::tr(), for example.
+*/
+
+/*!
\fn bool QLatin1String::operator>=(const QString &other) const
Returns \c true if this string is lexically greater than or equal
@@ -8162,6 +8223,20 @@ QString &QString::setRawData(const QChar *unicode, int size)
go through QObject::tr(), for example.
*/
+/*!
+ \fn bool QLatin1String::operator>=(const QByteArray &other) const
+ \since 5.0
+ \overload
+
+ The \a other array is converted to a QString using
+ the QString::fromUtf8() function.
+
+ You can disable this operator by defining \c
+ QT_NO_CAST_FROM_ASCII when you compile your applications. This
+ can be useful if you want to ensure that all user-visible strings
+ go through QObject::tr(), for example.
+*/
+
/*! \fn bool QLatin1String::operator<=(const QString &other) const
Returns \c true if this string is lexically less than or equal
@@ -8187,6 +8262,19 @@ QString &QString::setRawData(const QChar *unicode, int size)
go through QObject::tr(), for example.
*/
+/*!
+ \fn bool QLatin1String::operator<=(const QByteArray &other) const
+ \since 5.0
+ \overload
+
+ The \a other array is converted to a QString using
+ the QString::fromUtf8() function.
+
+ You can disable this operator by defining \c
+ QT_NO_CAST_FROM_ASCII when you compile your applications. This
+ can be useful if you want to ensure that all user-visible strings
+ go through QObject::tr(), for example.
+*/
/*! \fn bool operator==(QLatin1String s1, QLatin1String s2)