Replace the apple macro in qt project

pull/3/head
Li Linfeng 2019-08-21 08:40:59 +08:00 committed by Hleb Valoshka
parent c820617bb8
commit 71ca974838
3 changed files with 5 additions and 10 deletions

View File

@ -267,9 +267,6 @@ if(WIN32)
endif()
if(APPLE)
# Dirty hack to prevent AIFF.h inclusion which provides `struct Marker`
# conflicting with out `class Marker`.
add_definitions(-D__AIFF__)
if (NATIVE_OSX_APP)
add_definitions(-DNATIVE_OSX_APP)
endif()

View File

@ -10,9 +10,7 @@
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
#ifdef TARGET_OS_MAC
#include <Carbon/Carbon.h>
#endif
#include <ctime>
#include <QIcon>
@ -64,7 +62,7 @@
#if defined(_WIN32)
#include "celestia/avicapture.h"
// TODO: Add Mac support
#elif !defined(TARGET_OS_MAC)
#elif !defined(__APPLE__)
#ifdef THEORA
#include "celestia/oggtheoracapture.h"
#endif
@ -638,7 +636,7 @@ void CelestiaAppWindow::slotGrabImage()
void CelestiaAppWindow::slotCaptureVideo()
{
// TODO: Add Mac support
#if defined(_WIN32) || (defined(THEORA) && !defined(TARGET_OS_MAC))
#if defined(_WIN32) || (defined(THEORA) && !defined(__APPLE__))
QString dir;
QSettings settings;
settings.beginGroup("Preferences");
@ -1117,7 +1115,7 @@ void CelestiaAppWindow::createMenus()
QAction* captureVideoAction = new QAction(QIcon(":/icons/capture-video.png"),
_("Capture &video"), this);
// TODO: Add Mac support for video capture
#if defined(TARGET_OS_MAC) || (!defined(_WIN32) && !defined(THEORA))
#if defined(__APPLE__) || (!defined(_WIN32) && !defined(THEORA))
captureVideoAction->setEnabled(false);
#endif
captureVideoAction->setShortcut(QString(_("Shift+F10")));

View File

@ -186,7 +186,7 @@ void CelestiaGlWidget::mouseMoveEvent(QMouseEvent* m)
if (m->modifiers() & ControlModifier)
buttons |= CelestiaCore::ControlKey;
#ifdef TARGET_OS_MAC
#ifdef __APPLE__
// On the Mac, right dragging is be simulated with Option+left drag.
// We may want to enable this on other platforms, though it's mostly only helpful
// for users with single button mice.