Add autorelease pools needed by Qt Creator.

With these Qt Creator startup is now warning-free
on 10.6.

Change-Id: Ie29d360611c0e516258920163e4e94d174217299
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
bb10
Morten Johan Sørvig 2013-04-15 12:35:18 +02:00 committed by The Qt Project
parent 01f3ef2050
commit 6a0bb4206a
2 changed files with 4 additions and 0 deletions

View File

@ -386,6 +386,8 @@ QList<QCocoaMenuItem *> QCocoaMenu::merged() const
void QCocoaMenu::syncModalState(bool modal)
{
QCocoaAutoReleasePool pool;
if (!m_enabled)
modal = true;

View File

@ -114,6 +114,8 @@ void QCocoaMenuBar::insertMenu(QPlatformMenu *platformMenu, QPlatformMenu *befor
void QCocoaMenuBar::removeMenu(QPlatformMenu *platformMenu)
{
QCocoaAutoReleasePool pool;
QCocoaMenu *menu = static_cast<QCocoaMenu *>(platformMenu);
if (!m_menus.contains(menu)) {
qWarning() << Q_FUNC_INFO << "Trying to remove a menu that does not belong to the menubar";