Skip to content

Commit

Permalink
replace deprecated macro
Browse files Browse the repository at this point in the history
  • Loading branch information
kambala-decapitator committed Feb 19, 2024
1 parent d0d6868 commit 912f834
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions creator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ Creator::Creator(Privileges &privilegesArg, QWidget *parent) :

bool Creator::showRootMessageBox()
{
#ifdef Q_OS_MAC
#ifdef Q_OS_MACOS
if (getuid() == 0) // root == 0, real user != 0
return false;

Expand Down Expand Up @@ -245,7 +245,7 @@ void Creator::httpsUrlHandler(const QUrl &url)
{
// on windows open web browser directly
// for linux use a wrapper to set uid/gid correctly
#if defined(Q_OS_WIN) || defined(Q_OS_MAC)
#if defined(Q_OS_WIN) || defined(Q_OS_MACOS)
QDesktopServices::openUrl(url);
#else
qDebug() << "httpsUrlHandler called" << url;
Expand Down Expand Up @@ -1115,7 +1115,7 @@ void Creator::checkNewVersion(const QString &verNewStr)

QMessageBox msgBox(this);
msgBox.setWindowTitle(tr("Update Notification"));
#ifdef Q_OS_MAC
#ifdef Q_OS_MACOS
QAbstractButton *visitButton = msgBox.addButton(tr("&Visit Website"), QMessageBox::NoRole);
msgBox.addButton(tr("&Close"), QMessageBox::YesRole);
#else
Expand Down Expand Up @@ -1172,7 +1172,7 @@ void Creator::downloadButtonClicked()
qDebug() << "Whole path" << saveDir + '/' + selectedImage;

auto flags = QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks;
#ifdef Q_OS_MAC
#ifdef Q_OS_MACOS
// TODO: required until QT6 supports OSX Monterrey/Xcode 13 (likely QT 6.3)
if (QOperatingSystemVersion::current().majorVersion() >= 12)
flags |= QFileDialog::DontUseNativeDialog;
Expand Down Expand Up @@ -1256,7 +1256,7 @@ void Creator::getImageFileNameFromUser()
}

QFileDialog::Options flags;
#ifdef Q_OS_MAC
#ifdef Q_OS_MACOS
// TODO: required until QT6 supports OSX Monterrey/Xcode 13
if (QOperatingSystemVersion::current().majorVersion() >= 12)
flags |= QFileDialog::DontUseNativeDialog;
Expand Down
2 changes: 1 addition & 1 deletion creator.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#include "movingaverage.h"
#include "translator.h"

#ifdef Q_OS_MAC
#ifdef Q_OS_MACOS
#include "privileges_unix.h"
#else
#include "privileges.h"
Expand Down
2 changes: 1 addition & 1 deletion deviceenumerator_unix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ QStringList DeviceEnumerator_unix::getUserFriendlyNames(const QStringList &devic

bool DeviceEnumerator_unix::unmountDevicePartitions(const QString &device) const
{
#ifdef Q_OS_MAC
#ifdef Q_OS_MACOS
Q_UNUSED(device);
return true;
#else
Expand Down
4 changes: 2 additions & 2 deletions diskwriter_unix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <QDebug>
#include <unistd.h>

#ifdef Q_OS_MAC
#ifdef Q_OS_MACOS
#include <QProcess>
#endif

Expand All @@ -42,7 +42,7 @@ DiskWriter_unix::~DiskWriter_unix()
bool DiskWriter_unix::open(const QString& device)
{
dev.setFileName(device);
#ifdef Q_OS_MAC
#ifdef Q_OS_MACOS
// write to RAW device, this is MUCH faster
QString rawdev(device);
rawdev.replace(QString("/dev/"),QString("/dev/r"));
Expand Down
2 changes: 1 addition & 1 deletion main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include "creator.h"
#include "version.h"

#ifdef Q_OS_MAC
#ifdef Q_OS_MACOS
#include "privileges_unix.h"
#else
#include "privileges.h"
Expand Down
2 changes: 1 addition & 1 deletion privileges_unix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

#include "privileges_unix.h"

#ifdef Q_OS_MAC
#ifdef Q_OS_MACOS
#include <sys/sysctl.h>
#endif

Expand Down

0 comments on commit 912f834

Please sign in to comment.