Fix ownership / lifetime of QCocoaNativeInterface
Change-Id: I21dd1e3186e0dbbc60294f807de0db6aad8b9eee Reviewed-by: James Turner <james.turner@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Christoph Schleifenbaum <christoph.schleifenbaum@kdab.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
This commit is contained in:
parent
99a2074369
commit
3918386779
@ -113,6 +113,7 @@ private:
|
||||
QList<QCocoaScreen *> mScreens;
|
||||
QCocoaClipboard *mCocoaClipboard;
|
||||
QScopedPointer<QCocoaDrag> mCocoaDrag;
|
||||
QScopedPointer<QPlatformNativeInterface> mNativeInterface;
|
||||
QScopedPointer<QCocoaServices> mServices;
|
||||
};
|
||||
|
||||
|
@ -99,6 +99,7 @@ QCocoaIntegration::QCocoaIntegration()
|
||||
, mAccessibility(new QPlatformAccessibility)
|
||||
, mCocoaClipboard(new QCocoaClipboard)
|
||||
, mCocoaDrag(new QCocoaDrag)
|
||||
, mNativeInterface(new QCocoaNativeInterface)
|
||||
, mServices(new QCocoaServices)
|
||||
{
|
||||
QCocoaAutoReleasePool pool;
|
||||
@ -205,7 +206,7 @@ QPlatformFontDatabase *QCocoaIntegration::fontDatabase() const
|
||||
|
||||
QPlatformNativeInterface *QCocoaIntegration::nativeInterface() const
|
||||
{
|
||||
return new QCocoaNativeInterface();
|
||||
return mNativeInterface.data();
|
||||
}
|
||||
|
||||
QPlatformInputContext *QCocoaIntegration::inputContext() const
|
||||
|
Loading…
Reference in New Issue
Block a user