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() endif()
if(APPLE) 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) if (NATIVE_OSX_APP)
add_definitions(-DNATIVE_OSX_APP) add_definitions(-DNATIVE_OSX_APP)
endif() endif()

View File

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

View File

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