src/gui/widgets/qcocoamenu_mac.mm
changeset 37 758a864f9613
parent 30 5dc02b23752f
equal deleted inserted replaced
36:ef0373b55136 37:758a864f9613
   186         }
   186         }
   187     }
   187     }
   188     return NO;
   188     return NO;
   189 }
   189 }
   190 
   190 
       
   191 - (NSInteger)indexOfItemWithTarget:(id)anObject andAction:(SEL)actionSelector
       
   192 {
       
   193      NSInteger index = [super indexOfItemWithTarget:anObject andAction:actionSelector];
       
   194      static SEL selForOFCP = NSSelectorFromString(@"orderFrontCharacterPalette:");
       
   195      if (index == -1 && selForOFCP == actionSelector) {
       
   196          // Check if the 'orderFrontCharacterPalette' SEL exists for QCocoaMenuLoader object
       
   197          QT_MANGLE_NAMESPACE(QCocoaMenuLoader) *loader = [NSApp QT_MANGLE_NAMESPACE(qt_qcocoamenuLoader)];
       
   198          return [super indexOfItemWithTarget:loader andAction:actionSelector];
       
   199      }
       
   200      return index;
       
   201 }
       
   202 
   191 @end
   203 @end
   192 
   204 
   193 QT_BEGIN_NAMESPACE
   205 QT_BEGIN_NAMESPACE
   194 extern int qt_mac_menus_open_count; // qmenu_mac.mm
   206 extern int qt_mac_menus_open_count; // qmenu_mac.mm
   195 
   207