summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xconfigure4
-rw-r--r--doc/src/qt4-intro.qdoc9
-rw-r--r--src/corelib/io/qfilesystemwatcher_fsevents.cpp11
-rw-r--r--src/corelib/io/qurl.cpp7
-rw-r--r--src/corelib/io/qurl.h4
-rw-r--r--src/corelib/kernel/qmetatype.cpp249
-rw-r--r--src/corelib/tools/qsimd_p.h2
-rw-r--r--src/declarative/graphicsitems/qdeclarativeeffects.cpp4
-rw-r--r--src/declarative/graphicsitems/qdeclarativeevents.cpp1
-rw-r--r--src/declarative/graphicsitems/qdeclarativeflickable.cpp1
-rw-r--r--src/declarative/graphicsitems/qdeclarativegridview.cpp1
-rw-r--r--src/declarative/qml/qdeclarativescript.cpp1
-rw-r--r--src/declarative/util/qdeclarativeanimation.cpp23
-rw-r--r--src/declarative/util/qdeclarativebehavior.cpp1
-rw-r--r--src/declarative/util/qdeclarativeeasefollow.cpp1
-rw-r--r--src/declarative/util/qdeclarativefontloader.cpp1
-rw-r--r--src/declarative/util/qdeclarativelistmodel.cpp2
-rw-r--r--src/declarative/util/qdeclarativespringfollow.cpp1
-rw-r--r--src/declarative/util/qdeclarativestategroup.cpp1
-rw-r--r--src/declarative/util/qdeclarativesystempalette.cpp1
-rw-r--r--src/declarative/util/qdeclarativetimer.cpp1
-rw-r--r--src/multimedia/qml/qdeclarativeaudio.cpp1
-rw-r--r--src/multimedia/qml/qdeclarativevideo.cpp1
-rw-r--r--src/multimedia/qml/qsoundeffect.cpp1
-rw-r--r--src/network/access/qnetworkreplyimpl_p.h2
-rw-r--r--src/plugins/bearer/corewlan/qcorewlanengine.mm122
-rw-r--r--src/plugins/bearer/qnetworksession_impl.cpp8
-rw-r--r--tests/benchmarks/corelib/kernel/kernel.pro1
-rw-r--r--tests/benchmarks/corelib/kernel/qmetatype/qmetatype.pro7
-rw-r--r--tests/benchmarks/corelib/kernel/qmetatype/tst_qmetatype.cpp233
-rw-r--r--tools/qdoc3/node.cpp8
-rw-r--r--tools/qdoc3/node.h2
32 files changed, 516 insertions, 196 deletions
diff --git a/configure b/configure
index 70b9753..2312165 100755
--- a/configure
+++ b/configure
@@ -2411,7 +2411,9 @@ if [ "$CFG_EMBEDDED" != "no" ]; then
fi
;;
CYGWIN*:*)
- CFG_EMBEDDED=x86
+ if [ -z "$XPLATFORM" ]; then
+ CFG_EMBEDDED=x86
+ fi
;;
*)
echo "Qt for Embedded Linux is not supported on this platform. Disabling."
diff --git a/doc/src/qt4-intro.qdoc b/doc/src/qt4-intro.qdoc
index a18bc13..cf53df0 100644
--- a/doc/src/qt4-intro.qdoc
+++ b/doc/src/qt4-intro.qdoc
@@ -483,7 +483,14 @@
QNetworkAccessManager uses this API for HTTP level roaming.
- \section1 Multimedia - playback and playlist management
+ \section1 Multimedia - playback and declarative elements
+
+ The Multimedia API provides media playback and playlist support
+ for Qt Applications. Play music and movies through a single interface
+ with selectable output for movies to widgets or graphics view.
+
+ Multimedia support for Quick is also available with the new multimedia
+ declarative elements.
\section1 New Classes, Functions, Macros, etc.
diff --git a/src/corelib/io/qfilesystemwatcher_fsevents.cpp b/src/corelib/io/qfilesystemwatcher_fsevents.cpp
index 54ae24e..efbc290 100644
--- a/src/corelib/io/qfilesystemwatcher_fsevents.cpp
+++ b/src/corelib/io/qfilesystemwatcher_fsevents.cpp
@@ -445,7 +445,16 @@ void QFSEventsFileSystemWatcherEngine::updateFiles()
updateHash(dirPathInfoHash);
if (filePathInfoHash.isEmpty() && dirPathInfoHash.isEmpty()) {
// Everything disappeared before we got to start, don't bother.
- stop();
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
+ // Code duplicated from stop(), with the exception that we
+ // don't wait on waitForStop here. Doing this will lead to
+ // a deadlock since this function is called from the worker
+ // thread. (waitForStop.wakeAll() is only called from the
+ // end of run()).
+ stopFSStream(fsStream);
+ if (threadsRunLoop)
+ CFRunLoopStop(threadsRunLoop);
+#endif
cleanupFSStream(fsStream);
}
waitCondition.wakeAll();
diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp
index acb73fd..626bd3f 100644
--- a/src/corelib/io/qurl.cpp
+++ b/src/corelib/io/qurl.cpp
@@ -167,6 +167,13 @@
regardless of the Qt::FormattingOptions used.
*/
+/*!
+ \fn uint qHash(const QUrl &url)
+ \since 4.7
+ \relates QUrl
+
+ Computes a hash key from the normalized version of \a url.
+ */
#include "qplatformdefs.h"
#include "qurl.h"
#include "private/qunicodetables_p.h"
diff --git a/src/corelib/io/qurl.h b/src/corelib/io/qurl.h
index 906979c..6f8331a 100644
--- a/src/corelib/io/qurl.h
+++ b/src/corelib/io/qurl.h
@@ -270,9 +270,9 @@ public:
inline DataPtr &data_ptr() { return d; }
};
-inline uint qHash(const QUrl &uri)
+inline uint qHash(const QUrl &url)
{
- return qHash(uri.toEncoded(QUrl::FormattingOption(0x100)));
+ return qHash(url.toEncoded(QUrl::FormattingOption(0x100)));
}
Q_DECLARE_TYPEINFO(QUrl, Q_MOVABLE_TYPE);
diff --git a/src/corelib/kernel/qmetatype.cpp b/src/corelib/kernel/qmetatype.cpp
index 9e187d4..779b69b 100644
--- a/src/corelib/kernel/qmetatype.cpp
+++ b/src/corelib/kernel/qmetatype.cpp
@@ -225,101 +225,104 @@ QT_BEGIN_NAMESPACE
\sa Q_DECLARE_METATYPE(), QVariant::setValue(), QVariant::value(), QVariant::fromValue()
*/
+#define QT_ADD_STATIC_METATYPE(STR, TP) \
+ { STR, sizeof(STR) - 1, TP }
+
/* Note: these MUST be in the order of the enums */
-static const struct { const char * typeName; int type; } types[] = {
+static const struct { const char * typeName; int typeNameLength; int type; } types[] = {
/* All Core types */
- {"void", QMetaType::Void},
- {"bool", QMetaType::Bool},
- {"int", QMetaType::Int},
- {"uint", QMetaType::UInt},
- {"qlonglong", QMetaType::LongLong},
- {"qulonglong", QMetaType::ULongLong},
- {"double", QMetaType::Double},
- {"QChar", QMetaType::QChar},
- {"QVariantMap", QMetaType::QVariantMap},
- {"QVariantList", QMetaType::QVariantList},
- {"QString", QMetaType::QString},
- {"QStringList", QMetaType::QStringList},
- {"QByteArray", QMetaType::QByteArray},
- {"QBitArray", QMetaType::QBitArray},
- {"QDate", QMetaType::QDate},
- {"QTime", QMetaType::QTime},
- {"QDateTime", QMetaType::QDateTime},
- {"QUrl", QMetaType::QUrl},
- {"QLocale", QMetaType::QLocale},
- {"QRect", QMetaType::QRect},
- {"QRectF", QMetaType::QRectF},
- {"QSize", QMetaType::QSize},
- {"QSizeF", QMetaType::QSizeF},
- {"QLine", QMetaType::QLine},
- {"QLineF", QMetaType::QLineF},
- {"QPoint", QMetaType::QPoint},
- {"QPointF", QMetaType::QPointF},
- {"QRegExp", QMetaType::QRegExp},
- {"QVariantHash", QMetaType::QVariantHash},
- {"QEasingCurve", QMetaType::QEasingCurve},
+ QT_ADD_STATIC_METATYPE("void", QMetaType::Void),
+ QT_ADD_STATIC_METATYPE("bool", QMetaType::Bool),
+ QT_ADD_STATIC_METATYPE("int", QMetaType::Int),
+ QT_ADD_STATIC_METATYPE("uint", QMetaType::UInt),
+ QT_ADD_STATIC_METATYPE("qlonglong", QMetaType::LongLong),
+ QT_ADD_STATIC_METATYPE("qulonglong", QMetaType::ULongLong),
+ QT_ADD_STATIC_METATYPE("double", QMetaType::Double),
+ QT_ADD_STATIC_METATYPE("QChar", QMetaType::QChar),
+ QT_ADD_STATIC_METATYPE("QVariantMap", QMetaType::QVariantMap),
+ QT_ADD_STATIC_METATYPE("QVariantList", QMetaType::QVariantList),
+ QT_ADD_STATIC_METATYPE("QString", QMetaType::QString),
+ QT_ADD_STATIC_METATYPE("QStringList", QMetaType::QStringList),
+ QT_ADD_STATIC_METATYPE("QByteArray", QMetaType::QByteArray),
+ QT_ADD_STATIC_METATYPE("QBitArray", QMetaType::QBitArray),
+ QT_ADD_STATIC_METATYPE("QDate", QMetaType::QDate),
+ QT_ADD_STATIC_METATYPE("QTime", QMetaType::QTime),
+ QT_ADD_STATIC_METATYPE("QDateTime", QMetaType::QDateTime),
+ QT_ADD_STATIC_METATYPE("QUrl", QMetaType::QUrl),
+ QT_ADD_STATIC_METATYPE("QLocale", QMetaType::QLocale),
+ QT_ADD_STATIC_METATYPE("QRect", QMetaType::QRect),
+ QT_ADD_STATIC_METATYPE("QRectF", QMetaType::QRectF),
+ QT_ADD_STATIC_METATYPE("QSize", QMetaType::QSize),
+ QT_ADD_STATIC_METATYPE("QSizeF", QMetaType::QSizeF),
+ QT_ADD_STATIC_METATYPE("QLine", QMetaType::QLine),
+ QT_ADD_STATIC_METATYPE("QLineF", QMetaType::QLineF),
+ QT_ADD_STATIC_METATYPE("QPoint", QMetaType::QPoint),
+ QT_ADD_STATIC_METATYPE("QPointF", QMetaType::QPointF),
+ QT_ADD_STATIC_METATYPE("QRegExp", QMetaType::QRegExp),
+ QT_ADD_STATIC_METATYPE("QVariantHash", QMetaType::QVariantHash),
+ QT_ADD_STATIC_METATYPE("QEasingCurve", QMetaType::QEasingCurve),
/* All GUI types */
- {"QColorGroup", 63},
- {"QFont", QMetaType::QFont},
- {"QPixmap", QMetaType::QPixmap},
- {"QBrush", QMetaType::QBrush},
- {"QColor", QMetaType::QColor},
- {"QPalette", QMetaType::QPalette},
- {"QIcon", QMetaType::QIcon},
- {"QImage", QMetaType::QImage},
- {"QPolygon", QMetaType::QPolygon},
- {"QRegion", QMetaType::QRegion},
- {"QBitmap", QMetaType::QBitmap},
- {"QCursor", QMetaType::QCursor},
- {"QSizePolicy", QMetaType::QSizePolicy},
- {"QKeySequence", QMetaType::QKeySequence},
- {"QPen", QMetaType::QPen},
- {"QTextLength", QMetaType::QTextLength},
- {"QTextFormat", QMetaType::QTextFormat},
- {"QMatrix", QMetaType::QMatrix},
- {"QTransform", QMetaType::QTransform},
- {"QMatrix4x4", QMetaType::QMatrix4x4},
- {"QVector2D", QMetaType::QVector2D},
- {"QVector3D", QMetaType::QVector3D},
- {"QVector4D", QMetaType::QVector4D},
- {"QQuaternion", QMetaType::QQuaternion},
+ QT_ADD_STATIC_METATYPE("QColorGroup", 63),
+ QT_ADD_STATIC_METATYPE("QFont", QMetaType::QFont),
+ QT_ADD_STATIC_METATYPE("QPixmap", QMetaType::QPixmap),
+ QT_ADD_STATIC_METATYPE("QBrush", QMetaType::QBrush),
+ QT_ADD_STATIC_METATYPE("QColor", QMetaType::QColor),
+ QT_ADD_STATIC_METATYPE("QPalette", QMetaType::QPalette),
+ QT_ADD_STATIC_METATYPE("QIcon", QMetaType::QIcon),
+ QT_ADD_STATIC_METATYPE("QImage", QMetaType::QImage),
+ QT_ADD_STATIC_METATYPE("QPolygon", QMetaType::QPolygon),
+ QT_ADD_STATIC_METATYPE("QRegion", QMetaType::QRegion),
+ QT_ADD_STATIC_METATYPE("QBitmap", QMetaType::QBitmap),
+ QT_ADD_STATIC_METATYPE("QCursor", QMetaType::QCursor),
+ QT_ADD_STATIC_METATYPE("QSizePolicy", QMetaType::QSizePolicy),
+ QT_ADD_STATIC_METATYPE("QKeySequence", QMetaType::QKeySequence),
+ QT_ADD_STATIC_METATYPE("QPen", QMetaType::QPen),
+ QT_ADD_STATIC_METATYPE("QTextLength", QMetaType::QTextLength),
+ QT_ADD_STATIC_METATYPE("QTextFormat", QMetaType::QTextFormat),
+ QT_ADD_STATIC_METATYPE("QMatrix", QMetaType::QMatrix),
+ QT_ADD_STATIC_METATYPE("QTransform", QMetaType::QTransform),
+ QT_ADD_STATIC_METATYPE("QMatrix4x4", QMetaType::QMatrix4x4),
+ QT_ADD_STATIC_METATYPE("QVector2D", QMetaType::QVector2D),
+ QT_ADD_STATIC_METATYPE("QVector3D", QMetaType::QVector3D),
+ QT_ADD_STATIC_METATYPE("QVector4D", QMetaType::QVector4D),
+ QT_ADD_STATIC_METATYPE("QQuaternion", QMetaType::QQuaternion),
/* All Metatype builtins */
- {"void*", QMetaType::VoidStar},
- {"long", QMetaType::Long},
- {"short", QMetaType::Short},
- {"char", QMetaType::Char},
- {"ulong", QMetaType::ULong},
- {"ushort", QMetaType::UShort},
- {"uchar", QMetaType::UChar},
- {"float", QMetaType::Float},
- {"QObject*", QMetaType::QObjectStar},
- {"QWidget*", QMetaType::QWidgetStar},
+ QT_ADD_STATIC_METATYPE("void*", QMetaType::VoidStar),
+ QT_ADD_STATIC_METATYPE("long", QMetaType::Long),
+ QT_ADD_STATIC_METATYPE("short", QMetaType::Short),
+ QT_ADD_STATIC_METATYPE("char", QMetaType::Char),
+ QT_ADD_STATIC_METATYPE("ulong", QMetaType::ULong),
+ QT_ADD_STATIC_METATYPE("ushort", QMetaType::UShort),
+ QT_ADD_STATIC_METATYPE("uchar", QMetaType::UChar),
+ QT_ADD_STATIC_METATYPE("float", QMetaType::Float),
+ QT_ADD_STATIC_METATYPE("QObject*", QMetaType::QObjectStar),
+ QT_ADD_STATIC_METATYPE("QWidget*", QMetaType::QWidgetStar),
/* Type aliases - order doesn't matter */
- {"unsigned long", QMetaType::ULong},
- {"unsigned int", QMetaType::UInt},
- {"unsigned short", QMetaType::UShort},
- {"unsigned char", QMetaType::UChar},
- {"long long", QMetaType::LongLong},
- {"unsigned long long", QMetaType::ULongLong},
- {"qint8", QMetaType::Char},
- {"quint8", QMetaType::UChar},
- {"qint16", QMetaType::Short},
- {"quint16", QMetaType::UShort},
- {"qint32", QMetaType::Int},
- {"quint32", QMetaType::UInt},
- {"qint64", QMetaType::LongLong},
- {"quint64", QMetaType::ULongLong},
- {"QList<QVariant>", QMetaType::QVariantList},
- {"QMap<QString,QVariant>", QMetaType::QVariantMap},
- {"QHash<QString,QVariant>", QMetaType::QVariantHash},
+ QT_ADD_STATIC_METATYPE("unsigned long", QMetaType::ULong),
+ QT_ADD_STATIC_METATYPE("unsigned int", QMetaType::UInt),
+ QT_ADD_STATIC_METATYPE("unsigned short", QMetaType::UShort),
+ QT_ADD_STATIC_METATYPE("unsigned char", QMetaType::UChar),
+ QT_ADD_STATIC_METATYPE("long long", QMetaType::LongLong),
+ QT_ADD_STATIC_METATYPE("unsigned long long", QMetaType::ULongLong),
+ QT_ADD_STATIC_METATYPE("qint8", QMetaType::Char),
+ QT_ADD_STATIC_METATYPE("quint8", QMetaType::UChar),
+ QT_ADD_STATIC_METATYPE("qint16", QMetaType::Short),
+ QT_ADD_STATIC_METATYPE("quint16", QMetaType::UShort),
+ QT_ADD_STATIC_METATYPE("qint32", QMetaType::Int),
+ QT_ADD_STATIC_METATYPE("quint32", QMetaType::UInt),
+ QT_ADD_STATIC_METATYPE("qint64", QMetaType::LongLong),
+ QT_ADD_STATIC_METATYPE("quint64", QMetaType::ULongLong),
+ QT_ADD_STATIC_METATYPE("QList<QVariant>", QMetaType::QVariantList),
+ QT_ADD_STATIC_METATYPE("QMap<QString,QVariant>", QMetaType::QVariantMap),
+ QT_ADD_STATIC_METATYPE("QHash<QString,QVariant>", QMetaType::QVariantHash),
// let QMetaTypeId2 figure out the type at compile time
- {"qreal", QMetaTypeId2<qreal>::MetaType},
+ QT_ADD_STATIC_METATYPE("qreal", QMetaTypeId2<qreal>::MetaType),
- {0, QMetaType::Void}
+ {0, 0, QMetaType::Void}
};
struct QMetaTypeGuiHelper
@@ -410,24 +413,35 @@ const char *QMetaType::typeName(int type)
}
/*! \internal
- Same as QMetaType::type(), but doesn't lock the mutex.
+ Similar to QMetaType::type(), but only looks in the static set of types.
*/
-static int qMetaTypeType_unlocked(const QByteArray &typeName)
+static inline int qMetaTypeStaticType(const char *typeName, int length)
{
int i = 0;
- while (types[i].typeName && strcmp(typeName.constData(), types[i].typeName))
+ while (types[i].typeName && ((length != types[i].typeNameLength)
+ || strcmp(typeName, types[i].typeName))) {
++i;
- if (!types[i].type) {
- const QVector<QCustomTypeInfo> * const ct = customTypes();
- if (!ct)
- return 0;
+ }
+ return types[i].type;
+}
+
+/*! \internal
+ Similar to QMetaType::type(), but only looks in the custom set of
+ types, and doesn't lock the mutex.
+*/
+static int qMetaTypeCustomType_unlocked(const char *typeName, int length)
+{
+ const QVector<QCustomTypeInfo> * const ct = customTypes();
+ if (!ct)
+ return 0;
- for (int v = 0; v < ct->count(); ++v) {
- if (ct->at(v).typeName == typeName)
- return v + QMetaType::User;
+ for (int v = 0; v < ct->count(); ++v) {
+ if ((length == ct->at(v).typeName.size())
+ && !strcmp(typeName, ct->at(v).typeName.constData())) {
+ return v + QMetaType::User;
}
}
- return types[i].type;
+ return 0;
}
/*! \internal
@@ -449,16 +463,21 @@ int QMetaType::registerType(const char *typeName, Destructor destructor,
NS(QByteArray) normalizedTypeName = QMetaObject::normalizedType(typeName);
#endif
- QWriteLocker locker(customTypesLock());
- int idx = qMetaTypeType_unlocked(normalizedTypeName);
+ int idx = qMetaTypeStaticType(normalizedTypeName.constData(),
+ normalizedTypeName.size());
if (!idx) {
- QCustomTypeInfo inf;
- inf.typeName = normalizedTypeName;
- inf.constr = constructor;
- inf.destr = destructor;
- idx = ct->size() + User;
- ct->append(inf);
+ QWriteLocker locker(customTypesLock());
+ idx = qMetaTypeCustomType_unlocked(normalizedTypeName.constData(),
+ normalizedTypeName.size());
+ if (!idx) {
+ QCustomTypeInfo inf;
+ inf.typeName = normalizedTypeName;
+ inf.constr = constructor;
+ inf.destr = destructor;
+ idx = ct->size() + User;
+ ct->append(inf);
+ }
}
return idx;
}
@@ -517,14 +536,24 @@ bool QMetaType::isRegistered(int type)
*/
int QMetaType::type(const char *typeName)
{
-#ifdef QT_NO_QOBJECT
- const NS(QByteArray) normalizedTypeName = typeName;
-#else
- const NS(QByteArray) normalizedTypeName = QMetaObject::normalizedType(typeName);
+ int length = qstrlen(typeName);
+ int type = qMetaTypeStaticType(typeName, length);
+ if (!type) {
+ QReadLocker locker(customTypesLock());
+ type = qMetaTypeCustomType_unlocked(typeName, length);
+#ifndef QT_NO_QOBJECT
+ if (!type) {
+ const NS(QByteArray) normalizedTypeName = QMetaObject::normalizedType(typeName);
+ type = qMetaTypeStaticType(normalizedTypeName.constData(),
+ normalizedTypeName.size());
+ if (!type) {
+ type = qMetaTypeCustomType_unlocked(normalizedTypeName.constData(),
+ normalizedTypeName.size());
+ }
+ }
#endif
-
- QReadLocker locker(customTypesLock());
- return qMetaTypeType_unlocked(normalizedTypeName);
+ }
+ return type;
}
#ifndef QT_NO_DATASTREAM
diff --git a/src/corelib/tools/qsimd_p.h b/src/corelib/tools/qsimd_p.h
index 556db14..369fab7 100644
--- a/src/corelib/tools/qsimd_p.h
+++ b/src/corelib/tools/qsimd_p.h
@@ -61,7 +61,7 @@ QT_MODULE(Core)
#endif
// SSE intrinsics
-#if defined(__SSE2__)
+#if defined(__SSE2__) && !defined(QT_BOOTSTRAPPED)
#if defined(QT_LINUXBASE)
/// this is an evil hack - the posix_memalign declaration in LSB
/// is wrong - see http://bugs.linuxbase.org/show_bug.cgi?id=2431
diff --git a/src/declarative/graphicsitems/qdeclarativeeffects.cpp b/src/declarative/graphicsitems/qdeclarativeeffects.cpp
index efab24e..ea1f9cc 100644
--- a/src/declarative/graphicsitems/qdeclarativeeffects.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeeffects.cpp
@@ -45,6 +45,7 @@
/*!
\qmlclass Blur QGraphicsBlurEffect
+ \since 4.7
\brief The Blur object provides a blur effect.
A blur effect blurs the source item. This effect is useful for reducing details;
@@ -80,6 +81,7 @@
/*!
\qmlclass Colorize QGraphicsColorizeEffect
+ \since 4.7
\brief The Colorize object provides a colorize effect.
A colorize effect renders the source item with a tint of its color.
@@ -106,6 +108,7 @@
/*!
\qmlclass DropShadow QGraphicsDropShadowEffect
+ \since 4.7
\brief The DropShadow object provides a drop shadow effect.
A drop shadow effect renders the source item with a drop shadow. The color of
@@ -147,6 +150,7 @@
/*!
\qmlclass Opacity QGraphicsOpacityEffect
+ \since 4.7
\brief The Opacity object provides an opacity effect.
An opacity effect renders the source with an opacity. This effect is useful
diff --git a/src/declarative/graphicsitems/qdeclarativeevents.cpp b/src/declarative/graphicsitems/qdeclarativeevents.cpp
index d2cbb54..8be2f40 100644
--- a/src/declarative/graphicsitems/qdeclarativeevents.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeevents.cpp
@@ -114,6 +114,7 @@ Item {
/*!
\qmlclass MouseEvent QDeclarativeMouseEvent
+ \since 4.7
\brief The MouseEvent object provides information about a mouse event.
The position of the mouse can be found via the x and y properties.
diff --git a/src/declarative/graphicsitems/qdeclarativeflickable.cpp b/src/declarative/graphicsitems/qdeclarativeflickable.cpp
index 3f4a9ce..c54ddd0 100644
--- a/src/declarative/graphicsitems/qdeclarativeflickable.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeflickable.cpp
@@ -365,6 +365,7 @@ void QDeclarativeFlickablePrivate::updateBeginningEnd()
/*!
\qmlclass Flickable QDeclarativeFlickable
+ \since 4.7
\brief The Flickable item provides a surface that can be "flicked".
\inherits Item
diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp
index 0a103f3..5064a50 100644
--- a/src/declarative/graphicsitems/qdeclarativegridview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp
@@ -675,6 +675,7 @@ void QDeclarativeGridViewPrivate::updateCurrent(int modelIndex)
/*!
\qmlclass GridView QDeclarativeGridView
+ \since 4.7
\inherits Flickable
\brief The GridView item provides a grid view of items provided by a model.
diff --git a/src/declarative/qml/qdeclarativescript.cpp b/src/declarative/qml/qdeclarativescript.cpp
index acfb9e1..ac4b2c1 100644
--- a/src/declarative/qml/qdeclarativescript.cpp
+++ b/src/declarative/qml/qdeclarativescript.cpp
@@ -43,6 +43,7 @@
/*!
\qmlclass Script QDeclarativeScript
+ \since 4.7
\brief The Script element provides a way to add JavaScript code snippets in QML.
\ingroup group_utility
diff --git a/src/declarative/util/qdeclarativeanimation.cpp b/src/declarative/util/qdeclarativeanimation.cpp
index 181ef0a..d0a1299 100644
--- a/src/declarative/util/qdeclarativeanimation.cpp
+++ b/src/declarative/util/qdeclarativeanimation.cpp
@@ -71,7 +71,7 @@ QT_BEGIN_NAMESPACE
/*!
\qmlclass Animation QDeclarativeAbstractAnimation
- \since 4.7
+ \since 4.7
\brief The Animation element is the base of all QML animations.
The Animation element cannot be used directly in a QML file. It exists
@@ -515,7 +515,7 @@ void QDeclarativeAbstractAnimation::timelineComplete()
/*!
\qmlclass PauseAnimation QDeclarativePauseAnimation
- \since 4.7
+ \since 4.7
\inherits Animation
\brief The PauseAnimation element provides a pause for an animation.
@@ -589,7 +589,7 @@ QAbstractAnimation *QDeclarativePauseAnimation::qtAnimation()
/*!
\qmlclass ColorAnimation QDeclarativeColorAnimation
- \since 4.7
+ \since 4.7
\inherits PropertyAnimation
\brief The ColorAnimation element allows you to animate color changes.
@@ -653,7 +653,7 @@ void QDeclarativeColorAnimation::setTo(const QColor &t)
/*!
\qmlclass ScriptAction QDeclarativeScriptAction
- \since 4.7
+ \since 4.7
\inherits Animation
\brief The ScriptAction element allows scripts to be run during an animation.
@@ -759,7 +759,7 @@ QAbstractAnimation *QDeclarativeScriptAction::qtAnimation()
/*!
\qmlclass PropertyAction QDeclarativePropertyAction
- \since 4.7
+ \since 4.7
\inherits Animation
\brief The PropertyAction element allows immediate property changes during animation.
@@ -1008,7 +1008,7 @@ void QDeclarativePropertyAction::transition(QDeclarativeStateActions &actions,
/*!
\qmlclass ParentAction QDeclarativeParentAction
- \since 4.7
+ \since 4.7
\inherits Animation
\brief The ParentAction element allows parent changes during animation.
@@ -1212,7 +1212,7 @@ void QDeclarativeParentAction::transition(QDeclarativeStateActions &actions,
/*!
\qmlclass NumberAnimation QDeclarativeNumberAnimation
- \since 4.7
+ \since 4.7
\inherits PropertyAnimation
\brief The NumberAnimation element allows you to animate changes in properties of type qreal.
@@ -1276,7 +1276,7 @@ void QDeclarativeNumberAnimation::setTo(qreal t)
/*!
\qmlclass Vector3dAnimation QDeclarativeVector3dAnimation
- \since 4.7
+ \since 4.7
\inherits PropertyAnimation
\brief The Vector3dAnimation element allows you to animate changes in properties of type QVector3d.
*/
@@ -1335,6 +1335,7 @@ void QDeclarativeVector3dAnimation::setTo(QVector3D t)
/*!
\qmlclass RotationAnimation QDeclarativeRotationAnimation
+ \since 4.7
\inherits PropertyAnimation
\brief The RotationAnimation element allows you to animate rotations.
@@ -1549,7 +1550,7 @@ QDeclarativeListProperty<QDeclarativeAbstractAnimation> QDeclarativeAnimationGro
/*!
\qmlclass SequentialAnimation QDeclarativeSequentialAnimation
- \since 4.7
+ \since 4.7
\inherits Animation
\brief The SequentialAnimation element allows you to run animations sequentially.
@@ -1610,7 +1611,7 @@ void QDeclarativeSequentialAnimation::transition(QDeclarativeStateActions &actio
/*!
\qmlclass ParallelAnimation QDeclarativeParallelAnimation
- \since 4.7
+ \since 4.7
\inherits Animation
\brief The ParallelAnimation element allows you to run animations in parallel.
@@ -1719,7 +1720,7 @@ void QDeclarativePropertyAnimationPrivate::convertVariant(QVariant &variant, int
/*!
\qmlclass PropertyAnimation QDeclarativePropertyAnimation
- \since 4.7
+ \since 4.7
\inherits Animation
\brief The PropertyAnimation element allows you to animate property changes.
diff --git a/src/declarative/util/qdeclarativebehavior.cpp b/src/declarative/util/qdeclarativebehavior.cpp
index e0189dc..5352341 100644
--- a/src/declarative/util/qdeclarativebehavior.cpp
+++ b/src/declarative/util/qdeclarativebehavior.cpp
@@ -70,6 +70,7 @@ public:
/*!
\qmlclass Behavior QDeclarativeBehavior
+ \since 4.7
\brief The Behavior element allows you to specify a default animation for a property change.
Behaviors provide one way to specify \l{qdeclarativeanimation.html}{animations} in QML.
diff --git a/src/declarative/util/qdeclarativeeasefollow.cpp b/src/declarative/util/qdeclarativeeasefollow.cpp
index 232dc90..3fa9866 100644
--- a/src/declarative/util/qdeclarativeeasefollow.cpp
+++ b/src/declarative/util/qdeclarativeeasefollow.cpp
@@ -251,6 +251,7 @@ void QDeclarativeEaseFollowPrivate::tick(int t)
/*!
\qmlclass EaseFollow QDeclarativeEaseFollow
+ \since 4.7
\brief The EaseFollow element allows a property to smoothly track a value.
The EaseFollow smoothly animates a property's value to a set target value
diff --git a/src/declarative/util/qdeclarativefontloader.cpp b/src/declarative/util/qdeclarativefontloader.cpp
index ac30384..4d12ae1 100644
--- a/src/declarative/util/qdeclarativefontloader.cpp
+++ b/src/declarative/util/qdeclarativefontloader.cpp
@@ -75,6 +75,7 @@ public:
/*!
\qmlclass FontLoader QDeclarativeFontLoader
+ \since 4.7
\ingroup group_utility
\brief This item allows using fonts by name or url.
diff --git a/src/declarative/util/qdeclarativelistmodel.cpp b/src/declarative/util/qdeclarativelistmodel.cpp
index e78e0e1..e3f26d7 100644
--- a/src/declarative/util/qdeclarativelistmodel.cpp
+++ b/src/declarative/util/qdeclarativelistmodel.cpp
@@ -70,6 +70,7 @@ static void dump(ModelNode *node, int ind);
/*!
\qmlclass ListModel QDeclarativeListModel
+ \since 4.7
\brief The ListModel element defines a free-form list data source.
The ListModel is a simple hierarchy of elements containing data roles. The contents can
@@ -936,6 +937,7 @@ bool QDeclarativeListModelParser::definesEmptyList(const QString &s)
/*!
\qmlclass ListElement
+ \since 4.7
\brief The ListElement element defines a data item in a ListModel.
\sa ListModel
diff --git a/src/declarative/util/qdeclarativespringfollow.cpp b/src/declarative/util/qdeclarativespringfollow.cpp
index 012e6a0..6205ab9 100644
--- a/src/declarative/util/qdeclarativespringfollow.cpp
+++ b/src/declarative/util/qdeclarativespringfollow.cpp
@@ -213,6 +213,7 @@ void QDeclarativeSpringFollowPrivate::stop()
/*!
\qmlclass SpringFollow QDeclarativeSpringFollow
+ \since 4.7
\brief The SpringFollow element allows a property to track a value.
In example below, \e rect2 will follow \e rect1 moving with a velocity of up to 200:
diff --git a/src/declarative/util/qdeclarativestategroup.cpp b/src/declarative/util/qdeclarativestategroup.cpp
index 1a7c256..00119ce 100644
--- a/src/declarative/util/qdeclarativestategroup.cpp
+++ b/src/declarative/util/qdeclarativestategroup.cpp
@@ -84,6 +84,7 @@ public:
/*!
\qmlclass StateGroup QDeclarativeStateGroup
+ \since 4.7
\brief The StateGroup element provides state support for non-Item elements.
Item (and all dervied elements) provides built in support for states and transitions
diff --git a/src/declarative/util/qdeclarativesystempalette.cpp b/src/declarative/util/qdeclarativesystempalette.cpp
index 1e00f22..d819c27 100644
--- a/src/declarative/util/qdeclarativesystempalette.cpp
+++ b/src/declarative/util/qdeclarativesystempalette.cpp
@@ -58,6 +58,7 @@ public:
/*!
\qmlclass SystemPalette QDeclarativeSystemPalette
+ \since 4.7
\ingroup group_utility
\brief The SystemPalette item gives access to the Qt palettes.
\sa QPalette
diff --git a/src/declarative/util/qdeclarativetimer.cpp b/src/declarative/util/qdeclarativetimer.cpp
index 89c461b..d7e02b1 100644
--- a/src/declarative/util/qdeclarativetimer.cpp
+++ b/src/declarative/util/qdeclarativetimer.cpp
@@ -70,6 +70,7 @@ public:
/*!
\qmlclass Timer QDeclarativeTimer
+ \since 4.7
\brief The Timer item triggers a handler at a specified interval.
A timer can be used to trigger an action either once, or repeatedly
diff --git a/src/multimedia/qml/qdeclarativeaudio.cpp b/src/multimedia/qml/qdeclarativeaudio.cpp
index 67df625..1cbf594 100644
--- a/src/multimedia/qml/qdeclarativeaudio.cpp
+++ b/src/multimedia/qml/qdeclarativeaudio.cpp
@@ -48,6 +48,7 @@ QT_BEGIN_NAMESPACE
/*!
\qmlclass Audio QDeclarativeAudio
+ \since 4.7
\brief The Audio element allows you to add audio playback to a scene.
\qml
diff --git a/src/multimedia/qml/qdeclarativevideo.cpp b/src/multimedia/qml/qdeclarativevideo.cpp
index d0e94f6..7f62075 100644
--- a/src/multimedia/qml/qdeclarativevideo.cpp
+++ b/src/multimedia/qml/qdeclarativevideo.cpp
@@ -69,6 +69,7 @@ void QDeclarativeVideo::_q_error(int errorCode, const QString &errorString)
/*!
\qmlclass Video QDeclarativeVideo
+ \since 4.7
\brief The Video element allows you to add videos to a scene.
\inherits Item
diff --git a/src/multimedia/qml/qsoundeffect.cpp b/src/multimedia/qml/qsoundeffect.cpp
index 919aa75..541e6c9 100644
--- a/src/multimedia/qml/qsoundeffect.cpp
+++ b/src/multimedia/qml/qsoundeffect.cpp
@@ -56,6 +56,7 @@ QT_BEGIN_NAMESPACE
/*!
\qmlclass SoundEffect QSoundEffect
+ \since 4.7
\brief The SoundEffect element provides a way to play sound effects in qml.
The following example plays a wav file on mouse click.
diff --git a/src/network/access/qnetworkreplyimpl_p.h b/src/network/access/qnetworkreplyimpl_p.h
index ec413cc..b4fbd1e 100644
--- a/src/network/access/qnetworkreplyimpl_p.h
+++ b/src/network/access/qnetworkreplyimpl_p.h
@@ -199,7 +199,7 @@ class QDisabledNetworkReply : public QNetworkReply
public:
QDisabledNetworkReply(QObject *parent, const QNetworkRequest &req,
- const QNetworkAccessManager::Operation op);
+ QNetworkAccessManager::Operation op);
~QDisabledNetworkReply();
void abort() { }
diff --git a/src/plugins/bearer/corewlan/qcorewlanengine.mm b/src/plugins/bearer/corewlan/qcorewlanengine.mm
index a5384d1..9a28a33 100644
--- a/src/plugins/bearer/corewlan/qcorewlanengine.mm
+++ b/src/plugins/bearer/corewlan/qcorewlanengine.mm
@@ -154,9 +154,9 @@ void QCoreWlanEngine::connectToId(const QString &id)
NSDictionary *parametersDict;
NSArray* apArray;
- CW8021XProfile *user8021XProfile;
- NSError *err;
- NSMutableDictionary *params;
+ CW8021XProfile *user8021XProfile;
+ NSError *err;
+ NSMutableDictionary *params;
while ((wProfile = [enumerator nextObject])) { //CWWirelessProfile
@@ -185,10 +185,8 @@ void QCoreWlanEngine::connectToId(const QString &id)
bool result = [wifiInterface associateToNetwork: apNetwork parameters:[NSDictionary dictionaryWithDictionary:params] error:&err];
if(!result) {
- qWarning() <<"ERROR"<< nsstringToQString([err localizedDescription ]);
emit connectionError(id, ConnectError);
} else {
- [apNetwork release];
[autoreleasepool release];
return;
}
@@ -350,83 +348,81 @@ QStringList QCoreWlanEngine::scanForSsids(const QString &interfaceName)
NSAutoreleasePool *autoreleasepool = [[NSAutoreleasePool alloc] init];
CWInterface *currentInterface = [CWInterface interfaceWithName:qstringToNSString(interfaceName)];
- NSError *err = nil;
- NSDictionary *parametersDict = nil;
- NSArray* apArray = [currentInterface scanForNetworksWithParameters:parametersDict error:&err];
+ if([currentInterface power]) {
+ NSError *err = nil;
+ NSDictionary *parametersDict = nil;
+ NSArray* apArray = [currentInterface scanForNetworksWithParameters:parametersDict error:&err];
- CWNetwork *apNetwork;
- if (!err) {
- for(uint row=0; row < [apArray count]; row++ ) {
- NSAutoreleasePool *looppool = [[NSAutoreleasePool alloc] init];
+ CWNetwork *apNetwork;
+ if (!err) {
+ for(uint row=0; row < [apArray count]; row++ ) {
+ NSAutoreleasePool *looppool = [[NSAutoreleasePool alloc] init];
- apNetwork = [apArray objectAtIndex:row];
+ apNetwork = [apArray objectAtIndex:row];
- const QString networkSsid = nsstringToQString([apNetwork ssid]);
+ const QString networkSsid = nsstringToQString([apNetwork ssid]);
- const QString id = QString::number(qHash(QLatin1String("corewlan:") + networkSsid));
- found.append(id);
+ const QString id = QString::number(qHash(QLatin1String("corewlan:") + networkSsid));
+ found.append(id);
- QNetworkConfiguration::StateFlags state = QNetworkConfiguration::Undefined;
+ QNetworkConfiguration::StateFlags state = QNetworkConfiguration::Undefined;
- if ([currentInterface.interfaceState intValue] == kCWInterfaceStateRunning) {
- if (networkSsid == nsstringToQString([currentInterface ssid]))
- state = QNetworkConfiguration::Active;
- } else {
- if (isKnownSsid(interfaceName, networkSsid))
- state = QNetworkConfiguration::Discovered;
- else
- state = QNetworkConfiguration::Defined;
- }
+ if ([currentInterface.interfaceState intValue] == kCWInterfaceStateRunning) {
+ if (networkSsid == nsstringToQString([currentInterface ssid]))
+ state = QNetworkConfiguration::Active;
+ } else {
+ if (isKnownSsid(interfaceName, networkSsid))
+ state = QNetworkConfiguration::Discovered;
+ else
+ state = QNetworkConfiguration::Defined;
+ }
- if (accessPointConfigurations.contains(id)) {
- QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(id);
+ if (accessPointConfigurations.contains(id)) {
+ QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(id);
- bool changed = false;
+ bool changed = false;
- if (!ptr->isValid) {
- ptr->isValid = true;
- changed = true;
- }
+ if (!ptr->isValid) {
+ ptr->isValid = true;
+ changed = true;
+ }
- if (ptr->name != networkSsid) {
- ptr->name = networkSsid;
- changed = true;
- }
+ if (ptr->name != networkSsid) {
+ ptr->name = networkSsid;
+ changed = true;
+ }
- if (ptr->id != id) {
- ptr->id = id;
- changed = true;
- }
+ if (ptr->id != id) {
+ ptr->id = id;
+ changed = true;
+ }
- if (ptr->state != state) {
- ptr->state = state;
- changed = true;
- }
+ if (ptr->state != state) {
+ ptr->state = state;
+ changed = true;
+ }
- if (changed)
- emit configurationChanged(ptr);
- } else {
- QNetworkConfigurationPrivatePointer ptr(new QNetworkConfigurationPrivate);
+ if (changed)
+ emit configurationChanged(ptr);
+ } else {
+ QNetworkConfigurationPrivatePointer ptr(new QNetworkConfigurationPrivate);
- ptr->name = networkSsid;
- ptr->isValid = true;
- ptr->id = id;
- ptr->state = state;
- ptr->type = QNetworkConfiguration::InternetAccessPoint;
- ptr->bearer = QLatin1String("WLAN");
+ ptr->name = networkSsid;
+ ptr->isValid = true;
+ ptr->id = id;
+ ptr->state = state;
+ ptr->type = QNetworkConfiguration::InternetAccessPoint;
+ ptr->bearer = QLatin1String("WLAN");
- accessPointConfigurations.insert(id, ptr);
- configurationInterface.insert(id, interfaceName);
+ accessPointConfigurations.insert(id, ptr);
+ configurationInterface.insert(id, interfaceName);
- emit configurationAdded(ptr);
+ emit configurationAdded(ptr);
+ }
+ [looppool release];
}
- [looppool release];
}
- } else {
- qWarning() << "ERROR scanning for ssids" << nsstringToQString([err localizedDescription])
- <<nsstringToQString([err domain]);
}
-
[autoreleasepool drain];
#else
Q_UNUSED(interfaceName);
diff --git a/src/plugins/bearer/qnetworksession_impl.cpp b/src/plugins/bearer/qnetworksession_impl.cpp
index f41fdba..05ce62f 100644
--- a/src/plugins/bearer/qnetworksession_impl.cpp
+++ b/src/plugins/bearer/qnetworksession_impl.cpp
@@ -201,22 +201,22 @@ void QNetworkSessionPrivateImpl::stop()
void QNetworkSessionPrivateImpl::migrate()
{
- qWarning("This platform does not support roaming (%s).", __FUNCTION__);
+ qWarning("This platform does not support roaming (%s).", Q_FUNC_INFO);
}
void QNetworkSessionPrivateImpl::accept()
{
- qWarning("This platform does not support roaming (%s).", __FUNCTION__);
+ qWarning("This platform does not support roaming (%s).", Q_FUNC_INFO);
}
void QNetworkSessionPrivateImpl::ignore()
{
- qWarning("This platform does not support roaming (%s).", __FUNCTION__);
+ qWarning("This platform does not support roaming (%s).", Q_FUNC_INFO);
}
void QNetworkSessionPrivateImpl::reject()
{
- qWarning("This platform does not support roaming (%s).", __FUNCTION__);
+ qWarning("This platform does not support roaming (%s).", Q_FUNC_INFO);
}
QNetworkInterface QNetworkSessionPrivateImpl::currentInterface() const
diff --git a/tests/benchmarks/corelib/kernel/kernel.pro b/tests/benchmarks/corelib/kernel/kernel.pro
index 91cf3c5..da3f0d6 100644
--- a/tests/benchmarks/corelib/kernel/kernel.pro
+++ b/tests/benchmarks/corelib/kernel/kernel.pro
@@ -2,5 +2,6 @@ TEMPLATE = subdirs
SUBDIRS = \
events \
qmetaobject \
+ qmetatype \
qobject \
qvariant
diff --git a/tests/benchmarks/corelib/kernel/qmetatype/qmetatype.pro b/tests/benchmarks/corelib/kernel/qmetatype/qmetatype.pro
new file mode 100644
index 0000000..80f9a2a
--- /dev/null
+++ b/tests/benchmarks/corelib/kernel/qmetatype/qmetatype.pro
@@ -0,0 +1,7 @@
+load(qttest_p4)
+QT = core
+TEMPLATE = app
+TARGET = tst_qmetatype
+
+SOURCES += tst_qmetatype.cpp
+
diff --git a/tests/benchmarks/corelib/kernel/qmetatype/tst_qmetatype.cpp b/tests/benchmarks/corelib/kernel/qmetatype/tst_qmetatype.cpp
new file mode 100644
index 0000000..36399af
--- /dev/null
+++ b/tests/benchmarks/corelib/kernel/qmetatype/tst_qmetatype.cpp
@@ -0,0 +1,233 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <qtest.h>
+#include <QtCore/qmetatype.h>
+
+//TESTED_FILES=
+
+class tst_QMetaType : public QObject
+{
+ Q_OBJECT
+
+public:
+ tst_QMetaType();
+ virtual ~tst_QMetaType();
+
+private slots:
+ void typeBuiltin_data();
+ void typeBuiltin();
+ void typeBuiltinNotNormalized_data();
+ void typeBuiltinNotNormalized();
+ void typeCustom();
+ void typeCustomNotNormalized();
+ void typeNotRegistered();
+ void typeNotRegisteredNotNormalized();
+
+ void typeNameBuiltin_data();
+ void typeNameBuiltin();
+ void typeNameCustom();
+ void typeNameNotRegistered();
+
+ void isRegisteredBuiltin_data();
+ void isRegisteredBuiltin();
+ void isRegisteredCustom();
+ void isRegisteredNotRegistered();
+};
+
+tst_QMetaType::tst_QMetaType()
+{
+}
+
+tst_QMetaType::~tst_QMetaType()
+{
+}
+
+void tst_QMetaType::typeBuiltin_data()
+{
+ QTest::addColumn<QByteArray>("typeName");
+ for (int i = 0; i < QMetaType::User; ++i) {
+ const char *name = QMetaType::typeName(i);
+ if (name)
+ QTest::newRow(name) << QByteArray(name);
+ }
+}
+
+void tst_QMetaType::typeBuiltin()
+{
+ QFETCH(QByteArray, typeName);
+ const char *nm = typeName.constData();
+ QBENCHMARK {
+ for (int i = 0; i < 100000; ++i)
+ QMetaType::type(nm);
+ }
+}
+
+void tst_QMetaType::typeBuiltinNotNormalized_data()
+{
+ QTest::addColumn<QByteArray>("typeName");
+ for (int i = 0; i < QMetaType::User; ++i) {
+ const char *name = QMetaType::typeName(i);
+ if (name)
+ QTest::newRow(name) << QByteArray(name).append(" ");
+ }
+}
+
+void tst_QMetaType::typeBuiltinNotNormalized()
+{
+ QFETCH(QByteArray, typeName);
+ const char *nm = typeName.constData();
+ QBENCHMARK {
+ for (int i = 0; i < 10000; ++i)
+ QMetaType::type(nm);
+ }
+}
+
+struct Foo { int i; };
+
+void tst_QMetaType::typeCustom()
+{
+ qRegisterMetaType<Foo>("Foo");
+ QBENCHMARK {
+ for (int i = 0; i < 10000; ++i)
+ QMetaType::type("Foo");
+ }
+}
+
+void tst_QMetaType::typeCustomNotNormalized()
+{
+ qRegisterMetaType<Foo>("Foo");
+ QBENCHMARK {
+ for (int i = 0; i < 10000; ++i)
+ QMetaType::type("Foo ");
+ }
+}
+
+void tst_QMetaType::typeNotRegistered()
+{
+ Q_ASSERT(QMetaType::type("Bar") == 0);
+ QBENCHMARK {
+ for (int i = 0; i < 10000; ++i)
+ QMetaType::type("Bar");
+ }
+}
+
+void tst_QMetaType::typeNotRegisteredNotNormalized()
+{
+ Q_ASSERT(QMetaType::type("Bar") == 0);
+ QBENCHMARK {
+ for (int i = 0; i < 10000; ++i)
+ QMetaType::type("Bar ");
+ }
+}
+
+void tst_QMetaType::typeNameBuiltin_data()
+{
+ QTest::addColumn<int>("type");
+ for (int i = 0; i < QMetaType::User; ++i) {
+ const char *name = QMetaType::typeName(i);
+ if (name)
+ QTest::newRow(name) << i;
+ }
+}
+
+void tst_QMetaType::typeNameBuiltin()
+{
+ QFETCH(int, type);
+ QBENCHMARK {
+ for (int i = 0; i < 500000; ++i)
+ QMetaType::typeName(type);
+ }
+}
+
+void tst_QMetaType::typeNameCustom()
+{
+ int type = qRegisterMetaType<Foo>("Foo");
+ QBENCHMARK {
+ for (int i = 0; i < 100000; ++i)
+ QMetaType::typeName(type);
+ }
+}
+
+void tst_QMetaType::typeNameNotRegistered()
+{
+ // We don't care much about this case, but test it anyway.
+ Q_ASSERT(QMetaType::typeName(-1) == 0);
+ QBENCHMARK {
+ for (int i = 0; i < 500000; ++i)
+ QMetaType::typeName(-1);
+ }
+}
+
+void tst_QMetaType::isRegisteredBuiltin_data()
+{
+ typeNameBuiltin_data();
+}
+
+void tst_QMetaType::isRegisteredBuiltin()
+{
+ QFETCH(int, type);
+ QBENCHMARK {
+ for (int i = 0; i < 500000; ++i)
+ QMetaType::isRegistered(type);
+ }
+}
+
+void tst_QMetaType::isRegisteredCustom()
+{
+ int type = qRegisterMetaType<Foo>("Foo");
+ QBENCHMARK {
+ for (int i = 0; i < 100000; ++i)
+ QMetaType::isRegistered(type);
+ }
+}
+
+void tst_QMetaType::isRegisteredNotRegistered()
+{
+ Q_ASSERT(QMetaType::typeName(-1) == 0);
+ QBENCHMARK {
+ for (int i = 0; i < 100000; ++i)
+ QMetaType::isRegistered(-1);
+ }
+}
+
+QTEST_MAIN(tst_QMetaType)
+#include "tst_qmetatype.moc"
diff --git a/tools/qdoc3/node.cpp b/tools/qdoc3/node.cpp
index 4ddcfb1..358fdd1 100644
--- a/tools/qdoc3/node.cpp
+++ b/tools/qdoc3/node.cpp
@@ -1275,6 +1275,14 @@ QmlClassNode::QmlClassNode(InnerNode *parent,
}
/*!
+ I made this so I could print a debug message here.
+ */
+QmlClassNode::~QmlClassNode()
+{
+ qDebug() << "Deleting QmlClassNode:" << name();
+}
+
+/*!
The base file name for this kind of node has "qml_"
prepended to it.
diff --git a/tools/qdoc3/node.h b/tools/qdoc3/node.h
index de26025..ae5dcd7 100644
--- a/tools/qdoc3/node.h
+++ b/tools/qdoc3/node.h
@@ -379,7 +379,7 @@ class QmlClassNode : public FakeNode
QmlClassNode(InnerNode *parent,
const QString& name,
const ClassNode* cn);
- virtual ~QmlClassNode() { }
+ virtual ~QmlClassNode();
const ClassNode* classNode() const { return cnode; }
virtual QString fileBase() const;