Qt: added attribute QtAA_MacDontSwapCtrlAndMeta for qt >= 4.6 under mac.issue #20897

git-svn-id: trunk@34172 -
This commit is contained in:
zeljko 2011-12-14 09:26:35 +00:00
parent 7571057b7d
commit 9395999ae0
2 changed files with 9 additions and 0 deletions

View File

@ -799,6 +799,10 @@ type
QtAA_NativeWindows = 3,
QtAA_DontCreateNativeWidgetSiblings = 4,
QtAA_MacPluginApplication = 5,
{$IFDEF DARWIN}
QtAA_DontUseNativeMenuBar = 6, {$note QtAA_DontUseNativeMenuBar added for darwin and wince qt >=4.6 compat issue #20897}
QtAA_MacDontSwapCtrlAndMeta = 7, {$note QtAA_MacDontSwapCtrlAndMeta added for darwin qt >=4.6 compat issue #20897}
{$ENDIF}
QtAA_AttributeCount );
type

View File

@ -103,6 +103,11 @@ begin
QtX11InitializePalettes;
FWindowManagerName := LowerCase(GetWindowManager);
{$ENDIF}
{$IFDEF DARWIN}
// do not swap meta and ctrl keys, issue #20897
if (QtVersionMajor = 4) and (QtVersionMinor > 5) then
QCoreApplication_setAttribute(QtAA_MacDontSwapCtrlAndMeta, True);
{$ENDIF}
FGlobalActions := TFPList.Create;
end;