Ticket #46607: qt4-correct-systraymenu-iconhandling.patch

File qt4-correct-systraymenu-iconhandling.patch, 927 bytes (added by RJVB (René Bertin), 6 years ago)
  • qsystemtrayicon_mac.mm

    old new  
    341341-(void)mousePressed:(NSEvent *)mouseEvent button:(Qt::MouseButton)mouseButton
    342342{
    343343    down = YES;
    344     int clickCount = [mouseEvent clickCount]; 
     344    int clickCount = [mouseEvent clickCount];
    345345    [self setNeedsDisplay:YES];
    346346
    347347#ifndef QT_MAC_USE_COCOA
     
    532532            [item setState:action->isChecked() ? NSOnState : NSOffState];
    533533            [item setToolTip:(NSString*)QCFString::toCFStringRef(action->toolTip())];
    534534            const QIcon icon = action->icon();
    535             if(!icon.isNull()) {
     535                  // RJVB 20140915: don't forget to check against isIconVisibleInMenu()!
     536            if(!icon.isNull() && action->isIconVisibleInMenu()) {
    536537#ifndef QT_MAC_USE_COCOA
    537538                const short scale = GetMBarHeight();
    538539#else