summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2013-01-29 10:17:53 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-01-29 11:33:35 +0100
commit3eb588078e7f4d62053584a70f7600b19ec99a0f (patch)
tree432c6bfcabf44b8fdbc4a8e1ab58054e548a77bf /src/corelib/kernel
parent7b8ab4204417844e72bb66696227a422f4ef3e2d (diff)
parent02ba93dd3dc640421c79c655064f0b2c4f1465cd (diff)
Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev
Diffstat (limited to 'src/corelib/kernel')
-rw-r--r--src/corelib/kernel/qcoreapplication.cpp2
-rw-r--r--src/corelib/kernel/qmetaobject.cpp4
-rw-r--r--src/corelib/kernel/qmimedata.cpp12
-rw-r--r--src/corelib/kernel/qobject.h24
-rw-r--r--src/corelib/kernel/qvariant.cpp4
5 files changed, 17 insertions, 29 deletions
diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp
index 8d7ec4a44f..05688d3ba6 100644
--- a/src/corelib/kernel/qcoreapplication.cpp
+++ b/src/corelib/kernel/qcoreapplication.cpp
@@ -789,7 +789,7 @@ void QCoreApplication::setQuitLockEnabled(bool enabled)
*/
bool QCoreApplication::notifyInternal(QObject *receiver, QEvent *event)
{
- // Make it possible for QtScript to hook into events even
+ // Make it possible for Qt Script to hook into events even
// though QApplication is subclassed...
bool result = false;
void *cbdata[] = { receiver, event, &result };
diff --git a/src/corelib/kernel/qmetaobject.cpp b/src/corelib/kernel/qmetaobject.cpp
index b2d3470aee..14d96e96fd 100644
--- a/src/corelib/kernel/qmetaobject.cpp
+++ b/src/corelib/kernel/qmetaobject.cpp
@@ -2804,7 +2804,7 @@ QVariant QMetaProperty::read(const QObject *object) const
}
// the status variable is changed by qt_metacall to indicate what it did
- // this feature is currently only used by QtDBus and should not be depended
+ // this feature is currently only used by Qt D-Bus and should not be depended
// upon. Don't change it without looking into QDBusAbstractInterface first
// -1 (unchanged): normal qt_metacall, result stored in argv[0]
// changed: result stored directly in value
@@ -2883,7 +2883,7 @@ bool QMetaProperty::write(QObject *object, const QVariant &value) const
}
// the status variable is changed by qt_metacall to indicate what it did
- // this feature is currently only used by QtDBus and should not be depended
+ // this feature is currently only used by Qt D-Bus and should not be depended
// upon. Don't change it without looking into QDBusAbstractInterface first
// -1 (unchanged): normal qt_metacall, result stored in argv[0]
// changed: result stored directly in value, return the value of status
diff --git a/src/corelib/kernel/qmimedata.cpp b/src/corelib/kernel/qmimedata.cpp
index a54980513c..6e571d2969 100644
--- a/src/corelib/kernel/qmimedata.cpp
+++ b/src/corelib/kernel/qmimedata.cpp
@@ -452,8 +452,8 @@ bool QMimeData::hasHtml() const
Returns a QVariant storing a QImage if the object can return an
image; otherwise returns a null variant.
- A QVariant is used because QMimeData belongs to the \l QtCore
- library, whereas QImage belongs to \l QtGui. To convert the
+ A QVariant is used because QMimeData belongs to the Qt Core
+ module, whereas QImage belongs to Qt GUI. To convert the
QVariant to a QImage, simply use qvariant_cast(). For example:
\snippet code/src_corelib_kernel_qmimedata.cpp 5
@@ -469,8 +469,8 @@ QVariant QMimeData::imageData() const
/*!
Sets the data in the object to the given \a image.
- A QVariant is used because QMimeData belongs to the \l QtCore
- library, whereas QImage belongs to \l QtGui. The conversion
+ A QVariant is used because QMimeData belongs to the Qt Core
+ module, whereas QImage belongs to Qt GUI. The conversion
from QImage to QVariant is implicit. For example:
\snippet code/src_corelib_kernel_qmimedata.cpp 6
@@ -499,8 +499,8 @@ bool QMimeData::hasImage() const
color (MIME type \c application/x-color); otherwise returns a
null variant.
- A QVariant is used because QMimeData belongs to the \l QtCore
- library, whereas QColor belongs to \l QtGui. To convert the
+ A QVariant is used because QMimeData belongs to the Qt Core
+ module, whereas QColor belongs to Qt GUI. To convert the
QVariant to a QColor, simply use qvariant_cast(). For example:
\snippet code/src_corelib_kernel_qmimedata.cpp 7
diff --git a/src/corelib/kernel/qobject.h b/src/corelib/kernel/qobject.h
index 7d47c377da..7beaa32855 100644
--- a/src/corelib/kernel/qobject.h
+++ b/src/corelib/kernel/qobject.h
@@ -161,12 +161,8 @@ public:
inline QList<T> findChildren(const QString &aName = QString(), Qt::FindChildOptions options = Qt::FindChildrenRecursively) const
{
QList<T> list;
- union {
- QList<T> *typedList;
- QList<void *> *voidList;
- } u;
- u.typedList = &list;
- qt_qFindChildren_helper(this, aName, reinterpret_cast<T>(0)->staticMetaObject, u.voidList, options);
+ qt_qFindChildren_helper(this, aName, reinterpret_cast<T>(0)->staticMetaObject,
+ reinterpret_cast<QList<void *> *>(&list), options);
return list;
}
@@ -175,12 +171,8 @@ public:
inline QList<T> findChildren(const QRegExp &re, Qt::FindChildOptions options = Qt::FindChildrenRecursively) const
{
QList<T> list;
- union {
- QList<T> *typedList;
- QList<void *> *voidList;
- } u;
- u.typedList = &list;
- qt_qFindChildren_helper(this, re, reinterpret_cast<T>(0)->staticMetaObject, u.voidList, options);
+ qt_qFindChildren_helper(this, re, reinterpret_cast<T>(0)->staticMetaObject,
+ reinterpret_cast<QList<void *> *>(&list), options);
return list;
}
#endif
@@ -190,12 +182,8 @@ public:
inline QList<T> findChildren(const QRegularExpression &re, Qt::FindChildOptions options = Qt::FindChildrenRecursively) const
{
QList<T> list;
- union {
- QList<T> *typedList;
- QList<void *> *voidList;
- } u;
- u.typedList = &list;
- qt_qFindChildren_helper(this, re, reinterpret_cast<T>(0)->staticMetaObject, u.voidList, options);
+ qt_qFindChildren_helper(this, re, reinterpret_cast<T>(0)->staticMetaObject,
+ reinterpret_cast<QList<void *> *>(&list), options);
return list;
}
#endif
diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp
index 882bfd9468..8cc26c5ff6 100644
--- a/src/corelib/kernel/qvariant.cpp
+++ b/src/corelib/kernel/qvariant.cpp
@@ -949,8 +949,8 @@ Q_CORE_EXPORT void QVariantPrivate::registerHandler(const int /* Modules::Names
\section1 A Note on GUI Types
- Because QVariant is part of the QtCore library, it cannot provide
- conversion functions to data types defined in QtGui, such as
+ Because QVariant is part of the Qt Core module, it cannot provide
+ conversion functions to data types defined in Qt GUI, such as
QColor, QImage, and QPixmap. In other words, there is no \c
toColor() function. Instead, you can use the QVariant::value() or
the qvariant_cast() template function. For example: