Changeset 107


Ignore:
Timestamp:
Jul 29, 2006, 4:22:12 PM (19 years ago)
Author:
dmik
Message:

Widgets: Fixed: Pressed key's text (symbol) is now always uppercased if pressed with a modifier key before matching against UNICODE_ACCEL accelerators (to let them be independent of the Shift state). As a result, pressing Alt+NLS_letter wil now match the accelerator defined using the "w&ord" syntax (where Qt always uppercases the indicated letter) regardless of the Shift state.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel/qaccel.cpp

    r2 r107  
    311311    }
    312312    if ( !e->text().isEmpty() ) {
    313         temp.setKey( (int)e->text()[0].unicode() | UNICODE_ACCEL | modifier, index );
     313        QChar c = e->text()[0];
     314        // be in accordance with accoQAccel::shortcutKey()
     315        if ( modifier != 0 && c.isPrint() )
     316            c = c.upper();
     317        temp.setKey( (int)c.unicode() | UNICODE_ACCEL | modifier, index );
    314318        result = temp.matches( item->key );
    315319    }
Note: See TracChangeset for help on using the changeset viewer.