diff options
author | Eike Ziller <eike.ziller@theqtcompany.com> | 2015-03-26 12:28:50 +0100 |
---|---|---|
committer | Eike Ziller <eike.ziller@theqtcompany.com> | 2015-03-31 13:27:33 +0000 |
commit | 7a59dbc9885ea2377858519c3761b21a11f4113e (patch) | |
tree | 6d72f7dcf5f4af1e7b09280cad7ffcb8ff93ddcb /src/libs/utils/fileutils_mac.mm | |
parent | 5183081c3a8428df806d218b02edd09eee8550e1 (diff) |
OS X: Create a help AutoreleasePool class
That wraps NSAutoreleasePool and releases it at destruction.
Change-Id: Ie7049450da46458f02c02d38439e20e43609ca83
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
Diffstat (limited to 'src/libs/utils/fileutils_mac.mm')
-rw-r--r-- | src/libs/utils/fileutils_mac.mm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libs/utils/fileutils_mac.mm b/src/libs/utils/fileutils_mac.mm index 21a800df4e..1c149bbf67 100644 --- a/src/libs/utils/fileutils_mac.mm +++ b/src/libs/utils/fileutils_mac.mm @@ -28,9 +28,10 @@ ** ****************************************************************************/ +#include "autoreleasepool.h" + #include <QUrl> -#include <Foundation/NSAutoreleasePool.h> #include <Foundation/NSURL.h> namespace Utils { @@ -38,12 +39,11 @@ namespace Internal { QUrl filePathUrl(const QUrl &url) { + Utils::AutoreleasePool pool; Q_UNUSED(pool) QUrl ret = url; - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; NSURL *nsurl = url.toNSURL(); if ([nsurl isFileReferenceURL]) ret = QUrl::fromNSURL([nsurl filePathURL]); - [pool release]; return ret; } |