summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qregion.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2014-08-24 20:57:40 +0200
committerMarc Mutz <marc.mutz@kdab.com>2014-09-10 20:33:18 +0200
commitb678cc29899b387b632596b7c0f85abf2fc8ea81 (patch)
treed716f7aaaf7172ea0105feb48dc4bee5a9f0101c /src/gui/painting/qregion.cpp
parenta60e13ce06994105ba1c6cd25bedbb7a85ba388f (diff)
QRegion: remove some toplevel const from return types
It has no effect and inhibits move semantics. After this change, two and five more copies are moves in QtGui and QtWidgets, resp. Keep the old form for compilers that mangle the return type. Change-Id: I6257683144110230079fe9095303907ecc858c94 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/gui/painting/qregion.cpp')
-rw-r--r--src/gui/painting/qregion.cpp35
1 files changed, 28 insertions, 7 deletions
diff --git a/src/gui/painting/qregion.cpp b/src/gui/painting/qregion.cpp
index 549dce2923..e4e4893071 100644
--- a/src/gui/painting/qregion.cpp
+++ b/src/gui/painting/qregion.cpp
@@ -450,7 +450,10 @@ QDebug operator<<(QDebug s, const QRegion &r)
\sa united(), operator+()
*/
-const QRegion QRegion::operator|(const QRegion &r) const
+#ifdef Q_COMPILER_MANGLES_RETURN_TYPE
+const
+#endif
+QRegion QRegion::operator|(const QRegion &r) const
{ return united(r); }
/*!
@@ -459,14 +462,20 @@ const QRegion QRegion::operator|(const QRegion &r) const
\sa united(), operator|()
*/
-const QRegion QRegion::operator+(const QRegion &r) const
+#ifdef Q_COMPILER_MANGLES_RETURN_TYPE
+const
+#endif
+QRegion QRegion::operator+(const QRegion &r) const
{ return united(r); }
/*!
\overload
\since 4.4
*/
-const QRegion QRegion::operator+(const QRect &r) const
+#ifdef Q_COMPILER_MANGLES_RETURN_TYPE
+const
+#endif
+QRegion QRegion::operator+(const QRect &r) const
{ return united(r); }
/*!
@@ -475,14 +484,20 @@ const QRegion QRegion::operator+(const QRect &r) const
\sa intersected()
*/
-const QRegion QRegion::operator&(const QRegion &r) const
+#ifdef Q_COMPILER_MANGLES_RETURN_TYPE
+const
+#endif
+QRegion QRegion::operator&(const QRegion &r) const
{ return intersected(r); }
/*!
\overload
\since 4.4
*/
-const QRegion QRegion::operator&(const QRect &r) const
+#ifdef Q_COMPILER_MANGLES_RETURN_TYPE
+const
+#endif
+QRegion QRegion::operator&(const QRect &r) const
{
return intersected(r);
}
@@ -493,7 +508,10 @@ const QRegion QRegion::operator&(const QRect &r) const
\sa subtracted()
*/
-const QRegion QRegion::operator-(const QRegion &r) const
+#ifdef Q_COMPILER_MANGLES_RETURN_TYPE
+const
+#endif
+QRegion QRegion::operator-(const QRegion &r) const
{ return subtracted(r); }
/*!
@@ -502,7 +520,10 @@ const QRegion QRegion::operator-(const QRegion &r) const
\sa xored()
*/
-const QRegion QRegion::operator^(const QRegion &r) const
+#ifdef Q_COMPILER_MANGLES_RETURN_TYPE
+const
+#endif
+QRegion QRegion::operator^(const QRegion &r) const
{ return xored(r); }
/*!