diff options
Diffstat (limited to 'src/corelib/kernel')
-rw-r--r-- | src/corelib/kernel/qcore_mac_p.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/corelib/kernel/qcore_mac_p.h b/src/corelib/kernel/qcore_mac_p.h index d03e2f3738..535d3579b2 100644 --- a/src/corelib/kernel/qcore_mac_p.h +++ b/src/corelib/kernel/qcore_mac_p.h @@ -137,8 +137,10 @@ private: template <typename T> class QCFType : public QAppleRefCounted<T, CFTypeRef, CFRetain, CFRelease> { + using Base = QAppleRefCounted<T, CFTypeRef, CFRetain, CFRelease>; public: - using QAppleRefCounted<T, CFTypeRef, CFRetain, CFRelease>::QAppleRefCounted; + using Base::Base; + explicit QCFType(CFTypeRef r) : Base(static_cast<T>(r)) {} template <typename X> X as() const { return reinterpret_cast<X>(this->value); } static QCFType constructFromGet(const T &t) { @@ -151,6 +153,7 @@ public: class Q_CORE_EXPORT QCFString : public QCFType<CFStringRef> { public: + using QCFType<CFStringRef>::QCFType; inline QCFString(const QString &str) : QCFType<CFStringRef>(0), string(str) {} inline QCFString(const CFStringRef cfstr = 0) : QCFType<CFStringRef>(cfstr) {} inline QCFString(const QCFType<CFStringRef> &other) : QCFType<CFStringRef>(other) {} |