diff options
author | Morten Johan Sørvig <morten.sorvig@digia.com> | 2014-03-21 13:48:18 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-04-03 11:07:07 +0200 |
commit | 66178447e91f56eaeaee203171b9355399d3bb5c (patch) | |
tree | 9683a9abb5a845efbb6bcc90ca69853ddc175294 /src/corelib | |
parent | d6202762c135fbf5f1242911cf2455ff687f328e (diff) |
Mac: Use QString::toNSString in QtBase.
The string is now autoreleased.
This fixes a memory leak in qt_mac_QStringListToNSMutableArrayVoid
Task-number: QTBUG-20347
Change-Id: I11ebeb264af4c8ce98968f2221eea772f24c12d4
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/io/qfilesystemwatcher_fsevents.mm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/io/qfilesystemwatcher_fsevents.mm b/src/corelib/io/qfilesystemwatcher_fsevents.mm index bfcae2a3a2..981d663694 100644 --- a/src/corelib/io/qfilesystemwatcher_fsevents.mm +++ b/src/corelib/io/qfilesystemwatcher_fsevents.mm @@ -478,7 +478,7 @@ bool QFseventsFileSystemWatcherEngine::startStream() NSMutableArray *pathsToWatch = [NSMutableArray arrayWithCapacity:watchedPaths.size()]; for (PathRefCounts::const_iterator i = watchedPaths.begin(), ei = watchedPaths.end(); i != ei; ++i) - [pathsToWatch addObject:reinterpret_cast<const NSString *>(QCFString::toCFStringRef(i.key()))]; + [pathsToWatch addObject:i.key().toNSString()]; struct FSEventStreamContext callBackInfo = { 0, |