diff --git a/share/qtcreator/qml/qmljsdebugger/editor/zoomtool.cpp b/share/qtcreator/qml/qmljsdebugger/editor/zoomtool.cpp index a8febd15c8479acbd3b276cc007ec52f3700d2fc..1c0dcf2b8c4ff71b57379cadb60929710b88e1da 100644 --- a/share/qtcreator/qml/qmljsdebugger/editor/zoomtool.cpp +++ b/share/qtcreator/qml/qmljsdebugger/editor/zoomtool.cpp @@ -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) { diff --git a/share/qtcreator/qml/qmlobserver/main.cpp b/share/qtcreator/qml/qmlobserver/main.cpp index 1770a3fe38ddd5016bf2ee9c8fbd0627b6f27b6f..62ca9a260061b34c6b88c0443ea8654274f86182 100644 --- a/share/qtcreator/qml/qmlobserver/main.cpp +++ b/share/qtcreator/qml/qmlobserver/main.cpp @@ -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) { diff --git a/share/qtcreator/qml/qmlobserver/qdeclarativetester.cpp b/share/qtcreator/qml/qmlobserver/qdeclarativetester.cpp index f16e791b490627f6ad0162f42f7d6065f80bd5d6..2ca48f9754e5663e71fe7dc7ff956a204711af28 100644 --- a/share/qtcreator/qml/qmlobserver/qdeclarativetester.cpp +++ b/share/qtcreator/qml/qmlobserver/qdeclarativetester.cpp @@ -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 diff --git a/share/qtcreator/qml/qmlobserver/qmlruntime.cpp b/share/qtcreator/qml/qmlobserver/qmlruntime.cpp index 33f53ad73ed3ee5ca6b9603d476430f280cd723f..e6803d908d6471c6f6119f226728ca2341d96964 100644 --- a/share/qtcreator/qml/qmlobserver/qmlruntime.cpp +++ b/share/qtcreator/qml/qmlobserver/qmlruntime.cpp @@ -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); diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5nodeinstanceserver.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5nodeinstanceserver.cpp index 94ac4f44a5929d9dd80d8560d1b7484c33310f36..63ec371d83337a7cd01d9f0d93b66f9a3ece200d 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5nodeinstanceserver.cpp +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5nodeinstanceserver.cpp @@ -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); diff --git a/share/qtcreator/qml/qmlpuppet/qmlpuppet/instances/qt4nodeinstanceserver.cpp b/share/qtcreator/qml/qmlpuppet/qmlpuppet/instances/qt4nodeinstanceserver.cpp index 974aa289b9620b6da358ca88fb3b4266c0aa5ba9..577dff67c6019e708cbb9b54420bda475fcbb2af 100644 --- a/share/qtcreator/qml/qmlpuppet/qmlpuppet/instances/qt4nodeinstanceserver.cpp +++ b/share/qtcreator/qml/qmlpuppet/qmlpuppet/instances/qt4nodeinstanceserver.cpp @@ -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 } diff --git a/src/libs/qmleditorwidgets/contextpanewidget.cpp b/src/libs/qmleditorwidgets/contextpanewidget.cpp index eb0fb47a6845d97649fd1d9ea141e9cd4cbbb8b3..a65cdde7a271e1820bc7a10641c6d1b5ed0afddc 100644 --- a/src/libs/qmleditorwidgets/contextpanewidget.cpp +++ b/src/libs/qmleditorwidgets/contextpanewidget.cpp @@ -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 } diff --git a/src/libs/qmleditorwidgets/customcolordialog.cpp b/src/libs/qmleditorwidgets/customcolordialog.cpp index e6dc53c1b4a6e34a181864c22a7dfa546e104071..7c4df3b43a39c08423ff16d1200752bb44bfa992 100644 --- a/src/libs/qmleditorwidgets/customcolordialog.cpp +++ b/src/libs/qmleditorwidgets/customcolordialog.cpp @@ -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 } diff --git a/src/libs/qtcomponents/styleitem/qstyleitem.cpp b/src/libs/qtcomponents/styleitem/qstyleitem.cpp index 466f983f761f83be449af267aa72e5bc2c81974a..dc580d5b9b53bbdb7ab47a8b95337863abf60942 100644 --- a/src/libs/qtcomponents/styleitem/qstyleitem.cpp +++ b/src/libs/qtcomponents/styleitem/qstyleitem.cpp @@ -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 diff --git a/src/libs/utils/detailsbutton.cpp b/src/libs/utils/detailsbutton.cpp index e3b3c5becbb8dac4a67ebb73f74f6441521b8085..61d04a61111e0cddae70cf779f38fd80dac85582 100644 --- a/src/libs/utils/detailsbutton.cpp +++ b/src/libs/utils/detailsbutton.cpp @@ -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))); diff --git a/src/libs/utils/detailswidget.cpp b/src/libs/utils/detailswidget.cpp index 97f8bdb5f073ff4e5fa215a509b30661752867e8..dccca17f5210c28e00913a64909ba871836c508b 100644 --- a/src/libs/utils/detailswidget.cpp +++ b/src/libs/utils/detailswidget.cpp @@ -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); diff --git a/src/libs/utils/navigationtreeview.cpp b/src/libs/utils/navigationtreeview.cpp index 48ebd7d139adb9dd40f45a32aa10e724682367c5..e649c2d9690891a126261ac61e3816badc807cd4 100644 --- a/src/libs/utils/navigationtreeview.cpp +++ b/src/libs/utils/navigationtreeview.cpp @@ -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 diff --git a/src/libs/utils/navigationtreeview.h b/src/libs/utils/navigationtreeview.h index 9422a6116466f54ebed5e6714e7a7e9b04af24ee..189fa0d6ab4a0bfe284f603895db5c79fc0778c0 100644 --- a/src/libs/utils/navigationtreeview.h +++ b/src/libs/utils/navigationtreeview.h @@ -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 }; diff --git a/src/libs/utils/pathchooser.cpp b/src/libs/utils/pathchooser.cpp index 20e3d071882d580717a9fed68a3e8ed634feeb33..d3cefb280160c3add516f93ec1917f56afb8e88c 100644 --- a/src/libs/utils/pathchooser.cpp +++ b/src/libs/utils/pathchooser.cpp @@ -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..."); diff --git a/src/libs/utils/stylehelper.cpp b/src/libs/utils/stylehelper.cpp index d46b2762f868eda807df0b1b7774403066b4ac57..0905781d18bc962396b2de7bb303d53e347f69bf 100644 --- a/src/libs/utils/stylehelper.cpp +++ b/src/libs/utils/stylehelper.cpp @@ -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; diff --git a/src/plugins/bookmarks/bookmarksplugin.cpp b/src/plugins/bookmarks/bookmarksplugin.cpp index b3e3d3a2d7759ba7e4c170c70cb1fa9ab8577f0a..c4c14467864f3aec87e8481237686d58be33cb7c 100644 --- a/src/plugins/bookmarks/bookmarksplugin.cpp +++ b/src/plugins/bookmarks/bookmarksplugin.cpp @@ -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+."))); diff --git a/src/plugins/coreplugin/actionmanager/command.cpp b/src/plugins/coreplugin/actionmanager/command.cpp index 8e09b09ffd63102585c8c386c27bede3a75b1296..4dc93c3c6f97cfc995347cfebd609b4512c614f8 100644 --- a/src/plugins/coreplugin/actionmanager/command.cpp +++ b/src/plugins/coreplugin/actionmanager/command.cpp @@ -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()) diff --git a/src/plugins/coreplugin/coreconstants.h b/src/plugins/coreplugin/coreconstants.h index 13a2283e3945c92a9b4894c4319b57f93ce0c02e..0ded8257945206aa7a435f63395336b8cd17a6a4 100644 --- a/src/plugins/coreplugin/coreconstants.h +++ b/src/plugins/coreplugin/coreconstants.h @@ -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 diff --git a/src/plugins/coreplugin/editormanager/editormanager.cpp b/src/plugins/coreplugin/editormanager/editormanager.cpp index 887ed1cba839f0a2c7a40c1cf04373d5f046ff3c..1e686fb8cdd51a23ecaf8541e165b571f657119e 100644 --- a/src/plugins/coreplugin/editormanager/editormanager.cpp +++ b/src/plugins/coreplugin/editormanager/editormanager.cpp @@ -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 diff --git a/src/plugins/coreplugin/editormanager/editorview.cpp b/src/plugins/coreplugin/editormanager/editorview.cpp index eb868e8b8c2bb4c5029c44959b2e39a42529dfd7..b01f6e4cbe69965ecc566c34ab11fd10c9e20bb7 100644 --- a/src/plugins/coreplugin/editormanager/editorview.cpp +++ b/src/plugins/coreplugin/editormanager/editorview.cpp @@ -66,7 +66,7 @@ #include <QtGui/QSplitter> #include <QtGui/QStackedLayout> -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC #include <qmacstyle_mac.h> #endif diff --git a/src/plugins/coreplugin/editormanager/openeditorsview.cpp b/src/plugins/coreplugin/editormanager/openeditorsview.cpp index 30f04b688c4baff99f5c5c0f12534a21c7910e6a..b2de6eaa19a91e2b9084a6ab38217da7f62a9612 100644 --- a/src/plugins/coreplugin/editormanager/openeditorsview.cpp +++ b/src/plugins/coreplugin/editormanager/openeditorsview.cpp @@ -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 diff --git a/src/plugins/coreplugin/editormanager/openeditorswindow.cpp b/src/plugins/coreplugin/editormanager/openeditorswindow.cpp index da5f25d3dc942b9eab172c5597f0d3df0809c980..eea958c9db0593c738085dcaa105a18520359cda 100644 --- a/src/plugins/coreplugin/editormanager/openeditorswindow.cpp +++ b/src/plugins/coreplugin/editormanager/openeditorswindow.cpp @@ -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); diff --git a/src/plugins/coreplugin/editortoolbar.cpp b/src/plugins/coreplugin/editortoolbar.cpp index 145a62620bcb26326130b2a655a3f63944b6ee43..843617ca852650f30df433b2bea1a5c0b97f0ae0 100644 --- a/src/plugins/coreplugin/editortoolbar.cpp +++ b/src/plugins/coreplugin/editortoolbar.cpp @@ -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 diff --git a/src/plugins/coreplugin/fancyactionbar.cpp b/src/plugins/coreplugin/fancyactionbar.cpp index 68dfc50250977e84308fcf2eb4296312cc63bbb1..9bfbf0faac4789e22a252d0ba1d889b6ed917b27 100644 --- a/src/plugins/coreplugin/fancyactionbar.cpp +++ b/src/plugins/coreplugin/fancyactionbar.cpp @@ -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); diff --git a/src/plugins/coreplugin/fancytabwidget.cpp b/src/plugins/coreplugin/fancytabwidget.cpp index 4c0be9215f26f1e7158e8f2ed57166aef568a993..5f88c98fc70dd633f5df5f98fefbba61be66f8e3 100644 --- a/src/plugins/coreplugin/fancytabwidget.cpp +++ b/src/plugins/coreplugin/fancytabwidget.cpp @@ -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()); diff --git a/src/plugins/coreplugin/fileiconprovider.cpp b/src/plugins/coreplugin/fileiconprovider.cpp index a18a945cd9433f118ff6ae4a01ebbf09b702b214..4a1e06ca20c66738846fbaa1e70aeee2ac8c313d 100644 --- a/src/plugins/coreplugin/fileiconprovider.cpp +++ b/src/plugins/coreplugin/fileiconprovider.cpp @@ -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. diff --git a/src/plugins/coreplugin/fileutils.cpp b/src/plugins/coreplugin/fileutils.cpp index 19327a5f973586741ff28fb80a6cc8f0e941829a..465dd2c1926c49f4a31c52f67498d335957ca2da 100644 --- a/src/plugins/coreplugin/fileutils.cpp +++ b/src/plugins/coreplugin/fileutils.cpp @@ -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; diff --git a/src/plugins/coreplugin/mainwindow.cpp b/src/plugins/coreplugin/mainwindow.cpp index eb4f18cbe9efe83b1cd9a2da80506e4cd815e126..ded146b8dbe093af891934f812c205bff15d9b05 100644 --- a/src/plugins/coreplugin/mainwindow.cpp +++ b/src/plugins/coreplugin/mainwindow.cpp @@ -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; diff --git a/src/plugins/coreplugin/mainwindow.h b/src/plugins/coreplugin/mainwindow.h index 94e17434e722fc8bab7d464be70fb8bf5b49dffa..12da184467c988531ce598f8cad845288766e81f 100644 --- a/src/plugins/coreplugin/mainwindow.h +++ b/src/plugins/coreplugin/mainwindow.h @@ -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 diff --git a/src/plugins/coreplugin/manhattanstyle.cpp b/src/plugins/coreplugin/manhattanstyle.cpp index 981d223c016841a7cec50a8bebde6efbc7375e58..c067b0e5cb60101239ffdf4e7db16932a8b2d3c8 100644 --- a/src/plugins/coreplugin/manhattanstyle.cpp +++ b/src/plugins/coreplugin/manhattanstyle.cpp @@ -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); diff --git a/src/plugins/coreplugin/modemanager.cpp b/src/plugins/coreplugin/modemanager.cpp index 243dbd4e844a2d6476a5c554008a92e9935dcc99..1fff06414f775ecc9db89a10ece22db4ead1ad94 100644 --- a/src/plugins/coreplugin/modemanager.cpp +++ b/src/plugins/coreplugin/modemanager.cpp @@ -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))); diff --git a/src/plugins/coreplugin/outputpanemanager.cpp b/src/plugins/coreplugin/outputpanemanager.cpp index 71380d3570b19685b7bdfa1886ee5a1a4942af0d..1c33c2d08dccfd35ff0505f392a1e67ff8b10fc4 100644 --- a/src/plugins/coreplugin/outputpanemanager.cpp +++ b/src/plugins/coreplugin/outputpanemanager.cpp @@ -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; #else int modifier = Qt::ALT; @@ -222,7 +222,7 @@ void OutputPaneManager::init() mpanes->addAction(cmd, "Coreplugin.OutputPane.ActionsGroup"); cmd = am->registerAction(m_minMaxAction, "Coreplugin.OutputPane.minmax", globalcontext); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+9"))); #else cmd->setDefaultKeySequence(QKeySequence(tr("Alt+9"))); @@ -538,7 +538,7 @@ OutputPaneToggleButton::OutputPaneToggleButton(int number, const QString &text, " border-width: 2px 2px 2px 19px; padding-left: -17; padding-right: 4 } " "QToolButton:checked { border-image: url(:/core/images/panel_button_checked.png) 2 2 2 19 } " "QToolButton::menu-indicator { width:0; height:0 }" -#ifndef Q_WS_MAC // Mac UIs usually don't hover +#ifndef Q_OS_MAC // Mac UIs usually don't hover "QToolButton:checked:hover { border-image: url(:/core/images/panel_button_checked_hover.png) 2 2 2 19 } " "QToolButton:pressed:hover { border-image: url(:/core/images/panel_button_pressed.png) 2 2 2 19 } " "QToolButton:hover { border-image: url(:/core/images/panel_button_hover.png) 2 2 2 19 } " diff --git a/src/plugins/cpaster/pasteselectdialog.cpp b/src/plugins/cpaster/pasteselectdialog.cpp index 68287439d78dc4161c3066fdca679a794b027df7..c12b88022705b4b60105aa93a56aa75529ff067c 100644 --- a/src/plugins/cpaster/pasteselectdialog.cpp +++ b/src/plugins/cpaster/pasteselectdialog.cpp @@ -58,9 +58,9 @@ PasteSelectDialog::PasteSelectDialog(const QList<Protocol*> &protocols, connect(m_refreshButton, SIGNAL(clicked()), this, SLOT(list())); m_ui.listWidget->setSelectionMode(QAbstractItemView::SingleSelection); -#ifndef Q_WS_MACX +#ifndef Q_OS_MACX m_ui.listWidget->setFrameStyle(QFrame::NoFrame); -#endif // Q_WS_MACX +#endif // Q_OS_MACX // Proportional formatting of columns for CodePaster QFont listFont = m_ui.listWidget->font(); listFont.setFamily(QLatin1String("Courier")); diff --git a/src/plugins/cppeditor/cppplugin.cpp b/src/plugins/cppeditor/cppplugin.cpp index 5cd7b3e124881be29e9e5bfae32e7f87b1e2608f..707c17ef05d50eea62710b0369a713eeaddd5a21 100644 --- a/src/plugins/cppeditor/cppplugin.cpp +++ b/src/plugins/cppeditor/cppplugin.cpp @@ -86,7 +86,7 @@ CppEditorFactory::CppEditorFactory(CppPlugin *owner) : << QLatin1String(CppEditor::Constants::CPP_SOURCE_MIMETYPE) << QLatin1String(CppEditor::Constants::CPP_HEADER_MIMETYPE); -#if !defined(Q_WS_MAC) && !defined(Q_WS_WIN) +#if !defined(Q_OS_MAC) && !defined(Q_WS_WIN) Core::FileIconProvider *iconProvider = Core::FileIconProvider::instance(); Core::MimeDatabase *mimeDatabase = Core::ICore::mimeDatabase(); iconProvider->registerIconOverlayForMimeType(QIcon(QLatin1String(":/cppeditor/images/qt_cpp.png")), diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp index e1e034666da271a0b7b8bd53747b0e14092bc36f..fb208649d391bfe3e4a5dafa92d9b4e2650f2ac4 100644 --- a/src/plugins/debugger/debuggerplugin.cpp +++ b/src/plugins/debugger/debuggerplugin.cpp @@ -380,7 +380,7 @@ namespace PE = ProjectExplorer::Constants; namespace Debugger { namespace Constants { -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC const char STOP_KEY[] = "Shift+Ctrl+Y"; const char RESET_KEY[] = "Ctrl+Shift+F5"; const char STEP_KEY[] = "Ctrl+Shift+I"; diff --git a/src/plugins/fakevim/fakevimhandler.cpp b/src/plugins/fakevim/fakevimhandler.cpp index 925c5969628ec306dea057939f296447cf6716b6..bffdd98c0fe3a24528089ee0d9c302c254165429 100644 --- a/src/plugins/fakevim/fakevimhandler.cpp +++ b/src/plugins/fakevim/fakevimhandler.cpp @@ -129,7 +129,7 @@ namespace Internal { #define EDITOR(s) (m_textedit ? m_textedit->s : m_plaintextedit->s) enum { -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC RealControlModifier = Qt::MetaModifier #else RealControlModifier = Qt::ControlModifier diff --git a/src/plugins/find/findtoolbar.cpp b/src/plugins/find/findtoolbar.cpp index 9cd39b422a808a2d1f27ddc86b9a4067b705df5e..fc6a12f6e2a1108ab377e88490bace250374d13a 100644 --- a/src/plugins/find/findtoolbar.cpp +++ b/src/plugins/find/findtoolbar.cpp @@ -279,7 +279,7 @@ bool FindToolBar::eventFilter(QObject *obj, QEvent *event) if ((obj == m_ui.findEdit || obj == m_findCompleter->popup()) && event->type() == QEvent::KeyPress) { QKeyEvent *ke = static_cast<QKeyEvent *>(event); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC if (ke->key() == Qt::Key_Space && (ke->modifiers() & Qt::MetaModifier)) { #else if (ke->key() == Qt::Key_Space && (ke->modifiers() & Qt::ControlModifier)) { @@ -300,7 +300,7 @@ bool FindToolBar::eventFilter(QObject *obj, QEvent *event) event->accept(); return true; } -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC } else if (ke->key() == Qt::Key_Space && (ke->modifiers() & Qt::MetaModifier)) { #else } else if (ke->key() == Qt::Key_Space && (ke->modifiers() & Qt::ControlModifier)) { diff --git a/src/plugins/help/externalhelpwindow.cpp b/src/plugins/help/externalhelpwindow.cpp index 4287c3d117719043f5b13a2dad1defa4f608a87c..5d69a7977a60bea707c3ac77a786041da03e80b2 100644 --- a/src/plugins/help/externalhelpwindow.cpp +++ b/src/plugins/help/externalhelpwindow.cpp @@ -145,7 +145,7 @@ ExternalHelpWindow::ExternalHelpWindow(QWidget *parent) tr("Show Sidebar"), this); connect(action, SIGNAL(triggered()), this, SIGNAL(showHideSidebar())); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC reset->setShortcut(QKeySequence(Qt::ALT + Qt::Key_0)); action->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_0)); ctrlTab->setShortcut(QKeySequence(Qt::ALT + Qt::Key_Tab)); diff --git a/src/plugins/help/helpplugin.cpp b/src/plugins/help/helpplugin.cpp index 3ae648dae9069ff666b605c2a9c19b2757296d2e..1f9215a45c5daf6092e207e06f708b669928d6b1 100644 --- a/src/plugins/help/helpplugin.cpp +++ b/src/plugins/help/helpplugin.cpp @@ -247,7 +247,7 @@ bool HelpPlugin::initialize(const QStringList &arguments, QString *error) cmd->setDefaultKeySequence(QKeySequence(Qt::Key_F1)); connect(action, SIGNAL(triggered()), this, SLOT(activateContext())); -#ifndef Q_WS_MAC +#ifndef Q_OS_MAC action = new QAction(this); action->setSeparator(true); cmd = am->registerAction(action, Core::Id("Help.Separator"), globalcontext); @@ -264,7 +264,7 @@ bool HelpPlugin::initialize(const QStringList &arguments, QString *error) am->actionContainer(Core::Constants::M_HELP)->addAction(cmd, Core::Constants::G_HELP_HELP); connect(action, SIGNAL(triggered()), this, SLOT(slotReportBug())); -#ifndef Q_WS_MAC +#ifndef Q_OS_MAC action = new QAction(this); action->setSeparator(true); cmd = am->registerAction(action, Core::Id("Help.Separator2"), globalcontext); diff --git a/src/plugins/help/openpagesswitcher.cpp b/src/plugins/help/openpagesswitcher.cpp index 07799405e7efbadf3567bc892b5e128a56172038..7cc041b6841a5ad860bee2dd848ccd4c93e70253 100644 --- a/src/plugins/help/openpagesswitcher.cpp +++ b/src/plugins/help/openpagesswitcher.cpp @@ -56,7 +56,7 @@ OpenPagesSwitcher::OpenPagesSwitcher(OpenPagesModel *model) // 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_openPagesWidget->frameStyle()); #endif m_openPagesWidget->setFrameStyle(QFrame::NoFrame); @@ -127,7 +127,7 @@ bool OpenPagesSwitcher::eventFilter(QObject *object, QEvent *event) emit setCurrentPage(m_openPagesWidget->currentIndex()); return true; } -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC const Qt::KeyboardModifier modifier = Qt::AltModifier; #else const Qt::KeyboardModifier modifier = Qt::ControlModifier; diff --git a/src/plugins/help/openpageswidget.cpp b/src/plugins/help/openpageswidget.cpp index 8a7408aba401ee7da3a9ca15caf5a8b1171c2554..d9bf772806733e04bc2bc72a84ef0026ead16e4c 100644 --- a/src/plugins/help/openpageswidget.cpp +++ b/src/plugins/help/openpageswidget.cpp @@ -45,7 +45,7 @@ #include <QtGui/QMouseEvent> #include <QtGui/QMenu> -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC #include <qmacstyle_mac.h> #endif diff --git a/src/plugins/locator/locatorwidget.cpp b/src/plugins/locator/locatorwidget.cpp index fc2428068da5f9ab7a16b6bad063ab5a2fa5632c..1d6525bec908ac890e17d1382277969728a234c7 100644 --- a/src/plugins/locator/locatorwidget.cpp +++ b/src/plugins/locator/locatorwidget.cpp @@ -245,7 +245,7 @@ CompletionList::CompletionList(QWidget *parent) // This is too slow when done on all results //header()->setResizeMode(QHeaderView::ResizeToContents); setWindowFlags(Qt::ToolTip); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC if (horizontalScrollBar()) horizontalScrollBar()->setAttribute(Qt::WA_MacMiniSize); if (verticalScrollBar()) diff --git a/src/plugins/macros/macrosplugin.cpp b/src/plugins/macros/macrosplugin.cpp index d29d02a79e615feda5939245bc36909be901d53e..b8dcfd850ac1cd72114cf63e0b91bb89a2124737 100644 --- a/src/plugins/macros/macrosplugin.cpp +++ b/src/plugins/macros/macrosplugin.cpp @@ -88,7 +88,7 @@ bool MacrosPlugin::initialize(const QStringList &arguments, QString *errorMessag QAction *startMacro = new QAction(tr("Record Macro"), this); Core::Command *command = am->registerAction(startMacro, Constants::START_MACRO, textContext); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC command->setDefaultKeySequence(QKeySequence(tr("Ctrl+("))); #else command->setDefaultKeySequence(QKeySequence(tr("Alt+("))); @@ -99,7 +99,7 @@ bool MacrosPlugin::initialize(const QStringList &arguments, QString *errorMessag QAction *endMacro = new QAction(tr("Stop Recording Macro"), this); endMacro->setEnabled(false); command = am->registerAction(endMacro, Constants::END_MACRO, globalcontext); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC command->setDefaultKeySequence(QKeySequence(tr("Ctrl+)"))); #else command->setDefaultKeySequence(QKeySequence(tr("Alt+)"))); diff --git a/src/plugins/projectexplorer/buildstepspage.cpp b/src/plugins/projectexplorer/buildstepspage.cpp index c4b52d8b6cee0c699c8ad7b227ecf09400bd5dc6..ee12bc52ce9041374c5bdbde3f0d59159e0154e6 100644 --- a/src/plugins/projectexplorer/buildstepspage.cpp +++ b/src/plugins/projectexplorer/buildstepspage.cpp @@ -67,7 +67,7 @@ BuildStepsWidgetData::BuildStepsWidgetData(BuildStep *s) : detailsWidget->setWidget(widget); Utils::FadingPanel *toolWidget = new Utils::FadingPanel(detailsWidget); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC QSize buttonSize(20, 20); #else QSize buttonSize(20, 26); diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp index ad7c9b16448d2a396dc7990de811d3227c10043b..9de293d4c05f8b3a0515f1c8a61f3761bb38ef7e 100644 --- a/src/plugins/projectexplorer/projectexplorer.cpp +++ b/src/plugins/projectexplorer/projectexplorer.cpp @@ -576,7 +576,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er // open action d->m_loadAction = new QAction(tr("Load Project..."), this); cmd = am->registerAction(d->m_loadAction, Constants::LOAD, globalcontext); -#ifndef Q_WS_MAC +#ifndef Q_OS_MAC cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Shift+O"))); #endif msessionContextMenu->addAction(cmd, Constants::G_SESSION_FILES); diff --git a/src/plugins/qmldesigner/components/integration/xuifiledialog.cpp b/src/plugins/qmldesigner/components/integration/xuifiledialog.cpp index 6f2e10d80c7aee6427e5791be81ba33d894dbf2c..aebc05feca52efcfcad24b20f8667cf1db0a3c39 100644 --- a/src/plugins/qmldesigner/components/integration/xuifiledialog.cpp +++ b/src/plugins/qmldesigner/components/integration/xuifiledialog.cpp @@ -59,21 +59,21 @@ void XUIFileDialog::runSaveFileDialog(const QString& path, QWidget* parent, QObj if (dir.isNull()) dir = XUIFileDialog::defaultFolder(); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC QFileDialog *dialog = new QFileDialog(parent, Qt::Sheet); dialog->setFileMode(QFileDialog::AnyFile); dialog->setAcceptMode(QFileDialog::AcceptSave); dialog->setNameFilters(XUIFileDialog::fileNameFilters()); dialog->setDirectory(dir); dialog->open(receiver, member); -#else // !Q_WS_MAC +#else // !Q_OS_MAC QString caption = QCoreApplication::translate("QmlDesigner::XUIFileDialog", "Save File"); QString fileName = QFileDialog::getSaveFileName(parent, caption, dir, XUIFileDialog::fileNameFilters().join(";;")); QmlDesigner::Internal::SignalEmitter emitter; QObject::connect(&emitter, SIGNAL(fileNameSelected(QString)), receiver, member); emitter.emitFileNameSelected(fileName); -#endif // Q_WS_MAC +#endif // Q_OS_MAC } QStringList XUIFileDialog::fileNameFilters() diff --git a/src/plugins/qmljseditor/qmljseditorplugin.cpp b/src/plugins/qmljseditor/qmljseditorplugin.cpp index 90bced560e7d07558b7ba009a26e9fb48fa73df5..b6754820d1755156b4246b4106013bc18cf2bc7b 100644 --- a/src/plugins/qmljseditor/qmljseditorplugin.cpp +++ b/src/plugins/qmljseditor/qmljseditorplugin.cpp @@ -214,7 +214,7 @@ bool QmlJSEditorPlugin::initialize(const QStringList & /*arguments*/, QString *e QAction *showQuickToolbar = new QAction(tr("Show Qt Quick Toolbar"), this); cmd = am->registerAction(showQuickToolbar, Constants::SHOW_QT_QUICK_HELPER, context); -#ifdef Q_WS_MACX +#ifdef Q_OS_MACX cmd->setDefaultKeySequence(QKeySequence(Qt::META + Qt::ALT + Qt::Key_Space)); #else cmd->setDefaultKeySequence(QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_Space)); diff --git a/src/plugins/qt4projectmanager/qt4target.cpp b/src/plugins/qt4projectmanager/qt4target.cpp index f448c376d137e5d80d6321b223c19e5c29d836b6..6c3b5a41c66cf1de86f76d6723a3f695bac05a36 100644 --- a/src/plugins/qt4projectmanager/qt4target.cpp +++ b/src/plugins/qt4projectmanager/qt4target.cpp @@ -577,7 +577,7 @@ Qt4DefaultTargetSetupWidget::Qt4DefaultTargetSetupWidget(Qt4BaseTargetFactory *f w = new QWidget; m_newBuildsLayout = new QGridLayout; m_newBuildsLayout->setMargin(0); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC m_newBuildsLayout->setSpacing(0); #endif w->setLayout(m_newBuildsLayout); diff --git a/src/plugins/qtsupport/qtoptionspage.cpp b/src/plugins/qtsupport/qtoptionspage.cpp index 7eea0180164739c0c651f57a17e5cf5606d2488e..4d8899523dd8937fe12fa93f3f325c17e11974e1 100644 --- a/src/plugins/qtsupport/qtoptionspage.cpp +++ b/src/plugins/qtsupport/qtoptionspage.cpp @@ -580,7 +580,7 @@ static QString filterForQmakeFileDialog() { QString filter = QLatin1String("qmake ("); foreach (const QString &s, Utils::BuildableHelperLibrary::possibleQMakeCommands()) { -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC // work around QTBUG-7739 that prohibits filters that don't start with * filter += QLatin1Char('*'); #endif diff --git a/src/plugins/texteditor/basetexteditor.cpp b/src/plugins/texteditor/basetexteditor.cpp index f4a2df396b076d8517206aa011cded3e9ab3b68d..09498bc5926747d6f98062a0e05b88d19d2b09a8 100644 --- a/src/plugins/texteditor/basetexteditor.cpp +++ b/src/plugins/texteditor/basetexteditor.cpp @@ -1760,7 +1760,7 @@ void BaseTextEditorWidget::keyPressEvent(QKeyEvent *e) // fall through case Qt::Key_Right: case Qt::Key_Left: -#ifndef Q_WS_MAC +#ifndef Q_OS_MAC if ((e->modifiers() & (Qt::AltModifier | Qt::ShiftModifier)) == (Qt::AltModifier | Qt::ShiftModifier)) { int diff_row = 0; @@ -3392,7 +3392,7 @@ void BaseTextEditorWidget::paintEvent(QPaintEvent *e) cursor_pen = painter.pen(); } -#ifndef Q_WS_MAC // no visible cursor on mac +#ifndef Q_OS_MAC // no visible cursor on mac if (blockSelectionCursorRect.isValid()) painter.fillRect(blockSelectionCursorRect, palette().text()); #endif diff --git a/src/plugins/texteditor/codeassist/functionhintproposalwidget.cpp b/src/plugins/texteditor/codeassist/functionhintproposalwidget.cpp index 57cf2b153f5e093250e3521cb455d4e3daa45e3d..d05ebfe9b79f1108b7c69b12955fc46c2ab00687 100644 --- a/src/plugins/texteditor/codeassist/functionhintproposalwidget.cpp +++ b/src/plugins/texteditor/codeassist/functionhintproposalwidget.cpp @@ -290,7 +290,7 @@ void FunctionHintProposalWidget::updateContent() void FunctionHintProposalWidget::updatePosition() { const QDesktopWidget *desktop = QApplication::desktop(); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC const QRect &screen = desktop->availableGeometry(desktop->screenNumber(d->m_underlyingWidget)); #else const QRect &screen = desktop->screenGeometry(desktop->screenNumber(d->m_underlyingWidget)); diff --git a/src/plugins/texteditor/codeassist/genericproposalwidget.cpp b/src/plugins/texteditor/codeassist/genericproposalwidget.cpp index a469e95917790a1acddfc8b8b6ec7e9fa1dbeb64..8bb44bfa4a38db830d028e8dc56dfe736974702e 100644 --- a/src/plugins/texteditor/codeassist/genericproposalwidget.cpp +++ b/src/plugins/texteditor/codeassist/genericproposalwidget.cpp @@ -306,7 +306,7 @@ void GenericProposalWidgetPrivate::maybeShowInfoTip() GenericProposalWidget::GenericProposalWidget() : d(new GenericProposalWidgetPrivate(this)) { -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC if (d->m_completionListView->horizontalScrollBar()) d->m_completionListView->horizontalScrollBar()->setAttribute(Qt::WA_MacMiniSize); if (d->m_completionListView->verticalScrollBar()) @@ -493,7 +493,7 @@ void GenericProposalWidget::updatePositionAndSize() // Determine the position, keeping the popup on the screen const QDesktopWidget *desktop = QApplication::desktop(); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC const QRect screen = desktop->availableGeometry(desktop->screenNumber(d->m_underlyingWidget)); #else const QRect screen = desktop->screenGeometry(desktop->screenNumber(d->m_underlyingWidget)); diff --git a/src/plugins/texteditor/fontsettings.cpp b/src/plugins/texteditor/fontsettings.cpp index 3738a6d0c90a179afeff2e5fc28450b442f52ebe..99d5d2b723a68a096c42e3b7b442a63d84f5b507 100644 --- a/src/plugins/texteditor/fontsettings.cpp +++ b/src/plugins/texteditor/fontsettings.cpp @@ -53,7 +53,7 @@ static const char schemeFileNameKey[] = "ColorScheme"; namespace { static const bool DEFAULT_ANTIALIAS = true; -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC enum { DEFAULT_FONT_SIZE = 12 }; static const char *DEFAULT_FONT_FAMILY = "Monaco"; #else diff --git a/src/plugins/texteditor/texteditoractionhandler.cpp b/src/plugins/texteditor/texteditoractionhandler.cpp index 2a99aec764489a9c9aae5a66a4642e1920169295..28a2bda42473ff183ea5002f3e00b5c9cf7f630d 100644 --- a/src/plugins/texteditor/texteditoractionhandler.cpp +++ b/src/plugins/texteditor/texteditoractionhandler.cpp @@ -165,7 +165,7 @@ void TextEditorActionHandler::createActions() advancedMenu->addAction(command, Core::Constants::G_EDIT_FORMAT); connect(m_formatAction, SIGNAL(triggered(bool)), this, SLOT(formatAction())); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC QString modifier = tr("Meta"); #else QString modifier = tr("Ctrl"); @@ -277,7 +277,7 @@ void TextEditorActionHandler::createActions() m_resetFontSizeAction = new QAction(tr("Reset Font Size"), this); command = am->registerAction(m_resetFontSizeAction, Constants::RESET_FONT_SIZE, m_contextId); -#ifndef Q_WS_MAC +#ifndef Q_OS_MAC command->setDefaultKeySequence(QKeySequence(tr("Ctrl+0"))); #endif connect(m_resetFontSizeAction, SIGNAL(triggered()), this, SLOT(resetFontSize())); diff --git a/src/plugins/texteditor/texteditorplugin.cpp b/src/plugins/texteditor/texteditorplugin.cpp index 6f82f108a05f40358bcb3ff64812b0879d6bf8aa..8ab27768ebd11e547eb4546f686b27464cd6ae71 100644 --- a/src/plugins/texteditor/texteditorplugin.cpp +++ b/src/plugins/texteditor/texteditorplugin.cpp @@ -137,7 +137,7 @@ bool TextEditorPlugin::initialize(const QStringList &arguments, QString *errorMe // Make sure the shortcut still works when the completion widget is active completionShortcut->setContext(Qt::ApplicationShortcut); Core::Command *command = am->registerShortcut(completionShortcut, Constants::COMPLETE_THIS, context); -#ifndef Q_WS_MAC +#ifndef Q_OS_MAC command->setDefaultKeySequence(QKeySequence(tr("Ctrl+Space"))); #else command->setDefaultKeySequence(QKeySequence(tr("Meta+Space"))); diff --git a/src/plugins/texteditor/tooltip/reuse.h b/src/plugins/texteditor/tooltip/reuse.h index fc5fa5d786560b3bcde065415399566452200c6f..576e25a3ce2efdf90aade0ff30d368e0b98670e8 100644 --- a/src/plugins/texteditor/tooltip/reuse.h +++ b/src/plugins/texteditor/tooltip/reuse.h @@ -52,7 +52,7 @@ inline int screenNumber(const QPoint &pos, QWidget *w) inline QRect screenGeometry(const QPoint &pos, QWidget *w) { -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC return QApplication::desktop()->availableGeometry(screenNumber(pos, w)); #else return QApplication::desktop()->screenGeometry(screenNumber(pos, w)); diff --git a/src/plugins/texteditor/tooltip/tooltip.cpp b/src/plugins/texteditor/tooltip/tooltip.cpp index d993916e90b0467622f7e95435fe9eccff8536f6..d72c30096c279351c90cbe84fbce0ee4e2724959 100644 --- a/src/plugins/texteditor/tooltip/tooltip.cpp +++ b/src/plugins/texteditor/tooltip/tooltip.cpp @@ -107,7 +107,7 @@ bool ToolTip::acceptShow(const TipContent &content, } hideTipImmediately(); } -#if !defined(QT_NO_EFFECTS) && !defined(Q_WS_MAC) +#if !defined(QT_NO_EFFECTS) && !defined(Q_OS_MAC) // While the effect takes places it might be that although the widget is actually on // screen the isVisible method doesn't return true. else if (m_tip @@ -168,7 +168,7 @@ bool ToolTip::isVisible() const void ToolTip::showTip() { -#if !defined(QT_NO_EFFECTS) && !defined(Q_WS_MAC) +#if !defined(QT_NO_EFFECTS) && !defined(Q_OS_MAC) if (QApplication::isEffectEnabled(Qt::UI_FadeTooltip)) qFadeEffect(m_tip); else if (QApplication::isEffectEnabled(Qt::UI_AnimateTooltip)) @@ -237,7 +237,7 @@ bool ToolTip::eventFilter(QObject *o, QEvent *event) return false; switch (event->type()) { -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC case QEvent::KeyPress: case QEvent::KeyRelease: { int key = static_cast<QKeyEvent *>(event)->key(); diff --git a/src/shared/help/indexwindow.cpp b/src/shared/help/indexwindow.cpp index 5cd990becd472f6dbef0580b5a28830f1db6055c..64f599104938e3d8e58f07629954563f78a36496 100644 --- a/src/shared/help/indexwindow.cpp +++ b/src/shared/help/indexwindow.cpp @@ -167,7 +167,7 @@ bool IndexWindow::eventFilter(QObject *obj, QEvent *e) } } } -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC else if (obj == m_indexWidget && e->type() == QEvent::KeyPress) { QKeyEvent *ke = static_cast<QKeyEvent*>(e); if (ke->key() == Qt::Key_Return || ke->key() == Qt::Key_Enter)