- Implementation->RecentFilesMenu =
- new pqRecentFilesMenu( *menuMgr()->findMenu( createMenu( tr( "MEN_RECENT_FILES" ), aPVMnu, -1, 5 ) ),
- getApp()->desktop() );
+ int aMenuId = createMenu( tr( "MEN_RECENT_FILES" ), aPVMnu, -1, 5 );
+ QMenu* aMenu = menuMgr()->findMenu( aMenuId );
+ Implementation->RecentFilesMenu = new pqRecentFilesMenu( *aMenu, getApp()->desktop() );