From c1058cfd7b713ce91938439ab5bf945fd46dc803 Mon Sep 17 00:00:00 2001 From: Jake Petroules Date: Fri, 3 Mar 2017 16:58:52 -0800 Subject: Remove remaining Carbon includes from QtCore, QtGui and QtWidgets Carbon is deprecated and we should not rely on it at runtime or compile time. These headers were only included for a small collection of keyboard key constants which have now been hardcoded instead. Change-Id: Ia2eaa267584b63be8019be3bbf64cba897a985a8 Reviewed-by: Gabriel de Dietrich --- tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'tests/auto/gui/kernel/qkeysequence') diff --git a/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp b/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp index 6394a956bd..f8b6bf064a 100644 --- a/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp +++ b/tests/auto/gui/kernel/qkeysequence/tst_qkeysequence.cpp @@ -36,14 +36,18 @@ #include #ifdef Q_OS_MAC -#ifdef Q_OS_OSX -#include -#endif struct MacSpecialKey { int key; ushort macSymbol; }; +// Unicode code points for the glyphs associated with these keys +// Defined by Carbon headers but not anywhere in Cocoa +static const int kShiftUnicode = 0x21E7; +static const int kControlUnicode = 0x2303; +static const int kOptionUnicode = 0x2325; +static const int kCommandUnicode = 0x2318; + static const int NumEntries = 21; static const MacSpecialKey entries[NumEntries] = { { Qt::Key_Escape, 0x238B }, @@ -61,12 +65,10 @@ static const MacSpecialKey entries[NumEntries] = { { Qt::Key_Down, 0x2193 }, { Qt::Key_PageUp, 0x21DE }, { Qt::Key_PageDown, 0x21DF }, -#ifdef Q_OS_OSX { Qt::Key_Shift, kShiftUnicode }, { Qt::Key_Control, kCommandUnicode }, { Qt::Key_Meta, kControlUnicode }, { Qt::Key_Alt, kOptionUnicode }, -#endif { Qt::Key_CapsLock, 0x21EA }, }; -- cgit v1.2.3