#endif
#include "qvariant.h"
-#ifdef Q_WS_MAC
-# include <private/qt_mac_p.h>
-
+#ifdef Q_OS_MAC
+#include <QtCore/private/qcore_mac_p.h>
+#include <Carbon/Carbon.h>
#endif
QT_BEGIN_NAMESPACE
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
static bool qt_sequence_no_mnemonics = true;
struct MacSpecialKey {
int key;
d->ref.ref();
}
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
static inline int maybeSwapShortcut(int shortcut)
{
if (qApp->testAttribute(Qt::AA_MacDontSwapCtrlAndMeta)) {
QKeyBinding keyBinding = QKeySequencePrivate::keyBindings[i];
if (keyBinding.standardKey == key && (keyBinding.platform & platform)) {
uint shortcut =
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
maybeSwapShortcut(QKeySequencePrivate::keyBindings[i].shortcut);
#else
QKeySequencePrivate::keyBindings[i].shortcut;
if (nativeText) {
gmodifs = globalModifs();
if (gmodifs->isEmpty()) {
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
const bool dontSwap = qApp->testAttribute(Qt::AA_MacDontSwapCtrlAndMeta);
if (dontSwap)
*gmodifs << QModifKeyName(Qt::META, QChar(kCommandUnicode));
modifs += *gmodifs; // Test non-translated ones last
QString sl = accel;
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
for (int i = 0; i < modifs.size(); ++i) {
const QModifKeyName &mkf = modifs.at(i);
if (sl.contains(mkf.name)) {
int fnum = 0;
if (accel.length() == 1) {
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
int qtKey = qtkeyForMacSymbol(accel[0]);
if (qtKey != -1) {
ret |= qtKey;
{
bool nativeText = (format == QKeySequence::NativeText);
QString s;
-#if defined(Q_WS_MAC)
+#if defined(Q_OS_MAC)
if (nativeText) {
// On Mac OS X the order (by default) is Meta, Alt, Shift, Control.
// If the AA_MacDontSwapCtrlAndMeta is enabled, then the order
: QString::fromLatin1("F%1").arg(key - Qt::Key_F1 + 1);
} else if (key) {
int i=0;
-#if defined(Q_WS_MAC)
+#if defined(Q_OS_MAC)
if (nativeText) {
QChar ch = qt_macSymbolForQtKey(key);
if (!ch.isNull())
} else
#endif
{
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
NonSymbol:
#endif
while (keyname[i].name) {
}
}
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
if (nativeText)
s += p;
else