diff options
Diffstat (limited to 'src/corelib/tools')
-rw-r--r-- | src/corelib/tools/qline.cpp | 2 | ||||
-rw-r--r-- | src/corelib/tools/qpair.h | 4 | ||||
-rw-r--r-- | src/corelib/tools/qsharedpointer_impl.h | 2 |
3 files changed, 6 insertions, 2 deletions
diff --git a/src/corelib/tools/qline.cpp b/src/corelib/tools/qline.cpp index 4561f831c8..9feb697aad 100644 --- a/src/corelib/tools/qline.cpp +++ b/src/corelib/tools/qline.cpp @@ -334,7 +334,7 @@ QDataStream &operator>>(QDataStream &stream, QLine &line) or a null line. The intersect() function determines the IntersectType for this - line and a given line, while the angle() function returns the + line and a given line, while the angleTo() function returns the angle between the lines. In addition, the unitVector() function returns a line that has the same starting point as this line, but with a length of only 1, while the normalVector() function returns diff --git a/src/corelib/tools/qpair.h b/src/corelib/tools/qpair.h index 33f8c81e68..4cba0a8421 100644 --- a/src/corelib/tools/qpair.h +++ b/src/corelib/tools/qpair.h @@ -56,7 +56,9 @@ struct QPair { first = p.first; second = p.second; return *this; } #ifdef Q_COMPILER_RVALUE_REFS template <typename TT1, typename TT2> - Q_DECL_CONSTEXPR QPair(QPair<TT1, TT2> &&p) : first(std::move(p.first)), second(std::move(p.second)) {} + Q_DECL_CONSTEXPR QPair(QPair<TT1, TT2> &&p) + // can't use std::move here as it's not constexpr in C++11: + : first(static_cast<TT1 &&>(p.first)), second(static_cast<TT2 &&>(p.second)) {} template <typename TT1, typename TT2> Q_DECL_RELAXED_CONSTEXPR QPair &operator=(QPair<TT1, TT2> &&p) { first = std::move(p.first); second = std::move(p.second); return *this; } diff --git a/src/corelib/tools/qsharedpointer_impl.h b/src/corelib/tools/qsharedpointer_impl.h index 061c7a5a2d..a18b2c28a1 100644 --- a/src/corelib/tools/qsharedpointer_impl.h +++ b/src/corelib/tools/qsharedpointer_impl.h @@ -412,6 +412,7 @@ public: # ifdef QT_SHAREDPOINTER_TRACK_POINTERS internalSafetyCheckAdd(result.d, result.value); # endif + result.enableSharedFromThis(result.data()); return result; } #else @@ -432,6 +433,7 @@ public: internalSafetyCheckAdd(result.d, result.value); # endif result.d->setQObjectShared(result.value, true); + result.enableSharedFromThis(result.data()); return result; } |