From b648195c314ab0b342e5883ba13efbdc7104fd9e Mon Sep 17 00:00:00 2001 From: Sze Howe Koh Date: Sat, 15 Feb 2014 11:54:53 +0800 Subject: Doc: Replace obsolete types with their newer counterparts This patch ignores: - Docs for obsolete types themselves - Comparisons between new and obsolete types Change-Id: Id9b1e628255113e7c44520abe0f8a4e0db4a283d Reviewed-by: Jerome Pasion --- src/corelib/global/qglobal.cpp | 2 +- src/corelib/itemmodels/qsortfilterproxymodel.cpp | 20 +++++++++--------- src/corelib/json/qjsondocument.cpp | 4 ++-- src/corelib/json/qjsonvalue.cpp | 26 ++++++++++++------------ src/corelib/kernel/qvariant.cpp | 8 ++++---- 5 files changed, 30 insertions(+), 30 deletions(-) (limited to 'src/corelib') diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp index 0f1968d151..710f7e8ba1 100644 --- a/src/corelib/global/qglobal.cpp +++ b/src/corelib/global/qglobal.cpp @@ -743,7 +743,7 @@ Q_STATIC_ASSERT_X(UCHAR_MAX == 255, "Qt assumes that char is 8 bits"); \relates This enum describes the messages that can be sent to a message - handler (QtMsgHandler). You can use the enum to identify and + handler (QtMessageHandler). You can use the enum to identify and associate the various message types with the appropriate actions. diff --git a/src/corelib/itemmodels/qsortfilterproxymodel.cpp b/src/corelib/itemmodels/qsortfilterproxymodel.cpp index ebc97ca2d9..1e377abf3e 100644 --- a/src/corelib/itemmodels/qsortfilterproxymodel.cpp +++ b/src/corelib/itemmodels/qsortfilterproxymodel.cpp @@ -2606,16 +2606,16 @@ void QSortFilterProxyModel::invalidateFilter() the following QVariant types: \list - \li QVariant::Int - \li QVariant::UInt - \li QVariant::LongLong - \li QVariant::ULongLong - \li QVariant::Double - \li QVariant::Char - \li QVariant::Date - \li QVariant::Time - \li QVariant::DateTime - \li QVariant::String + \li QMetaType::Int + \li QMetaType::UInt + \li QMetaType::LongLong + \li QMetaType::ULongLong + \li QMetaType::Double + \li QMetaType::QChar + \li QMetaType::QDate + \li QMetaType::QTime + \li QMetaType::QDateTime + \li QMetaType::QString \endlist Any other type will be converted to a QString using diff --git a/src/corelib/json/qjsondocument.cpp b/src/corelib/json/qjsondocument.cpp index 6e257df39d..90ce8c63a5 100644 --- a/src/corelib/json/qjsondocument.cpp +++ b/src/corelib/json/qjsondocument.cpp @@ -260,8 +260,8 @@ QJsonDocument QJsonDocument::fromBinaryData(const QByteArray &data, DataValidati /*! Creates a QJsonDocument from the QVariant \a variant. - If the \a variant contains any other type than a QVariant::Map, - QVariant::List or QVariant::StringList, the returned document + If the \a variant contains any other type than a QVariantMap, + QVariantList or QStringList, the returned document document is invalid. \sa toVariant() diff --git a/src/corelib/json/qjsonvalue.cpp b/src/corelib/json/qjsonvalue.cpp index c16824ebd2..487a431b8f 100644 --- a/src/corelib/json/qjsonvalue.cpp +++ b/src/corelib/json/qjsonvalue.cpp @@ -344,16 +344,16 @@ QJsonValue &QJsonValue::operator =(const QJsonValue &other) The conversion will convert QVariant types as follows: \list - \li QVariant::Bool to Bool - \li QVariant::Int - \li QVariant::Double - \li QVariant::LongLong - \li QVariant::ULongLong - \li QVariant::UInt to Double - \li QVariant::String to String - \li QVariant::StringList - \li QVariant::VariantList to Array - \li QVariant::VariantMap to Object + \li QMetaType::Bool to Bool + \li QMetaType::Int + \li QMetaType::Double + \li QMetaType::LongLong + \li QMetaType::ULongLong + \li QMetaType::UInt to Double + \li QMetaType::QString to String + \li QMetaType::QStringList + \li QMetaType::QVariantList to Array + \li QMetaType::QVariantMap to Object \endlist For all other QVariant types a conversion to a QString will be attempted. If the returned string @@ -395,9 +395,9 @@ QJsonValue QJsonValue::fromVariant(const QVariant &variant) The QJsonValue types will be converted as follows: \value Null QVariant() - \value Bool QVariant::Bool - \value Double QVariant::Double - \value String QVariant::String + \value Bool QMetaType::Bool + \value Double QMetaType::Double + \value String QString \value Array QVariantList \value Object QVariantMap \value Undefined QVariant() diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp index f7540dc20f..5e8f330a92 100644 --- a/src/corelib/kernel/qvariant.cpp +++ b/src/corelib/kernel/qvariant.cpp @@ -1165,7 +1165,7 @@ Q_CORE_EXPORT void QVariantPrivate::registerHandler(const int /* Modules::Names instead to construct variants from the pointer types represented by \c QMetaType::VoidStar, and \c QMetaType::QObjectStar. - \sa QVariant::fromValue(), Type + \sa QVariant::fromValue(), QMetaType::Type */ /*! @@ -1765,7 +1765,7 @@ const char *QVariant::typeName() const } /*! - Convert this variant to type Invalid and free up any resources + Convert this variant to type QMetaType::UnknownType and free up any resources used. */ void QVariant::clear() @@ -1781,7 +1781,7 @@ void QVariant::clear() Converts the int representation of the storage type, \a typeId, to its string representation. - Returns a null pointer if the type is QVariant::Invalid or doesn't exist. + Returns a null pointer if the type is QMetaType::UnknownType or doesn't exist. */ const char *QVariant::typeToName(int typeId) { @@ -2019,7 +2019,7 @@ QDataStream& operator<<(QDataStream &s, const QVariant::Type p) \fn bool QVariant::isValid() const Returns \c true if the storage type of this variant is not - QVariant::Invalid; otherwise returns \c false. + QMetaType::UnknownType; otherwise returns \c false. */ template -- cgit v1.2.3