diff options
author | Liang Qi <liang.qi@qt.io> | 2017-04-12 20:08:56 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-04-12 20:08:56 +0200 |
commit | 94c576cf6607d3e9880fdaf6c8a51216bf2d2147 (patch) | |
tree | 32e42bdb8bcb869c894023f9494c2e2df310d585 /src/corelib/kernel/qvariant.cpp | |
parent | 2ad7f6ddf5042d7442c97a89b083ca2853cf5721 (diff) | |
parent | e893e657e5c976f96e7e627ca90531934129bf4b (diff) |
Merge remote-tracking branch 'origin/5.8' into 5.9
Change-Id: I3bd83a839b16822035ed56a5cffe77bd6bc3f08d
Diffstat (limited to 'src/corelib/kernel/qvariant.cpp')
-rw-r--r-- | src/corelib/kernel/qvariant.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp index c908e7cdbc..bca3ac9582 100644 --- a/src/corelib/kernel/qvariant.cpp +++ b/src/corelib/kernel/qvariant.cpp @@ -2526,8 +2526,9 @@ QRegularExpression QVariant::toRegularExpression() const /*! \since 5.0 - Returns the variant as a QUuid if the variant has userType() \l - QUuid; otherwise returns a default constructed QUuid. + Returns the variant as a QUuid if the variant has type() + \l QMetaType::QUuid or \l QMetaType::QString; + otherwise returns a default-constructed QUuid. \sa canConvert(), convert() */ @@ -2995,7 +2996,7 @@ static bool canConvertMetaObject(int fromId, int toId, QObject *fromObject) \l QMetaType::QDate, \l QMetaType::QDateTime, \l QMetaType::Double, \l QMetaType::QFont, \l QMetaType::Int, \l QMetaType::QKeySequence, \l QMetaType::LongLong, \l QMetaType::QStringList, \l QMetaType::QTime, - \l QMetaType::UInt, \l QMetaType::ULongLong + \l QMetaType::UInt, \l QMetaType::ULongLong, \l QMetaType::QUuid \row \li \l QMetaType::QStringList \li \l QMetaType::QVariantList, \l QMetaType::QString (if the list contains exactly one item) \row \li \l QMetaType::QTime \li \l QMetaType::QString @@ -3005,6 +3006,7 @@ static bool canConvertMetaObject(int fromId, int toId, QObject *fromObject) \row \li \l QMetaType::ULongLong \li \l QMetaType::Bool, \l QMetaType::QChar, \l QMetaType::Double, \l QMetaType::Int, \l QMetaType::LongLong, \l QMetaType::QString, \l QMetaType::UInt + \row \li \l QMetaType::QUuid \li \l QMetaType::QString \endtable A QVariant containing a pointer to a type derived from QObject will also return true for this |