diff options
author | Morten Johan Sorvig <morten.sorvig@nokia.com> | 2012-01-25 10:25:05 +0100 |
---|---|---|
committer | Morten Johan Sørvig <morten.sorvig@nokia.com> | 2012-01-26 11:06:12 +0100 |
commit | b0cd54c1ec9e30a32483065e6c0fcb53a1888e81 (patch) | |
tree | d080ed0bb3435f4eab3d0147ebaaaa4e9e0bfee1 /src | |
parent | 896a7a65e445fb92b589e3334302fb44308e33e2 (diff) | |
download | qt-creator-b0cd54c1ec9e30a32483065e6c0fcb53a1888e81.tar.gz |
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: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
Diffstat (limited to 'src')
52 files changed, 97 insertions, 97 deletions
diff --git a/src/libs/qmleditorwidgets/contextpanewidget.cpp b/src/libs/qmleditorwidgets/contextpanewidget.cpp index eb0fb47a68..a65cdde7a2 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 e6dc53c1b4..7c4df3b43a 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 466f983f76..dc580d5b9b 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 e3b3c5becb..61d04a6111 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 97f8bdb5f0..dccca17f52 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 48ebd7d139..e649c2d969 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 9422a61164..189fa0d6ab 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 20e3d07188..d3cefb2801 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 d46b2762f8..0905781d18 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 b3e3d3a2d7..c4c1446786 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 8e09b09ffd..4dc93c3c6f 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 13a2283e39..0ded825794 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 887ed1cba8..1e686fb8cd 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 eb868e8b8c..b01f6e4cbe 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 30f04b688c..b2de6eaa19 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 da5f25d3dc..eea958c9db 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 145a62620b..843617ca85 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 68dfc50250..9bfbf0faac 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 4c0be9215f..5f88c98fc7 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 a18a945cd9..4a1e06ca20 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 19327a5f97..465dd2c192 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 eb4f18cbe9..ded146b8db 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 94e17434e7..12da184467 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 981d223c01..c067b0e5cb 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 243dbd4e84..1fff06414f 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 71380d3570..1c33c2d08d 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 68287439d7..c12b880227 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 5cd7b3e124..707c17ef05 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 e1e034666d..fb208649d3 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 925c596962..bffdd98c0f 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 9cd39b422a..fc6a12f6e2 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 4287c3d117..5d69a7977a 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 3ae648dae9..1f9215a45c 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 07799405e7..7cc041b684 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 8a7408aba4..d9bf772806 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 fc2428068d..1d6525bec9 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 d29d02a79e..b8dcfd850a 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 c4b52d8b6c..ee12bc52ce 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 ad7c9b1644..9de293d4c0 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 6f2e10d80c..aebc05feca 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 90bced560e..b6754820d1 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 f448c376d1..6c3b5a41c6 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 7eea018016..4d8899523d 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 f4a2df396b..09498bc592 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 57cf2b153f..d05ebfe9b7 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 a469e95917..8bb44bfa4a 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 3738a6d0c9..99d5d2b723 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 2a99aec764..28a2bda424 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 6f82f108a0..8ab27768eb 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 fc5fa5d786..576e25a3ce 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 d993916e90..d72c30096c 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 5cd990becd..64f5991049 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) |