#endif
#include "qvariant.h"
-#ifdef Q_OS_MAC
+#if defined(Q_OS_MAC) && !defined(QT_NO_CORESERVICES)
#include <QtCore/private/qcore_mac_p.h>
#include <Carbon/Carbon.h>
#endif
QT_BEGIN_NAMESPACE
-#ifdef Q_OS_MAC
+#if defined(Q_OS_MAC) && !defined(QT_NO_CORESERVICES)
static bool qt_sequence_no_mnemonics = true;
struct MacSpecialKey {
int key;
d->ref.ref();
}
-#ifdef Q_OS_MAC
+#if defined(Q_OS_MAC) && !defined(QT_NO_CORESERVICES)
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_OS_MAC
+#if defined(Q_OS_MAC) && !defined(QT_NO_CORESERVICES)
maybeSwapShortcut(QKeySequencePrivate::keyBindings[i].shortcut);
#else
QKeySequencePrivate::keyBindings[i].shortcut;
if (nativeText) {
gmodifs = globalModifs();
if (gmodifs->isEmpty()) {
-#ifdef Q_OS_MAC
+#if defined(Q_OS_MAC) && !defined(QT_NO_CORESERVICES)
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_OS_MAC
+#if defined(Q_OS_MAC) && !defined(QT_NO_CORESERVICES)
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_OS_MAC
+#if defined(Q_OS_MAC) && !defined(QT_NO_CORESERVICES)
int qtKey = qtkeyForMacSymbol(accel[0]);
if (qtKey != -1) {
ret |= qtKey;
if (key == -1 || key == Qt::Key_unknown)
return s;
-#if defined(Q_OS_MAC)
+#if defined(Q_OS_MAC) && !defined(QT_NO_CORESERVICES)
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_OS_MAC)
+#if defined(Q_OS_MAC) && !defined(QT_NO_CORESERVICES)
if (nativeText) {
QChar ch = qt_macSymbolForQtKey(key);
if (!ch.isNull())
} else
#endif
{
-#ifdef Q_OS_MAC
+#if defined(Q_OS_MAC) && !defined(QT_NO_CORESERVICES)
NonSymbol:
#endif
while (keyname[i].name) {
}
}
-#ifdef Q_OS_MAC
+#if defined(Q_OS_MAC) && !defined(QT_NO_CORESERVICES)
if (nativeText)
s += p;
else