Commit b0cd54c1 authored by Morten Johan Sorvig's avatar Morten Johan Sorvig Committed by Morten Johan Sørvig

Replace Q_WS_MAC with Q_OS_MAC.

We want to carry over all mac-specific code paths
to Qt 5. WS_MAC is no longer set; OS_MAC is.

This change is compatible with Qt 4 builds since
OS_MAC is set whenever WS_MAC is. (OS_MAC would
also be set for the theoretical X11/Mac platform,
but that's anyway not a supported configuration
for Creator)

Change-Id: Ib25d8c4e83e7e27d911124cd48aa17fdb875923f
Reviewed-by: default avatarFriedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: default avatarEike Ziller <eike.ziller@nokia.com>
parent 896a7a65
......@@ -141,7 +141,7 @@ void ZoomTool::mouseReleaseEvent(QMouseEvent *event)
view()->setSceneRect(sceneArea);
} else {
Qt::KeyboardModifier modifierKey = Qt::ControlModifier;
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
modifierKey = Qt::AltModifier;
#endif
if (event->modifiers() & modifierKey) {
......
......@@ -152,7 +152,7 @@ void usage()
qWarning(" -I <directory> ........................... prepend to the module import search path,");
qWarning(" display path if <directory> is empty");
qWarning(" -P <directory> ........................... prepend to the plugin search path");
#if defined(Q_WS_MAC)
#if defined(Q_OS_MAC)
qWarning(" -no-opengl ............................... don't use a QGLWidget for the viewport");
#else
qWarning(" -opengl .................................. use a QGLWidget for the viewport");
......@@ -215,7 +215,7 @@ struct ViewerOptions
useNativeFileBrowser = false;
#endif
#if defined(Q_WS_MAC)
#if defined(Q_OS_MAC)
useGL = true;
#endif
}
......@@ -375,7 +375,7 @@ static void parseCommandLineOptions(const QStringList &arguments)
} else if (arg == "-translation") {
if (lastArg) usage();
opts.translationFile = arguments.at(++i);
#if defined(Q_WS_MAC)
#if defined(Q_OS_MAC)
} else if (arg == "-no-opengl") {
opts.useGL = false;
#else
......@@ -530,7 +530,7 @@ int main(int argc, char ** argv)
systemMsgOutput = qInstallMsgHandler(myMessageOutput);
#endif
#if defined (Q_WS_X11) || defined (Q_WS_MAC)
#if defined (Q_WS_X11) || defined (Q_OS_MAC)
//### default to using raster graphics backend for now
bool gsSpecified = false;
for (int i = 0; i < argc; ++i) {
......
......@@ -274,12 +274,12 @@ void QDeclarativeTester::updateCurrentTime(int msec)
if (options & QDeclarativeViewer::TestImages) {
img.fill(qRgb(255,255,255));
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
bool oldSmooth = qt_applefontsmoothing_enabled;
qt_applefontsmoothing_enabled = false;
#endif
QPainter p(&img);
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
qt_applefontsmoothing_enabled = oldSmooth;
#endif
......
......@@ -1575,7 +1575,7 @@ void QDeclarativeViewer::setUseGL(bool useGL)
#ifdef GL_SUPPORTED
if (useGL) {
QGLFormat format = QGLFormat::defaultFormat();
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
format.setSampleBuffers(true);
#else
format.setSampleBuffers(false);
......
......@@ -66,11 +66,11 @@ void Qt5NodeInstanceServer::initializeView(const QVector<AddImportContainer> &/*
Q_ASSERT(!sgView());
m_sgView = new QSGView;
#ifndef Q_WS_MAC
#ifndef Q_OS_MAC
sgView()->setAttribute(Qt::WA_DontShowOnScreen, true);
#endif
sgView()->show();
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
sgView()->setAttribute(Qt::WA_DontShowOnScreen, true);
#endif
sgView()->setUpdatesEnabled(false);
......
......@@ -78,12 +78,12 @@ void Qt4NodeInstanceServer::initializeView(const QVector<AddImportContainer> &/*
Q_ASSERT(!declarativeView());
m_declarativeView = new QDeclarativeView;
#ifndef Q_WS_MAC
#ifndef Q_OS_MAC
declarativeView()->setAttribute(Qt::WA_DontShowOnScreen, true);
#endif
declarativeView()->setViewportUpdateMode(QGraphicsView::NoViewportUpdate);
declarativeView()->show();
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
declarativeView()->setAttribute(Qt::WA_DontShowOnScreen, true);
#endif
}
......
......@@ -171,14 +171,14 @@ void DragWidget::protectedMoved()
void DragWidget::leaveEvent(QEvent *)
{
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
unsetCursor();
#endif
}
void DragWidget::enterEvent(QEvent *)
{
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
setCursor(Qt::ArrowCursor);
#endif
}
......@@ -226,7 +226,7 @@ ContextPaneWidget::ContextPaneWidget(QWidget *parent) : DragWidget(parent), m_cu
m_disableAction->setCheckable(true);
connect(m_disableAction.data(), SIGNAL(toggled(bool)), this, SLOT(onDisable(bool)));
m_pinned = false;
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
setCursor(Qt::ArrowCursor);
#endif
}
......
......@@ -182,14 +182,14 @@ void CustomColorDialog::setupWidgets()
void CustomColorDialog::leaveEvent(QEvent *)
{
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
unsetCursor();
#endif
}
void CustomColorDialog::enterEvent(QEvent *)
{
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
setCursor(Qt::ArrowCursor);
#endif
}
......
......@@ -562,7 +562,7 @@ QSize QStyleItem::sizeFromContents(int width, int height)
break;
case Header:
size = qApp->style()->sizeFromContents(QStyle::CT_HeaderSection, m_styleoption, QSize(width,height), widget());
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
if (style() =="mac")
size.setHeight(15);
#endif
......@@ -575,7 +575,7 @@ QSize QStyleItem::sizeFromContents(int width, int height)
break;
}
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
// ### hack - With even heights, the text baseline is off on mac
if (size.height() %2 == 0)
size.setHeight(size.height() + 1);
......@@ -738,7 +738,7 @@ void QStyleItem::setElementType(const QString &str)
// Gtk uses qobject cast, hence we need to separate this from menuitem
// On mac, we temporarily use the menu item because it has more accurate
// palette.
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
static QMenu *combo = new QMenu();
#else
static QComboBox *combo = new QComboBox();
......@@ -826,7 +826,7 @@ void QStyleItem::setElementType(const QString &str)
m_dummywidget->setAttribute(Qt::WA_QuitOnClose, false); // dont keep app open
m_dummywidget->setAttribute(Qt::WA_LayoutUsesWidgetRect);
m_dummywidget->winId();
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
m_dummywidget->setGeometry(-1000, 0, 10,10);
m_dummywidget->setVisible(visible); // Mac require us to set the visibility before this
#endif
......
......@@ -81,7 +81,7 @@ QSize DetailsButton::sizeHint() const
{
// TODO: Adjust this when icons become available!
const int w = fontMetrics().width(text()) + 32;
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
return QSize(w, 34);
#else
return QSize(w, 22);
......@@ -118,7 +118,7 @@ void DetailsButton::paintEvent(QPaintEvent *e)
QWidget::paintEvent(e);
QPainter p(this);
#ifndef Q_WS_MAC
#ifndef Q_OS_MAC
// draw hover animation
if (!isDown() && m_fader > 0)
p.fillRect(rect().adjusted(1, 1, -2, -2), QColor(255, 255, 255, int(m_fader*180)));
......
......@@ -145,7 +145,7 @@ QPixmap DetailsWidgetPrivate::cacheBackground(const QSize &size, bool expanded)
QRect topRect(0, 0, size.width(), topHeight);
QRect fullRect(0, 0, size.width(), size.height());
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
p.fillRect(fullRect, qApp->palette().window().color());
#endif
p.fillRect(fullRect, QColor(255, 255, 255, 40));
......@@ -378,7 +378,7 @@ void DetailsWidget::setToolWidget(Utils::FadingPanel *widget)
d->m_toolWidget->adjustSize();
d->m_grid->addWidget(d->m_toolWidget, 0, 1, 1, 1, Qt::AlignRight);
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
d->m_toolWidget->setOpacity(1.0);
#endif
d->changeHoverState(d->m_hovered);
......
......@@ -35,7 +35,7 @@
#include <QtGui/QHeaderView>
#include <QtGui/QFocusEvent>
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
#include <QtGui/QKeyEvent>
#endif
......@@ -87,7 +87,7 @@ void NavigationTreeView::resizeEvent(QResizeEvent *event)
QTreeView::resizeEvent(event);
}
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
void NavigationTreeView::keyPressEvent(QKeyEvent *event)
{
if ((event->key() == Qt::Key_Return
......
......@@ -50,7 +50,7 @@ protected:
void focusOutEvent(QFocusEvent *event);
void resizeEvent(QResizeEvent *event);
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
void keyPressEvent(QKeyEvent *event);
#endif
};
......
......@@ -61,7 +61,7 @@
*/
/*static*/ const char * const Utils::PathChooser::browseButtonLabel =
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
QT_TRANSLATE_NOOP("Utils::PathChooser", "Choose...");
#else
QT_TRANSLATE_NOOP("Utils::PathChooser", "Browse...");
......
......@@ -71,7 +71,7 @@ QColor StyleHelper::mergedColors(const QColor &colorA, const QColor &colorB, int
qreal StyleHelper::sidebarFontSize()
{
#if defined(Q_WS_MAC)
#if defined(Q_OS_MAC)
return 10;
#else
return 7.5;
......
......@@ -83,7 +83,7 @@ bool BookmarksPlugin::initialize(const QStringList & /*arguments*/, QString *)
m_toggleAction = new QAction(tr("Toggle Bookmark"), this);
Core::Command *cmd =
am->registerAction(m_toggleAction, BOOKMARKS_TOGGLE_ACTION, textcontext);
#ifndef Q_WS_MAC
#ifndef Q_OS_MAC
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+M")));
#else
cmd->setDefaultKeySequence(QKeySequence(tr("Meta+M")));
......@@ -98,7 +98,7 @@ bool BookmarksPlugin::initialize(const QStringList & /*arguments*/, QString *)
//Previous
m_prevAction = new QAction(tr("Previous Bookmark"), this);
cmd = am->registerAction(m_prevAction, BOOKMARKS_PREV_ACTION, globalcontext);
#ifndef Q_WS_MAC
#ifndef Q_OS_MAC
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+,")));
#else
cmd->setDefaultKeySequence(QKeySequence(tr("Meta+,")));
......@@ -108,7 +108,7 @@ bool BookmarksPlugin::initialize(const QStringList & /*arguments*/, QString *)
//Next
m_nextAction = new QAction(tr("Next Bookmark"), this);
cmd = am->registerAction(m_nextAction, BOOKMARKS_NEXT_ACTION, globalcontext);
#ifndef Q_WS_MAC
#ifndef Q_OS_MAC
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+.")));
#else
cmd->setDefaultKeySequence(QKeySequence(tr("Meta+.")));
......
......@@ -451,7 +451,7 @@ static QString msgActionWarning(QAction *newAction, int k, QAction *oldAction)
void Action::addOverrideAction(QAction *action, const Core::Context &context, bool scriptable)
{
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
action->setIconVisibleInMenu(false);
#endif
if (isEmpty())
......
......@@ -103,7 +103,7 @@ const char OPTIONS[] = "QtCreator.Options";
const char TOGGLE_SIDEBAR[] = "QtCreator.ToggleSidebar";
const char TOGGLE_FULLSCREEN[] = "QtCreator.ToggleFullScreen";
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
const char MINIMIZE_WINDOW[] = "QtCreator.MinimizeWindow";
const char ZOOM_WINDOW[] = "QtCreator.ZoomWindow";
#endif
......
......@@ -369,7 +369,7 @@ EditorManager::EditorManager(QWidget *parent) :
// Goto Previous In History Action
cmd = am->registerAction(d->m_gotoPreviousDocHistoryAction, Constants::GOTOPREVINHISTORY, editDesignContext);
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
cmd->setDefaultKeySequence(QKeySequence(tr("Alt+Tab")));
#else
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Tab")));
......@@ -379,7 +379,7 @@ EditorManager::EditorManager(QWidget *parent) :
// Goto Next In History Action
cmd = am->registerAction(d->m_gotoNextDocHistoryAction, Constants::GOTONEXTINHISTORY, editDesignContext);
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
cmd->setDefaultKeySequence(QKeySequence(tr("Alt+Shift+Tab")));
#else
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Shift+Tab")));
......@@ -389,7 +389,7 @@ EditorManager::EditorManager(QWidget *parent) :
// Go back in navigation history
cmd = am->registerAction(d->m_goBackAction, Constants::GO_BACK, editDesignContext);
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Alt+Left")));
#else
cmd->setDefaultKeySequence(QKeySequence(tr("Alt+Left")));
......@@ -399,7 +399,7 @@ EditorManager::EditorManager(QWidget *parent) :
// Go forward in navigation history
cmd = am->registerAction(d->m_goForwardAction, Constants::GO_FORWARD, editDesignContext);
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Alt+Right")));
#else
cmd->setDefaultKeySequence(QKeySequence(tr("Alt+Right")));
......@@ -407,7 +407,7 @@ EditorManager::EditorManager(QWidget *parent) :
mwindow->addAction(cmd, Constants::G_WINDOW_NAVIGATE);
connect(d->m_goForwardAction, SIGNAL(triggered()), this, SLOT(goForwardInNavigationHistory()));
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
QString prefix = tr("Meta+E");
#else
QString prefix = tr("Ctrl+E");
......@@ -1712,7 +1712,7 @@ void EditorManager::updateActions()
fName = curEditor->displayName();
}
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
window()->setWindowModified(curEditor->file()->isModified());
#endif
bool ww = curEditor->file()->isModified() && curEditor->file()->isReadOnly();
......@@ -1751,7 +1751,7 @@ void EditorManager::updateActions()
curEditor->file()->infoBar()->removeInfo(QLatin1String("Core.EditorManager.MakeWritable"));
}
}
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
} else { // curEditor
window()->setWindowModified(false);
#endif
......
......@@ -66,7 +66,7 @@
#include <QtGui/QSplitter>
#include <QtGui/QStackedLayout>
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
#include <qmacstyle_mac.h>
#endif
......
......@@ -50,7 +50,7 @@
#include <QtGui/QStyleOption>
#include <QtGui/QHeaderView>
#include <QtGui/QKeyEvent>
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
#include <qmacstyle_mac.h>
#endif
......
......@@ -63,14 +63,14 @@ OpenEditorsWindow::OpenEditorsWindow(QWidget *parent) :
m_editorList->setIndentation(0);
m_editorList->setSelectionMode(QAbstractItemView::SingleSelection);
m_editorList->setTextElideMode(Qt::ElideMiddle);
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
m_editorList->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
#endif
m_editorList->installEventFilter(this);
// We disable the frame on this list view and use a QFrame around it instead.
// This improves the look with QGTKStyle.
#ifndef Q_WS_MAC
#ifndef Q_OS_MAC
setFrameStyle(m_editorList->frameStyle());
#endif
m_editorList->setFrameStyle(QFrame::NoFrame);
......
......@@ -157,7 +157,7 @@ EditorToolBar::EditorToolBar(QWidget *parent) :
d->m_forwardButton= new QToolButton(this);
d->m_forwardButton->setDefaultAction(d->m_goForwardAction);
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
d->m_horizontalSplitAction->setIconVisibleInMenu(false);
d->m_verticalSplitAction->setIconVisibleInMenu(false);
#endif
......
......@@ -148,7 +148,7 @@ void FancyToolButton::paintEvent(QPaintEvent *event)
// draw borders
bool isTitledAction = defaultAction()->property("titledAction").toBool();
#ifndef Q_WS_MAC // Mac UIs usually don't hover
#ifndef Q_OS_MAC // Mac UIs usually don't hover
if (m_fader > 0 && isEnabled() && !isDown() && !isChecked()) {
painter.save();
int fader = int(40 * m_fader);
......
......@@ -291,7 +291,7 @@ void FancyTabBar::paintTab(QPainter *painter, int tabIndex) const
} else {
painter->setPen(selected ? Utils::StyleHelper::panelTextColor() : QColor(255, 255, 255, 120));
}
#ifndef Q_WS_MAC
#ifndef Q_OS_MAC
if (!selected && enabled) {
painter->save();
int fader = int(m_tabs[tabIndex]->fader());
......
......@@ -141,7 +141,7 @@ QIcon FileIconProvider::icon(const QFileInfo &fileInfo) const
}
}
// Get icon from OS.
#if defined(Q_WS_WIN) || defined(Q_WS_MAC)
#if defined(Q_WS_WIN) || defined(Q_OS_MAC)
return QFileIconProvider::icon(fileInfo);
#else
// File icons are unknown on linux systems.
......
......@@ -127,7 +127,7 @@ void FileUtils::openTerminal(const QString &path)
#ifdef Q_OS_WIN
const QString terminalEmulator = QString::fromLocal8Bit(qgetenv("COMSPEC"));
const QStringList args; // none
#elif defined(Q_WS_MAC)
#elif defined(Q_OS_MAC)
const QString terminalEmulator = Core::ICore::resourcePath()
+ QLatin1String("/scripts/openTerminal.command");
QStringList args;
......
......@@ -164,7 +164,7 @@ MainWindow::MainWindow() :
m_optionsAction(0),
m_toggleSideBarAction(0),
m_toggleFullScreenAction(0),
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
m_minimizeAction(0),
m_zoomAction(0),
#endif
......@@ -174,7 +174,7 @@ MainWindow::MainWindow() :
OutputPaneManager::create();
setWindowTitle(tr("Qt Creator"));
#ifndef Q_WS_MAC
#ifndef Q_OS_MAC
QApplication::setWindowIcon(QIcon(QLatin1String(Constants::ICON_QTLOGO_128)));
#endif
QCoreApplication::setApplicationName(QLatin1String("QtCreator"));
......@@ -476,7 +476,7 @@ void MainWindow::registerDefaultContainers()
ActionContainer *menubar = am->createMenuBar(Constants::MENU_BAR);
#ifndef Q_WS_MAC // System menu bar on Mac
#ifndef Q_OS_MAC // System menu bar on Mac
setMenuBar(menubar->menuBar());
#endif
menubar->appendGroup(Constants::G_FILE);
......@@ -632,7 +632,7 @@ void MainWindow::registerDefaultActions()
tmpaction = new QAction(icon, tr("Save &As..."), this);
tmpaction->setEnabled(false);
cmd = am->registerAction(tmpaction, Constants::SAVEAS, globalContext);
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Shift+S")));
#endif
cmd->setAttribute(Command::CA_UpdateText);
......@@ -642,7 +642,7 @@ void MainWindow::registerDefaultActions()
// SaveAll Action
m_saveAllAction = new QAction(tr("Save A&ll"), this);
cmd = am->registerAction(m_saveAllAction, Constants::SAVEALL, globalContext);
#ifndef Q_WS_MAC
#ifndef Q_OS_MAC
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Shift+S")));
#endif
mfile->addAction(cmd, Constants::G_FILE_SAVE);
......@@ -730,14 +730,14 @@ void MainWindow::registerDefaultActions()
mtools->addAction(cmd, Constants::G_TOOLS_OPTIONS);
m_optionsAction = new QAction(tr("&Options..."), this);
cmd = am->registerAction(m_optionsAction, Constants::OPTIONS, globalContext);
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+,")));
cmd->action()->setMenuRole(QAction::PreferencesRole);
#endif
mtools->addAction(cmd, Constants::G_TOOLS_OPTIONS);
connect(m_optionsAction, SIGNAL(triggered()), this, SLOT(showOptionsDialog()));
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
// Minimize Action
m_minimizeAction = new QAction(tr("Minimize"), this);
cmd = am->registerAction(m_minimizeAction, Constants::MINIMIZE_WINDOW, globalContext);
......@@ -762,7 +762,7 @@ void MainWindow::registerDefaultActions()
m_toggleSideBarAction->setCheckable(true);
cmd = am->registerAction(m_toggleSideBarAction, Constants::TOGGLE_SIDEBAR, globalContext);
cmd->setAttribute(Command::CA_UpdateText);
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+0")));
#else
cmd->setDefaultKeySequence(QKeySequence(tr("Alt+0")));
......@@ -772,7 +772,7 @@ void MainWindow::registerDefaultActions()
mwindow->addAction(cmd, Constants::G_WINDOW_VIEWS);
m_toggleSideBarAction->setEnabled(false);
#ifndef Q_WS_MAC
#ifndef Q_OS_MAC
// Full Screen Action
m_toggleFullScreenAction = new QAction(tr("Full Screen"), this);
m_toggleFullScreenAction->setCheckable(true);
......@@ -789,7 +789,7 @@ void MainWindow::registerDefaultActions()
// About IDE Action
icon = QIcon::fromTheme(QLatin1String("help-about"));
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
tmpaction = new QAction(icon, tr("About &Qt Creator"), this); // it's convention not to add dots to the about menu
#else
tmpaction = new QAction(icon, tr("About &Qt Creator..."), this);
......@@ -797,7 +797,7 @@ void MainWindow::registerDefaultActions()
cmd = am->registerAction(tmpaction, Constants::ABOUT_QTCREATOR, globalContext);
mhelp->addAction(cmd, Constants::G_HELP_ABOUT);
tmpaction->setEnabled(true);
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
cmd->action()->setMenuRole(QAction::ApplicationSpecificRole);
#endif
connect(tmpaction, SIGNAL(triggered()), this, SLOT(aboutQtCreator()));
......@@ -807,7 +807,7 @@ void MainWindow::registerDefaultActions()
cmd = am->registerAction(tmpaction, Constants::ABOUT_PLUGINS, globalContext);
mhelp->addAction(cmd, Constants::G_HELP_ABOUT);
tmpaction->setEnabled(true);
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
cmd->action()->setMenuRole(QAction::ApplicationSpecificRole);
#endif
connect(tmpaction, SIGNAL(triggered()), this, SLOT(aboutPlugins()));
......@@ -818,7 +818,7 @@ void MainWindow::registerDefaultActions()
// tmpaction->setEnabled(true);
// connect(tmpaction, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
// About sep
#ifndef Q_WS_MAC // doesn't have the "About" actions in the Help menu
#ifndef Q_OS_MAC // doesn't have the "About" actions in the Help menu
tmpaction = new QAction(this);
tmpaction->setSeparator(true);
cmd = am->registerAction(tmpaction, "QtCreator.Help.Sep.About", globalContext);
......@@ -1125,7 +1125,7 @@ void MainWindow::changeEvent(QEvent *e)
emit windowActivated();
}
} else if (e->type() == QEvent::WindowStateChange) {
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
bool minimized = isMinimized();
if (debugMainWindow)
qDebug() << "main window state changed to minimized=" << minimized;
......
......@@ -223,7 +223,7 @@ private:
QAction *m_optionsAction;
QAction *m_toggleSideBarAction;
QAction *m_toggleFullScreenAction;
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
QAction *m_minimizeAction;
QAction *m_zoomAction;
#endif
......
......@@ -895,7 +895,7 @@ void ManhattanStyle::drawComplexControl(ComplexControl control, const QStyleOpti
QColor shade(0, 0, 0, 50);
painter->fillRect(tool.rect.adjusted(0, -1, 1, 1), shade);
}
#ifndef Q_WS_MAC
#ifndef Q_OS_MAC
else if (mflags & (State_MouseOver)) {
QColor shade(255, 255, 255, 50);
painter->fillRect(tool.rect.adjusted(0, -1, 1, 1), shade);
......
......@@ -217,7 +217,7 @@ void ModeManager::objectAdded(QObject *obj)
// and still expect the current shortcut to change with it
bool currentlyHasDefaultSequence = (currentCmd->keySequence()
== currentCmd->defaultKeySequence());
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
currentCmd->setDefaultKeySequence(QKeySequence(QString::fromLatin1("Meta+%1").arg(i+1)));
#else
currentCmd->setDefaultKeySequence(QKeySequence(QString::fromLatin1("Ctrl+%1").arg(i+1)));
......
......@@ -184,7 +184,7 @@ QWidget *OutputPaneManager::buttonsWidget()
// Return shortcut as Ctrl+<number>
static inline int paneShortCut(int number)
{
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
int modifier = Qt::CTRL;