Skip to content

Commit

Permalink
Renamed usages of deprecated Q_OS_OSX define
Browse files Browse the repository at this point in the history
Also updated a bunch of comments using the old name for macOS.
  • Loading branch information
bjorn committed Jul 10, 2024
1 parent de8384f commit 43deb6e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/tiled/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -358,9 +358,9 @@ MainWindow::MainWindow(QWidget *parent, Qt::WindowFlags flags)
mUi->actionPaste->setShortcuts(QKeySequence::Paste);
QList<QKeySequence> deleteKeys = QKeySequence::keyBindings(QKeySequence::Delete);
deleteKeys.removeAll(Qt::Key_D | Qt::ControlModifier); // used as "duplicate" shortcut
#ifdef Q_OS_OSX
#ifdef Q_OS_MACOS
// Add the Backspace key as primary shortcut for Delete, which seems to be
// the expected one for OS X.
// the expected one for macOS.
if (!deleteKeys.contains(QKeySequence(Qt::Key_Backspace)))
deleteKeys.prepend(QKeySequence(Qt::Key_Backspace));
#endif
Expand Down
2 changes: 1 addition & 1 deletion src/tiled/tabbar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ void TabBar::mouseReleaseEvent(QMouseEvent *event)

void TabBar::wheelEvent(QWheelEvent *event)
{
// Qt excludes OS X when implementing mouse wheel for switching tabs.
// Qt excludes macOS when implementing mouse wheel for switching tabs.
// However, we explicitly want this feature on the tilesets and open
// documents tab bars as a possible means of navigation.

Expand Down
2 changes: 1 addition & 1 deletion src/tiled/tiledapplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ NewsFeed &TiledApplication::newsFeed()

bool TiledApplication::event(QEvent *event)
{
// Handle the QFileOpenEvent to open files on MacOS X.
// Handle the QFileOpenEvent to open files on macOS.
if (event->type() == QEvent::FileOpen) {
QFileOpenEvent *fileOpenEvent = static_cast<QFileOpenEvent*>(event);
emit fileOpenRequest(fileOpenEvent->file());
Expand Down
6 changes: 3 additions & 3 deletions src/tiled/tilesetdock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,8 @@ void TilesetDock::setMapDocument(MapDocument *mapDocument)
return;

// Hide while we update the tab bar, to avoid repeated layouting
// But, this causes problems on OS X (issue #1055)
#ifndef Q_OS_OSX
// But, this causes problems on macOS (issue #1055)
#ifndef Q_OS_MACOS
widget()->hide();
#endif

Expand Down Expand Up @@ -339,7 +339,7 @@ void TilesetDock::setMapDocument(MapDocument *mapDocument)

updateActions();

#ifndef Q_OS_OSX
#ifndef Q_OS_MACOS
widget()->show();
#endif
}
Expand Down

0 comments on commit 43deb6e

Please sign in to comment.