summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qcore_mac_p.h
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2018-11-25 00:41:00 +0100
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2018-11-28 23:59:16 +0000
commitd3ec5a2b09f3c9f5a67e757aa6b7b0dd09bbe97a (patch)
tree486b30a7c02110e6c35bee223a37f66f8bc40bc9 /src/corelib/kernel/qcore_mac_p.h
parent61a94d2d046c1448ba4c66dfc8e0246286bab14c (diff)
CoreText: Use QCFType to track CoreFoundation member variables
The operator T() function of QAppleRefCounted should be const so that the underlying type can be accessed from const member functions just like the naked underlying type could. Change-Id: I0819c5795d28442a6ff4db2732e211b183574f9f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/corelib/kernel/qcore_mac_p.h')
-rw-r--r--src/corelib/kernel/qcore_mac_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/kernel/qcore_mac_p.h b/src/corelib/kernel/qcore_mac_p.h
index b14a494296..acb87f8a3c 100644
--- a/src/corelib/kernel/qcore_mac_p.h
+++ b/src/corelib/kernel/qcore_mac_p.h
@@ -89,7 +89,7 @@ public:
QAppleRefCounted(QAppleRefCounted &&other) : value(other.value) { other.value = T(); }
QAppleRefCounted(const QAppleRefCounted &other) : value(other.value) { if (value) RetainFunction(value); }
~QAppleRefCounted() { if (value) ReleaseFunction(value); }
- operator T() { return value; }
+ operator T() const { return value; }
void swap(QAppleRefCounted &other) Q_DECL_NOEXCEPT_EXPR(noexcept(qSwap(value, other.value)))
{ qSwap(value, other.value); }
QAppleRefCounted &operator=(const QAppleRefCounted &other)