Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macOS: Add more Q_OS_MACOS cond-compiles where appropriate #12663

Merged
merged 1 commit into from Jan 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/coreservices.cpp
Expand Up @@ -3,6 +3,7 @@
#include <QApplication>
#include <QFileDialog>
#include <QStandardPaths>
#include <QtGlobal>

#ifdef __BROADCAST__
#include "broadcast/broadcastmanager.h"
Expand Down Expand Up @@ -178,7 +179,7 @@ CoreServices::~CoreServices() {
}

void CoreServices::initializeSettings() {
#ifdef __APPLE__
#ifdef Q_OS_MACOS
// TODO: At this point it is too late to provide the same settings path to all components
// and too early to log errors and give users advises in their system language.
// Calling this from main.cpp before the QApplication is initialized may cause a crash
Expand Down
3 changes: 2 additions & 1 deletion src/main.cpp
Expand Up @@ -6,6 +6,7 @@
#include <QTextCodec>
#include <QThread>
#include <QtDebug>
#include <QtGlobal>
#include <cstdio>
#include <stdexcept>

Expand Down Expand Up @@ -209,7 +210,7 @@ int main(int argc, char * argv[]) {

MixxxApplication app(argc, argv);

#ifdef __APPLE__
#ifdef Q_OS_MACOS
// TODO: At this point it is too late to provide the same settings path to all components
// and too early to log errors and give users advises in their system language.
// Calling this from main.cpp before the QApplication is initialized may cause a crash
Expand Down
1 change: 1 addition & 0 deletions src/mixxxapplication.cpp
Expand Up @@ -3,6 +3,7 @@
#include <QThreadPool>
#include <QTouchEvent>
#include <QtDebug>
#include <QtGlobal>

#include "audio/frame.h"
#include "audio/types.h"
Expand Down
5 changes: 3 additions & 2 deletions src/preferences/dialog/dlgpreferences.cpp
Expand Up @@ -7,6 +7,7 @@
#include <QResizeEvent>
#include <QScreen>
#include <QScrollArea>
#include <QtGlobal>

#include "controllers/dlgprefcontrollers.h"
#include "library/library.h"
Expand Down Expand Up @@ -44,7 +45,7 @@
#include "preferences/dialog/dlgprefmodplug.h"
#endif // __MODPLUG__

#ifdef __APPLE__
#ifdef Q_OS_MACOS
#include "util/darkappearance.h"
#endif

Expand Down Expand Up @@ -576,7 +577,7 @@ QRect DlgPreferences::getDefaultGeometry() {
}

void DlgPreferences::fixSliderStyle() {
#ifdef __APPLE__
#ifdef Q_OS_MACOS
// Only used on macOS where the default slider style has several issues:
// - the handle is semi-transparent
// - the slider is higher than the space we give it, which causes that:
Expand Down
3 changes: 2 additions & 1 deletion src/util/sandbox.h
Expand Up @@ -5,6 +5,7 @@
#include <QFileInfo>
#include <QHash>
#include <QSharedPointer>
#include <QtGlobal>

#include "preferences/configobject.h"
#include "util/compatibility/qmutex.h"
Expand Down Expand Up @@ -33,7 +34,7 @@ class Sandbox {
static void setPermissionsFilePath(const QString& permissionsFile);
static void shutdown();

#ifdef __APPLE__
#ifdef Q_OS_MACOS
static QString migrateOldSettings();
#endif

Expand Down
1 change: 1 addition & 0 deletions src/util/screensaver.cpp
Expand Up @@ -18,6 +18,7 @@ With the help of the following source codes:
#include "util/screensaver.h"

#include <QDebug>
#include <QtGlobal>

#include "util/assert.h"

Expand Down