diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-08-12 13:05:02 +0200 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-08-12 13:05:02 +0200 |
commit | ca524e5b70ccfeb6386cf0c5df83ffb86a8771fe (patch) | |
tree | 245c471373516ccda2b0c91943a42cd74674f2da /src/corelib | |
parent | b08cc0ec6f096d0e6764486c81264c24a406bee1 (diff) | |
parent | c2badc7423b63824902d1f44a4b804de3335c20b (diff) |
Merge remote-tracking branch 'origin/5.3' into 5.4
Manually included changes from
3a347a4e70e5a10ee92dd2578316c926a399e894
in src/opengl/qgl.cpp.
Conflicts:
src/opengl/qgl_qpa.cpp
src/plugins/platforms/android/androidjnimain.cpp
Change-Id: Ic26b58ee587d4884c9d0fba45c5a94b5a45ee929
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/kernel/qjni.cpp | 6 | ||||
-rw-r--r-- | src/corelib/kernel/qobject.cpp | 12 | ||||
-rw-r--r-- | src/corelib/statemachine/qstatemachine.cpp | 6 | ||||
-rw-r--r-- | src/corelib/tools/qstring.cpp | 88 |
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) |