diff options
37 files changed, 107 insertions, 115 deletions
diff --git a/src/app/main.cpp b/src/app/main.cpp index e1800de1f1..5199c7c7e6 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -46,7 +46,7 @@ #include <QtGui/QApplication> #include <QtGui/QMainWindow> -#ifdef Q_OS_DARWIN +#ifdef Q_OS_MAC # include <sys/resource.h> #endif @@ -71,7 +71,7 @@ static const char *CLIENT_OPTION = "-client"; typedef QList<ExtensionSystem::PluginSpec *> PluginSpecSet; // Helpers for displaying messages. Note that there is no console on Windows. -#ifdef Q_WS_WIN +#ifdef Q_OS_WIN // Format as <pre> HTML static inline void toHtml(QString &t) { @@ -204,7 +204,7 @@ static inline QStringList getPluginPaths() int main(int argc, char **argv) { -#ifdef Q_OS_DARWIN +#ifdef Q_OS_MAC // increase the number of file that can be opened in Qt Creator. struct rlimit rl; getrlimit(RLIMIT_NOFILE, &rl); diff --git a/src/libs/utils/abstractprocess.h b/src/libs/utils/abstractprocess.h index b7edcd889e..db24b0ca4e 100644 --- a/src/libs/utils/abstractprocess.h +++ b/src/libs/utils/abstractprocess.h @@ -59,7 +59,7 @@ public: //signals: virtual void processError(const QString &error) = 0; -#ifdef Q_WS_WIN +#ifdef Q_OS_WIN // Add PATH and SystemRoot environment variables in case they are missing static QStringList fixWinEnvironment(const QStringList &env); // Quote a Windows command line correctly for the "CreateProcess" API diff --git a/src/libs/utils/pathchooser.cpp b/src/libs/utils/pathchooser.cpp index efc49881c9..be494fb5af 100644 --- a/src/libs/utils/pathchooser.cpp +++ b/src/libs/utils/pathchooser.cpp @@ -44,11 +44,10 @@ #include <QtGui/QToolButton> #include <QtGui/QPushButton> -#ifdef Q_OS_MAC /*static*/ const char * const Core::Utils::PathChooser::browseButtonLabel = +#ifdef Q_WS_MAC QT_TRANSLATE_NOOP("Core::Utils::PathChooser", "Choose..."); #else -/*static*/ const char * const Core::Utils::PathChooser::browseButtonLabel = QT_TRANSLATE_NOOP("Core::Utils::PathChooser", "Browse..."); #endif @@ -128,7 +127,7 @@ PathChooser::~PathChooser() void PathChooser::addButton(const QString &text, QObject *receiver, const char *slotFunc) { -#ifdef Q_OS_MAC +#ifdef Q_WS_MAC QPushButton *button = new QPushButton; #else QToolButton *button = new QToolButton; diff --git a/src/plugins/bookmarks/bookmarksplugin.cpp b/src/plugins/bookmarks/bookmarksplugin.cpp index 3d5cdf2bda..ab1d5239c2 100644 --- a/src/plugins/bookmarks/bookmarksplugin.cpp +++ b/src/plugins/bookmarks/bookmarksplugin.cpp @@ -86,7 +86,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_OS_MAC +#ifndef Q_WS_MAC cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+M"))); #else cmd->setDefaultKeySequence(QKeySequence(tr("Meta+M"))); @@ -116,7 +116,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_OS_MAC +#ifndef Q_WS_MAC cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+,"))); #else cmd->setDefaultKeySequence(QKeySequence(tr("Meta+,"))); @@ -126,7 +126,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_OS_MAC +#ifndef Q_WS_MAC cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+."))); #else cmd->setDefaultKeySequence(QKeySequence(tr("Meta+."))); diff --git a/src/plugins/coreplugin/actionmanager/actionmanager.cpp b/src/plugins/coreplugin/actionmanager/actionmanager.cpp index 608956623e..304f7cf12f 100644 --- a/src/plugins/coreplugin/actionmanager/actionmanager.cpp +++ b/src/plugins/coreplugin/actionmanager/actionmanager.cpp @@ -361,7 +361,7 @@ Command *ActionManagerPrivate::registerOverridableAction(QAction *action, const baseAction->setEnabled(false); baseAction->setObjectName(id); baseAction->setParent(m_mainWnd); -#ifdef Q_OS_MAC +#ifdef Q_WS_MAC baseAction->setIconVisibleInMenu(false); #endif a->setAction(baseAction); diff --git a/src/plugins/coreplugin/editormanager/editormanager.cpp b/src/plugins/coreplugin/editormanager/editormanager.cpp index e4edc05d2b..364098b63b 100644 --- a/src/plugins/coreplugin/editormanager/editormanager.cpp +++ b/src/plugins/coreplugin/editormanager/editormanager.cpp @@ -344,7 +344,7 @@ EditorManager::EditorManager(ICore *core, QWidget *parent) : m_d->m_splitAction = new QAction(tr("Split"), this); cmd = am->registerAction(m_d->m_splitAction, Constants::SPLIT, editManagerContext); -#ifndef Q_OS_MAC +#ifndef Q_WS_MAC cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+E,2"))); #endif mwindow->addAction(cmd, Constants::G_WINDOW_SPLIT); @@ -352,7 +352,7 @@ EditorManager::EditorManager(ICore *core, QWidget *parent) : m_d->m_splitSideBySideAction = new QAction(tr("Split Side by Side"), this); cmd = am->registerAction(m_d->m_splitSideBySideAction, Constants::SPLIT_SIDE_BY_SIDE, editManagerContext); -#ifndef Q_OS_MAC +#ifndef Q_WS_MAC cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+E,3"))); #endif mwindow->addAction(cmd, Constants::G_WINDOW_SPLIT); @@ -360,7 +360,7 @@ EditorManager::EditorManager(ICore *core, QWidget *parent) : m_d->m_removeCurrentSplitAction = new QAction(tr("Remove Current Split"), this); cmd = am->registerAction(m_d->m_removeCurrentSplitAction, Constants::REMOVE_CURRENT_SPLIT, editManagerContext); -#ifndef Q_OS_MAC +#ifndef Q_WS_MAC cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+E,0"))); #endif mwindow->addAction(cmd, Constants::G_WINDOW_SPLIT); @@ -368,7 +368,7 @@ EditorManager::EditorManager(ICore *core, QWidget *parent) : m_d->m_removeAllSplitsAction = new QAction(tr("Remove All Splits"), this); cmd = am->registerAction(m_d->m_removeAllSplitsAction, Constants::REMOVE_ALL_SPLITS, editManagerContext); -#ifndef Q_OS_MAC +#ifndef Q_WS_MAC cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+E,1"))); #endif mwindow->addAction(cmd, Constants::G_WINDOW_SPLIT); @@ -376,7 +376,7 @@ EditorManager::EditorManager(ICore *core, QWidget *parent) : m_d->m_gotoOtherSplitAction = new QAction(tr("Goto Other Split"), this); cmd = am->registerAction(m_d->m_gotoOtherSplitAction, Constants::GOTO_OTHER_SPLIT, editManagerContext); -#ifndef Q_OS_MAC +#ifndef Q_WS_MAC cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+E,o"))); #endif mwindow->addAction(cmd, Constants::G_WINDOW_SPLIT); diff --git a/src/plugins/coreplugin/fancyactionbar.cpp b/src/plugins/coreplugin/fancyactionbar.cpp index b14491ae72..318cf82ff3 100644 --- a/src/plugins/coreplugin/fancyactionbar.cpp +++ b/src/plugins/coreplugin/fancyactionbar.cpp @@ -85,7 +85,7 @@ void FancyToolButton::paintEvent(QPaintEvent *event) QPainter p(this); p.drawPicture(0, 0, m_buttonElements.value(svgIdButtonBase)); p.drawPicture(0, 0, m_buttonElements.value(isDown() ? svgIdButtonPressedBase : svgIdButtonNormalBase)); -#ifndef Q_WS_MAC // Mac UI's dont usually do hover +#ifndef Q_WS_MAC // Mac UIs usually don't hover if (underMouse() && isEnabled()) p.drawPicture(0, 0, m_buttonElements.value(svgIdButtonHoverOverlay)); #endif diff --git a/src/plugins/coreplugin/fileiconprovider.cpp b/src/plugins/coreplugin/fileiconprovider.cpp index b5926a951e..34a58d5744 100644 --- a/src/plugins/coreplugin/fileiconprovider.cpp +++ b/src/plugins/coreplugin/fileiconprovider.cpp @@ -70,7 +70,7 @@ QIcon FileIconProvider::icon(const QFileInfo &fileInfo) // Disabled since for now we'll make sure that all icons fit with our // own custom icons by returning an empty one if we don't know it. -#ifdef Q_OS_WIN +#ifdef Q_WS_WIN // This is incorrect if the OS does not always return the same icon for the // same suffix (Mac OS X), but should speed up the retrieval a lot ... icon = m_systemIconProvider.icon(fileInfo); @@ -123,7 +123,7 @@ void FileIconProvider::registerIconOverlayForSuffix(const QIcon &icon, const QSt QIcon FileIconProvider::iconForSuffix(const QString &suffix) const { QIcon icon; -#ifndef Q_OS_WIN // On windows we use the file system icons +#ifndef Q_WS_WIN // On windows we use the file system icons if (suffix.isEmpty()) return icon; diff --git a/src/plugins/coreplugin/mainwindow.cpp b/src/plugins/coreplugin/mainwindow.cpp index 07ff113294..3520bd0cd8 100644 --- a/src/plugins/coreplugin/mainwindow.cpp +++ b/src/plugins/coreplugin/mainwindow.cpp @@ -144,7 +144,7 @@ MainWindow::MainWindow() : m_optionsAction(0), m_toggleSideBarAction(0), m_toggleFullScreenAction(0), -#ifdef Q_OS_MAC +#ifdef Q_WS_MAC m_minimizeAction(0), m_zoomAction(0), #endif @@ -153,7 +153,7 @@ MainWindow::MainWindow() : OutputPaneManager::create(); setWindowTitle(tr("Qt Creator")); -#ifndef Q_OS_MAC +#ifndef Q_WS_MAC qApp->setWindowIcon(QIcon(":/core/images/qtcreator_logo_128.png")); #endif QCoreApplication::setApplicationName(QLatin1String("QtCreator")); @@ -597,7 +597,7 @@ void MainWindow::registerDefaultActions() // Save As Action tmpaction = new QAction(tr("Save &As..."), this); cmd = am->registerAction(tmpaction, Constants::SAVEAS, m_globalContext); -#ifdef Q_OS_MAC +#ifdef Q_WS_MAC cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Shift+S"))); #endif cmd->setAttribute(Command::CA_UpdateText); @@ -607,7 +607,7 @@ void MainWindow::registerDefaultActions() // SaveAll Action m_saveAllAction = new QAction(tr("Save A&ll"), this); cmd = am->registerAction(m_saveAllAction, Constants::SAVEALL, m_globalContext); -#ifndef Q_OS_MAC +#ifndef Q_WS_MAC cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Shift+S"))); #endif mfile->addAction(cmd, Constants::G_FILE_SAVE); @@ -681,13 +681,13 @@ void MainWindow::registerDefaultActions() // Options Action m_optionsAction = new QAction(tr("&Options..."), this); cmd = am->registerAction(m_optionsAction, Constants::OPTIONS, m_globalContext); -#ifdef Q_OS_MAC +#ifdef Q_WS_MAC cmd->setDefaultKeySequence(QKeySequence("Ctrl+,")); #endif mtools->addAction(cmd, Constants::G_DEFAULT_THREE); connect(m_optionsAction, SIGNAL(triggered()), this, SLOT(showOptionsDialog())); -#ifdef Q_OS_MAC +#ifdef Q_WS_MAC // Minimize Action m_minimizeAction = new QAction(tr("Minimize"), this); cmd = am->registerAction(m_minimizeAction, Constants::MINIMIZE_WINDOW, m_globalContext); @@ -711,7 +711,7 @@ void MainWindow::registerDefaultActions() tr("Show Sidebar"), this); m_toggleSideBarAction->setCheckable(true); cmd = am->registerAction(m_toggleSideBarAction, Constants::TOGGLE_SIDEBAR, m_globalContext); -#ifdef Q_OS_MAC +#ifdef Q_WS_MAC cmd->setDefaultKeySequence(QKeySequence("Ctrl+0")); #else cmd->setDefaultKeySequence(QKeySequence("Alt+0")); @@ -721,7 +721,7 @@ void MainWindow::registerDefaultActions() mwindow->addAction(cmd, Constants::G_WINDOW_PANES); m_toggleSideBarAction->setEnabled(false); -#if !defined(Q_OS_MAC) +#ifndef Q_WS_MAC // Full Screen Action m_toggleFullScreenAction = new QAction(tr("Full Screen"), this); m_toggleFullScreenAction->setCheckable(true); @@ -732,7 +732,7 @@ void MainWindow::registerDefaultActions() #endif // About IDE Action -#ifdef Q_OS_MAC +#ifdef Q_WS_MAC tmpaction = new QAction(tr("About &Qt Creator"), this); // it's convention not to add dots to the about menu #else tmpaction = new QAction(tr("About &Qt Creator..."), this); @@ -746,7 +746,7 @@ void MainWindow::registerDefaultActions() cmd = am->registerAction(tmpaction, Constants::ABOUT_PLUGINS, m_globalContext); mhelp->addAction(cmd, Constants::G_HELP_ABOUT); tmpaction->setEnabled(true); -#ifdef Q_OS_MAC +#ifdef Q_WS_MAC cmd->action()->setMenuRole(QAction::ApplicationSpecificRole); #endif connect(tmpaction, SIGNAL(triggered()), this, SLOT(aboutPlugins())); @@ -1022,7 +1022,7 @@ void MainWindow::changeEvent(QEvent *e) emit windowActivated(); } } else if (e->type() == QEvent::WindowStateChange) { -#ifdef Q_OS_MAC +#ifdef Q_WS_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 7886d7795d..997a0c26d9 100644 --- a/src/plugins/coreplugin/mainwindow.h +++ b/src/plugins/coreplugin/mainwindow.h @@ -208,7 +208,7 @@ private: QAction *m_optionsAction; QAction *m_toggleSideBarAction; QAction *m_toggleFullScreenAction; -#ifdef Q_OS_MAC +#ifdef Q_WS_MAC QAction *m_minimizeAction; QAction *m_zoomAction; #endif diff --git a/src/plugins/coreplugin/modemanager.cpp b/src/plugins/coreplugin/modemanager.cpp index f54a9378a6..d514aa0022 100644 --- a/src/plugins/coreplugin/modemanager.cpp +++ b/src/plugins/coreplugin/modemanager.cpp @@ -147,7 +147,7 @@ void ModeManager::objectAdded(QObject *obj) m_modeShortcuts.insert(index, cmd); connect(cmd, SIGNAL(keySequenceChanged()), this, SLOT(updateModeToolTip())); for (int i = 0; i < m_modeShortcuts.size(); ++i) { -#ifdef Q_OS_MAC +#ifdef Q_WS_MAC m_modeShortcuts.at(i)->setDefaultKeySequence(QKeySequence(QString("Meta+%1").arg(i+1))); #else m_modeShortcuts.at(i)->setDefaultKeySequence(QKeySequence(QString("Ctrl+%1").arg(i+1))); diff --git a/src/plugins/coreplugin/navigationwidget.cpp b/src/plugins/coreplugin/navigationwidget.cpp index 091d19c251..d93abca335 100644 --- a/src/plugins/coreplugin/navigationwidget.cpp +++ b/src/plugins/coreplugin/navigationwidget.cpp @@ -363,7 +363,7 @@ NavigationSubWidget::NavigationSubWidget(NavigationWidget *parentWidget) m_navigationComboBox = new NavComboBox(this); m_navigationWidget = 0; -#ifdef Q_OS_MAC +#ifdef Q_WS_MAC // this is to avoid ugly tool bar behavior m_navigationComboBox->setMaximumWidth(130); #endif diff --git a/src/plugins/coreplugin/outputpane.cpp b/src/plugins/coreplugin/outputpane.cpp index 685327c559..ba27f6771a 100644 --- a/src/plugins/coreplugin/outputpane.cpp +++ b/src/plugins/coreplugin/outputpane.cpp @@ -207,7 +207,7 @@ OutputPaneManager::OutputPaneManager(QWidget *parent) : m_buttonsWidget = new QWidget; m_buttonsWidget->setLayout(new QHBoxLayout); m_buttonsWidget->layout()->setContentsMargins(5,0,0,0); -#ifdef Q_OS_MAC +#ifdef Q_WS_MAC m_buttonsWidget->layout()->setSpacing(16); #else m_buttonsWidget->layout()->setSpacing(4); @@ -299,7 +299,7 @@ void OutputPaneManager::init() Command *cmd = am->registerAction(action, actionId, QList<int>() << Constants::C_GLOBAL_ID); if (outPane->priorityInStatusBar() != -1) { -#ifdef Q_OS_MAC +#ifdef Q_WS_MAC cmd->setDefaultKeySequence(QKeySequence(paneShortCut(Qt::CTRL, shortcutNumber))); #else cmd->setDefaultKeySequence(QKeySequence(paneShortCut(Qt::ALT, shortcutNumber))); @@ -567,7 +567,7 @@ OutputPaneToggleButton::OutputPaneToggleButton(int number, const QString &text, "QPushButton { border-image: url(:/core/images/panel_button.png) 2 2 2 19;" " border-width: 2px 2px 2px 19px; padding-left: -17; padding-right: 4 } " "QPushButton:checked { border-image: url(:/core/images/panel_button_checked.png) 2 2 2 19 } " -#ifndef Q_WS_MAC // Mac UI's dont usually do hover +#ifndef Q_WS_MAC // Mac UIs usually don't hover "QPushButton:checked:hover { border-image: url(:/core/images/panel_button_checked_hover.png) 2 2 2 19 } " "QPushButton:pressed:hover { border-image: url(:/core/images/panel_button_pressed.png) 2 2 2 19 } " "QPushButton:hover { border-image: url(:/core/images/panel_button_hover.png) 2 2 2 19 } " diff --git a/src/plugins/coreplugin/stylehelper.cpp b/src/plugins/coreplugin/stylehelper.cpp index b46f751e00..42ca012cf3 100644 --- a/src/plugins/coreplugin/stylehelper.cpp +++ b/src/plugins/coreplugin/stylehelper.cpp @@ -50,7 +50,7 @@ static int range(float x, int min, int max) qreal StyleHelper::sidebarFontSize() { -#if defined(Q_OS_MAC) +#if defined(Q_WS_MAC) return 9; #else return 7.5; diff --git a/src/plugins/cpaster/cpasterplugin.cpp b/src/plugins/cpaster/cpasterplugin.cpp index 6af357ca80..f407e1b100 100644 --- a/src/plugins/cpaster/cpasterplugin.cpp +++ b/src/plugins/cpaster/cpasterplugin.cpp @@ -100,7 +100,7 @@ bool CodepasterPlugin::initialize(const QStringList &arguments, QString *error_m m_postAction = new QAction(tr("Paste Snippet..."), this); command = actionManager->registerAction(m_postAction, "CodePaster.Post", globalcontext); -#ifndef Q_OS_MAC +#ifndef Q_WS_MAC command->setDefaultKeySequence(QKeySequence(tr("Alt+C,Alt+P"))); #endif connect(m_postAction, SIGNAL(triggered()), this, SLOT(post())); @@ -108,7 +108,7 @@ bool CodepasterPlugin::initialize(const QStringList &arguments, QString *error_m m_fetchAction = new QAction(tr("Fetch Snippet..."), this); command = actionManager->registerAction(m_fetchAction, "CodePaster.Fetch", globalcontext); -#ifndef Q_OS_MAC +#ifndef Q_WS_MAC command->setDefaultKeySequence(QKeySequence(tr("Alt+C,Alt+F"))); #endif connect(m_fetchAction, SIGNAL(triggered()), this, SLOT(fetch())); diff --git a/src/plugins/cpptools/cppcodecompletion.cpp b/src/plugins/cpptools/cppcodecompletion.cpp index 384058685b..d69d683f81 100644 --- a/src/plugins/cpptools/cppcodecompletion.cpp +++ b/src/plugins/cpptools/cppcodecompletion.cpp @@ -405,7 +405,7 @@ void FunctionArgumentWidget::updateHintText() m_popupFrame->setFixedWidth(m_popupFrame->minimumSizeHint().width()); const QDesktopWidget *desktop = QApplication::desktop(); -#ifdef Q_OS_MAC +#ifdef Q_WS_MAC const QRect screen = desktop->availableGeometry(desktop->screenNumber(m_editor->widget())); #else const QRect screen = desktop->screenGeometry(desktop->screenNumber(m_editor->widget())); diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp index d252b2482d..60db690d21 100644 --- a/src/plugins/debugger/debuggerplugin.cpp +++ b/src/plugins/debugger/debuggerplugin.cpp @@ -112,7 +112,7 @@ const char * const BREAK_BY_FUNCTION = "Debugger.BreakByFunction"; const char * const BREAK_AT_MAIN = "Debugger.BreakAtMain"; const char * const ADD_TO_WATCH = "Debugger.AddToWatch"; -#ifdef Q_OS_MAC +#ifdef Q_WS_MAC const char * const INTERRUPT_KEY = "Shift+F5"; const char * const RESET_KEY = "Ctrl+Shift+F5"; const char * const STEP_KEY = "F7"; @@ -1136,7 +1136,7 @@ void DebuggerPlugin::readSettings() DebuggerSettings::instance()->readSettings(s); QString defaultCommand("gdb"); -#if defined(Q_OS_WIN32) +#ifdef Q_OS_WIN defaultCommand.append(".exe"); #endif //QString defaultScript = ICore::instance()->resourcePath() + diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index 770586af68..9b0ae33cf8 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -72,7 +72,7 @@ # include "shared/sharedlibraryinjector.h" #endif -#if defined(Q_OS_LINUX) || defined(Q_OS_MAC) +#ifdef Q_OS_UNIX #include <unistd.h> #include <dlfcn.h> #endif @@ -826,12 +826,10 @@ void GdbEngine::handleInfoThreads(const GdbResultRecord &record, const QVariant void GdbEngine::handleInfoProc(const GdbResultRecord &record, const QVariant &) { if (record.resultClass == GdbResultDone) { - #if defined(Q_OS_MAC) + #ifdef Q_OS_MAC //^done,process-id="85075" maybeHandleInferiorPidChanged(_(record.data.findChild("process-id").data())); - #endif - - #if defined(Q_OS_LINUX) || defined(Q_OS_WIN) + #else // FIXME: use something more robust QRegExp re(__("process (\\d+)")); QString data = __(record.data.findChild("consolestreamoutput").data()); @@ -919,14 +917,12 @@ static bool isStoppedReason(const QByteArray &reason) void GdbEngine::handleAqcuiredInferior() { - #if defined(Q_OS_WIN) + #ifdef Q_OS_WIN postCommand(_("info thread"), CB(handleInfoThreads)); - #endif - #if defined(Q_OS_LINUX) - postCommand(_("info proc"), CB(handleInfoProc)); - #endif - #if defined(Q_OS_MAC) + #elif defined(Q_OS_MAC) postCommand(_("info pid"), NeedsStop, CB(handleInfoProc)); + #else + postCommand(_("info proc"), CB(handleInfoProc)); #endif if (theDebuggerBoolSetting(ListSourceFiles)) reloadSourceFiles(); @@ -1883,22 +1879,20 @@ void GdbEngine::sendInsertBreakpoint(int index) // set up fallback in case of pending breakpoints which aren't handled // by the MI interface -#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC) - QString cmd = _("-break-insert -f "); +#if defined(Q_OS_WIN) + QString cmd = _("-break-insert "); //if (!data->condition.isEmpty()) - // cmd += _("-c ") + data->condition + ' '; + // cmd += "-c " + data->condition + " "; cmd += where; -#endif -#if defined(Q_OS_MAC) +#elif defined(Q_OS_MAC) QString cmd = _("-break-insert -l -1 "); //if (!data->condition.isEmpty()) // cmd += "-c " + data->condition + " "; cmd += where; -#endif -#if defined(Q_OS_WIN) - QString cmd = _("-break-insert "); +#else + QString cmd = _("-break-insert -f "); //if (!data->condition.isEmpty()) - // cmd += "-c " + data->condition + " "; + // cmd += _("-c ") + data->condition + ' '; cmd += where; #endif debugMessage(_("Current state: %1").arg(q->status())); @@ -2039,24 +2033,22 @@ void GdbEngine::handleBreakInsert(const GdbResultRecord &record, const QVariant const BreakpointData *data = handler->at(index); // Note that it is perfectly correct that the file name is put // in quotes but not escaped. GDB simply is like that. -#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC) - //QString where = "\"\\\"" + data->fileName + "\\\":" - // + data->lineNumber + "\""; - QString where = _c('"') + data->fileName + _("\":") - + data->lineNumber; - // Should not happen with -break-insert -f. gdb older than 6.8? - QTC_ASSERT(false, /**/); -#endif -#if defined(Q_OS_MAC) +#if defined(Q_OS_WIN) QFileInfo fi(data->fileName); QString where = _c('"') + fi.fileName() + _("\":") + data->lineNumber; -#endif -#if defined(Q_OS_WIN) + //QString where = m_data->fileName + _c(':') + data->lineNumber; +#elif defined(Q_OS_MAC) QFileInfo fi(data->fileName); QString where = _c('"') + fi.fileName() + _("\":") + data->lineNumber; - //QString where = m_data->fileName + _c(':') + data->lineNumber; +#else + //QString where = "\"\\\"" + data->fileName + "\\\":" + // + data->lineNumber + "\""; + QString where = _c('"') + data->fileName + _("\":") + + data->lineNumber; + // Should not happen with -break-insert -f. gdb older than 6.8? + QTC_ASSERT(false, /**/); #endif postCommand(_("break ") + where, CB(handleBreakInsert1), index); } diff --git a/src/plugins/debugger/stackwindow.cpp b/src/plugins/debugger/stackwindow.cpp index e51c27ac6d..9354dda806 100644 --- a/src/plugins/debugger/stackwindow.cpp +++ b/src/plugins/debugger/stackwindow.cpp @@ -133,7 +133,7 @@ void StackWindow::copyContentsToClipboard() str += '\n'; } QClipboard *clipboard = QApplication::clipboard(); - #ifdef Q_OS_LINUX + #ifdef Q_WS_X11 clipboard->setText(str, QClipboard::Selection); #endif clipboard->setText(str, QClipboard::Clipboard); diff --git a/src/plugins/find/findtoolbar.cpp b/src/plugins/find/findtoolbar.cpp index 313d229ceb..2dff2fdc37 100644 --- a/src/plugins/find/findtoolbar.cpp +++ b/src/plugins/find/findtoolbar.cpp @@ -240,7 +240,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_OS_MAC +#ifdef Q_WS_MAC if (ke->key() == Qt::Key_Space && (ke->modifiers() & Qt::MetaModifier)) { #else if (ke->key() == Qt::Key_Space && (ke->modifiers() & Qt::ControlModifier)) { @@ -261,7 +261,7 @@ bool FindToolBar::eventFilter(QObject *obj, QEvent *event) event->accept(); return true; } -#ifdef Q_OS_MAC +#ifdef Q_WS_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/git/gitplugin.cpp b/src/plugins/git/gitplugin.cpp index 4f240a21fe..ac3cfb2d2d 100644 --- a/src/plugins/git/gitplugin.cpp +++ b/src/plugins/git/gitplugin.cpp @@ -279,7 +279,7 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage) m_diffAction = new Core::Utils::ParameterAction(tr("Diff Current File"), tr("Diff \"%1\""), Core::Utils::ParameterAction::AlwaysEnabled, this); command = actionManager->registerAction(m_diffAction, "Git.Diff", globalcontext); command->setAttribute(Core::Command::CA_UpdateText); -#ifndef Q_OS_MAC +#ifndef Q_WS_MAC command->setDefaultKeySequence(QKeySequence(tr("Alt+G,Alt+D"))); #endif connect(m_diffAction, SIGNAL(triggered()), this, SLOT(diffCurrentFile())); @@ -287,7 +287,7 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage) m_statusAction = new Core::Utils::ParameterAction(tr("File Status"), tr("Status Related to \"%1\""), Core::Utils::ParameterAction::AlwaysEnabled, this); command = actionManager->registerAction(m_statusAction, "Git.Status", globalcontext); -#ifndef Q_OS_MAC +#ifndef Q_WS_MAC command->setDefaultKeySequence(QKeySequence(tr("Alt+G,Alt+S"))); #endif command->setAttribute(Core::Command::CA_UpdateText); @@ -296,7 +296,7 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage) m_logAction = new Core::Utils::ParameterAction(tr("Log File"), tr("Log of \"%1\""), Core::Utils::ParameterAction::AlwaysEnabled, this); command = actionManager->registerAction(m_logAction, "Git.Log", globalcontext); -#ifndef Q_OS_MAC +#ifndef Q_WS_MAC command->setDefaultKeySequence(QKeySequence(tr("Alt+G,Alt+L"))); #endif command->setAttribute(Core::Command::CA_UpdateText); @@ -305,7 +305,7 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage) m_blameAction = new Core::Utils::ParameterAction(tr("Blame"), tr("Blame for \"%1\""), Core::Utils::ParameterAction::AlwaysEnabled, this); command = actionManager->registerAction(m_blameAction, "Git.Blame", globalcontext); -#ifndef Q_OS_MAC +#ifndef Q_WS_MAC command->setDefaultKeySequence(QKeySequence(tr("Alt+G,Alt+B"))); #endif command->setAttribute(Core::Command::CA_UpdateText); @@ -314,7 +314,7 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage) m_undoFileAction = new Core::Utils::ParameterAction(tr("Undo Changes"), tr("Undo Changes for \"%1\""), Core::Utils::ParameterAction::AlwaysEnabled, this); command = actionManager->registerAction(m_undoFileAction, "Git.Undo", globalcontext); -#ifndef Q_OS_MAC +#ifndef Q_WS_MAC command->setDefaultKeySequence(QKeySequence(tr("Alt+G,Alt+U"))); #endif command->setAttribute(Core::Command::CA_UpdateText); @@ -323,7 +323,7 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage) m_stageAction = new Core::Utils::ParameterAction(tr("Stage File for Commit"), tr("Stage \"%1\" for Commit"), Core::Utils::ParameterAction::AlwaysEnabled, this); command = actionManager->registerAction(m_stageAction, "Git.Stage", globalcontext); -#ifndef Q_OS_MAC +#ifndef Q_WS_MAC command->setDefaultKeySequence(QKeySequence(tr("Alt+G,Alt+A"))); #endif command->setAttribute(Core::Command::CA_UpdateText); @@ -346,7 +346,7 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage) m_diffProjectAction = new Core::Utils::ParameterAction(tr("Diff Current Project"), tr("Diff Project \"%1\""), Core::Utils::ParameterAction::AlwaysEnabled, this); command = actionManager->registerAction(m_diffProjectAction, "Git.DiffProject", globalcontext); -#ifndef Q_OS_MAC +#ifndef Q_WS_MAC command->setDefaultKeySequence(QKeySequence("Alt+G,Alt+Shift+D")); #endif command->setAttribute(Core::Command::CA_UpdateText); @@ -361,7 +361,7 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage) m_logProjectAction = new Core::Utils::ParameterAction(tr("Log Project"), tr("Log Project \"%1\""), Core::Utils::ParameterAction::AlwaysEnabled, this); command = actionManager->registerAction(m_logProjectAction, "Git.LogProject", globalcontext); -#ifndef Q_OS_MAC +#ifndef Q_WS_MAC command->setDefaultKeySequence(QKeySequence(tr("Alt+G,Alt+K"))); #endif command->setAttribute(Core::Command::CA_UpdateText); @@ -398,7 +398,7 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage) m_commitAction = new QAction(tr("Commit..."), this); command = actionManager->registerAction(m_commitAction, "Git.Commit", globalcontext); -#ifndef Q_OS_MAC +#ifndef Q_WS_MAC command->setDefaultKeySequence(QKeySequence(tr("Alt+G,Alt+C"))); #endif command->setAttribute(Core::Command::CA_UpdateText); diff --git a/src/plugins/help/centralwidget.cpp b/src/plugins/help/centralwidget.cpp index a53a67564a..72574102f9 100644 --- a/src/plugins/help/centralwidget.cpp +++ b/src/plugins/help/centralwidget.cpp @@ -85,10 +85,10 @@ CentralWidget::CentralWidget(QHelpEngine *engine, QWidget *parent) globalActionList.clear(); collectionFile = helpEngine->collectionFile(); - QString system = QLatin1String("win"); - #ifdef Q_OS_MAC - system = QLatin1String("mac"); +# define SYSTEM "mac" +#else +# define SYSTEM "win" #endif tabWidget = new QTabWidget; @@ -100,7 +100,7 @@ CentralWidget::CentralWidget(QHelpEngine *engine, QWidget *parent) QToolButton *newTabButton = new QToolButton(this); newTabButton->setAutoRaise(true); newTabButton->setToolTip(tr("Add new page")); - newTabButton->setIcon(QIcon(QString::fromUtf8(":/trolltech/assistant/images/%1/addtab.png").arg(system))); + newTabButton->setIcon(QIcon(QString::fromLatin1(":/trolltech/assistant/images/" SYSTEM "/addtab.png"))); tabWidget->setCornerWidget(newTabButton, Qt::TopLeftCorner); connect(newTabButton, SIGNAL(clicked()), this, SLOT(newTab())); diff --git a/src/plugins/help/helpplugin.cpp b/src/plugins/help/helpplugin.cpp index 661723464c..f5287afbd6 100644 --- a/src/plugins/help/helpplugin.cpp +++ b/src/plugins/help/helpplugin.cpp @@ -241,7 +241,7 @@ bool HelpPlugin::initialize(const QStringList &arguments, QString *error) am->actionContainer(Core::Constants::M_HELP)->addAction(cmd, Core::Constants::G_HELP_HELP); -#ifndef Q_OS_MAC +#ifndef Q_WS_MAC QAction *sep = new QAction(this); sep->setSeparator(true); cmd = am->registerAction(sep, QLatin1String("Help.Separator"), globalcontext); @@ -344,7 +344,7 @@ bool HelpPlugin::initialize(const QStringList &arguments, QString *error) actionList << previousAction << nextAction << homeAction -#ifndef Q_OS_MAC +#ifndef Q_WS_MAC << sep #endif << copyAction; diff --git a/src/plugins/projectexplorer/debugginghelper.cpp b/src/plugins/projectexplorer/debugginghelper.cpp index da5fefc512..b403872f5b 100644 --- a/src/plugins/projectexplorer/debugginghelper.cpp +++ b/src/plugins/projectexplorer/debugginghelper.cpp @@ -215,10 +215,11 @@ QStringList DebuggingHelperLibrary::possibleQMakeCommands() // On windows noone has renamed qmake, right? #ifdef Q_OS_WIN return QStringList() << "qmake.exe"; -#endif +#else // On unix some distributions renamed qmake to avoid clashes QStringList result; result << "qmake-qt4" << "qmake4" << "qmake"; return result; +#endif } diff --git a/src/plugins/projectexplorer/projecttreewidget.cpp b/src/plugins/projectexplorer/projecttreewidget.cpp index 32b6ca9edf..8054fa0f8d 100644 --- a/src/plugins/projectexplorer/projecttreewidget.cpp +++ b/src/plugins/projectexplorer/projecttreewidget.cpp @@ -90,7 +90,7 @@ protected: QTreeView::focusOutEvent(event); } -#ifdef Q_OS_MAC +#ifdef Q_WS_MAC void keyPressEvent(QKeyEvent *event) { if ((event->key() == Qt::Key_Return diff --git a/src/plugins/qt4projectmanager/qmakestep.cpp b/src/plugins/qt4projectmanager/qmakestep.cpp index 3b0049ec40..071d30a5ce 100644 --- a/src/plugins/qt4projectmanager/qmakestep.cpp +++ b/src/plugins/qt4projectmanager/qmakestep.cpp @@ -103,7 +103,7 @@ bool QMakeStep::init(const QString &name) if (!qtVersion->isValid()) { -#if defined(Q_OS_MAC) +#if defined(Q_WS_MAC) emit addToOutputWindow(tr("\n<font color=\"#ff0000\"><b>No valid Qt version set. Set one in Preferences </b></font>\n")); #else emit addToOutputWindow(tr("\n<font color=\"#ff0000\"><b>No valid Qt version set. Set one in Tools/Options </b></font>\n")); diff --git a/src/plugins/qt4projectmanager/qtversionmanager.cpp b/src/plugins/qt4projectmanager/qtversionmanager.cpp index 761e70612f..ea64f2da18 100644 --- a/src/plugins/qt4projectmanager/qtversionmanager.cpp +++ b/src/plugins/qt4projectmanager/qtversionmanager.cpp @@ -937,8 +937,7 @@ static inline QStringList possibleGuiBinaries(const QString &name) { #ifdef Q_OS_WIN return QStringList(name + QLatin1String(".exe")); -#endif -#ifdef Q_OS_MAC // 'Foo.app/Contents/MacOS/Foo' +#elif defined(Q_OS_MAC) // 'Foo.app/Contents/MacOS/Foo' QString upCaseName = name; upCaseName[0] = upCaseName.at(0).toUpper(); QString macBinary = upCaseName; diff --git a/src/plugins/subversion/subversionplugin.cpp b/src/plugins/subversion/subversionplugin.cpp index 532beecdf4..af0e674c1b 100644 --- a/src/plugins/subversion/subversionplugin.cpp +++ b/src/plugins/subversion/subversionplugin.cpp @@ -336,7 +336,7 @@ bool SubversionPlugin::initialize(const QStringList &arguments, QString *errorMe command = ami->registerAction(m_addAction, SubversionPlugin::ADD, globalcontext); command->setAttribute(Core::Command::CA_UpdateText); -#ifndef Q_OS_MAC +#ifndef Q_WS_MAC command->setDefaultKeySequence(QKeySequence(tr("Alt+S,Alt+A"))); #endif connect(m_addAction, SIGNAL(triggered()), this, SLOT(addCurrentFile())); @@ -368,7 +368,7 @@ bool SubversionPlugin::initialize(const QStringList &arguments, QString *errorMe command = ami->registerAction(m_diffCurrentAction, SubversionPlugin::DIFF_CURRENT, globalcontext); command->setAttribute(Core::Command::CA_UpdateText); -#ifndef Q_OS_MAC +#ifndef Q_WS_MAC command->setDefaultKeySequence(QKeySequence(tr("Alt+S,Alt+D"))); #endif connect(m_diffCurrentAction, SIGNAL(triggered()), this, SLOT(diffCurrentFile())); @@ -386,7 +386,7 @@ bool SubversionPlugin::initialize(const QStringList &arguments, QString *errorMe command = ami->registerAction(m_commitCurrentAction, SubversionPlugin::COMMIT_CURRENT, globalcontext); command->setAttribute(Core::Command::CA_UpdateText); -#ifndef Q_OS_MAC +#ifndef Q_WS_MAC command->setDefaultKeySequence(QKeySequence(tr("Alt+S,Alt+C"))); #endif connect(m_commitCurrentAction, SIGNAL(triggered()), this, SLOT(startCommitCurrentFile())); diff --git a/src/plugins/texteditor/basetexteditor.cpp b/src/plugins/texteditor/basetexteditor.cpp index 44ab1dab1f..5448be6d4a 100644 --- a/src/plugins/texteditor/basetexteditor.cpp +++ b/src/plugins/texteditor/basetexteditor.cpp @@ -956,7 +956,7 @@ void BaseTextEditor::keyPressEvent(QKeyEvent *e) case Qt::Key_End: case Qt::Key_Right: case Qt::Key_Left: -#ifndef Q_OS_MAC +#ifndef Q_WS_MAC if ((e->modifiers() & (Qt::AltModifier | Qt::ShiftModifier)) == (Qt::AltModifier | Qt::ShiftModifier)) { d->m_lastEventWasBlockSelectionEvent = true; diff --git a/src/plugins/texteditor/completionwidget.cpp b/src/plugins/texteditor/completionwidget.cpp index 8806fd3d6d..a7d0c23129 100644 --- a/src/plugins/texteditor/completionwidget.cpp +++ b/src/plugins/texteditor/completionwidget.cpp @@ -255,7 +255,7 @@ void CompletionWidget::updatePositionAndSize(int startPos) // Determine the position, keeping the popup on the screen const QRect cursorRect = m_editor->cursorRect(startPos); const QDesktopWidget *desktop = QApplication::desktop(); -#ifdef Q_OS_MAC +#ifdef Q_WS_MAC const QRect screen = desktop->availableGeometry(desktop->screenNumber(m_editorWidget)); #else const QRect screen = desktop->screenGeometry(desktop->screenNumber(m_editorWidget)); diff --git a/src/plugins/texteditor/fontsettings.cpp b/src/plugins/texteditor/fontsettings.cpp index 37907a345e..441a7a6711 100644 --- a/src/plugins/texteditor/fontsettings.cpp +++ b/src/plugins/texteditor/fontsettings.cpp @@ -48,7 +48,7 @@ static const bool DEFAULT_ANTIALIAS = true; enum { DEFAULT_FONT_SIZE = 12 }; static const char *DEFAULT_FONT_FAMILY = "Monaco"; #else -#ifdef Q_OS_UNIX +#ifdef Q_WS_X11 enum { DEFAULT_FONT_SIZE = 9 }; static const char *DEFAULT_FONT_FAMILY = "Monospace"; #else diff --git a/src/plugins/texteditor/texteditoractionhandler.cpp b/src/plugins/texteditor/texteditoractionhandler.cpp index 44220bfdb9..d8bd9e098e 100644 --- a/src/plugins/texteditor/texteditoractionhandler.cpp +++ b/src/plugins/texteditor/texteditoractionhandler.cpp @@ -146,7 +146,7 @@ void TextEditorActionHandler::createActions() m_visualizeWhitespaceAction->setCheckable(true); command = am->registerAction(m_visualizeWhitespaceAction, TextEditor::Constants::VISUALIZE_WHITESPACE, m_contextId); -#ifndef Q_OS_MAC +#ifndef Q_WS_MAC command->setDefaultKeySequence(QKeySequence(tr("Ctrl+E, Ctrl+V"))); #endif advancedMenu->addAction(command, Core::Constants::G_EDIT_FORMAT); @@ -162,7 +162,7 @@ void TextEditorActionHandler::createActions() m_textWrappingAction = new QAction(tr("Enable Text &Wrapping"), this); m_textWrappingAction->setCheckable(true); command = am->registerAction(m_textWrappingAction, TextEditor::Constants::TEXT_WRAPPING, m_contextId); -#ifndef Q_OS_MAC +#ifndef Q_WS_MAC command->setDefaultKeySequence(QKeySequence(tr("Ctrl+E, Ctrl+W"))); #endif advancedMenu->addAction(command, Core::Constants::G_EDIT_FORMAT); diff --git a/src/plugins/texteditor/texteditorplugin.cpp b/src/plugins/texteditor/texteditorplugin.cpp index 049d3a3978..b6bf55025b 100644 --- a/src/plugins/texteditor/texteditorplugin.cpp +++ b/src/plugins/texteditor/texteditorplugin.cpp @@ -124,7 +124,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_OS_MAC +#ifndef Q_WS_MAC command->setDefaultKeySequence(QKeySequence(tr("Ctrl+Space"))); #else command->setDefaultKeySequence(QKeySequence(tr("Meta+Space"))); diff --git a/src/shared/help/bookmarkmanager.cpp b/src/shared/help/bookmarkmanager.cpp index 7052495fce..96c8643765 100644 --- a/src/shared/help/bookmarkmanager.cpp +++ b/src/shared/help/bookmarkmanager.cpp @@ -436,9 +436,10 @@ void BookmarkWidget::setup(bool showButtons) treeView = new TreeView(this); vlayout->addWidget(treeView); - QString system = QLatin1String("win"); #ifdef Q_OS_MAC - system = QLatin1String("mac"); +# define SYSTEM "mac" +#else +# define SYSTEM "win" #endif if (showButtons) { @@ -449,8 +450,8 @@ void BookmarkWidget::setup(bool showButtons) addButton = new QToolButton(this); addButton->setText(tr("Add")); - addButton->setIcon(QIcon(QString::fromUtf8( - ":/trolltech/assistant/images/%1/addtab.png").arg(system))); + addButton->setIcon(QIcon(QString::fromLatin1( + ":/trolltech/assistant/images/" SYSTEM "/addtab.png"))); addButton->setAutoRaise(true); addButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); hlayout->addWidget(addButton); @@ -458,8 +459,8 @@ void BookmarkWidget::setup(bool showButtons) removeButton = new QToolButton(this); removeButton->setText(tr("Remove")); - removeButton->setIcon(QIcon(QString::fromUtf8( - ":/trolltech/assistant/images/%1/closetab.png").arg(system))); + removeButton->setIcon(QIcon(QString::fromLatin1( + ":/trolltech/assistant/images/" SYSTEM "/closetab.png"))); removeButton->setAutoRaise(true); removeButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); hlayout->addWidget(removeButton); diff --git a/src/shared/help/indexwindow.cpp b/src/shared/help/indexwindow.cpp index 1b79ed00ae..8ae9f4e0a9 100644 --- a/src/shared/help/indexwindow.cpp +++ b/src/shared/help/indexwindow.cpp @@ -140,7 +140,7 @@ bool IndexWindow::eventFilter(QObject *obj, QEvent *e) } } } -#ifdef Q_OS_MAC +#ifdef Q_WS_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) diff --git a/src/shared/proparser/profileevaluator.cpp b/src/shared/proparser/profileevaluator.cpp index 0a352e2b0b..6f6d6c7bbc 100644 --- a/src/shared/proparser/profileevaluator.cpp +++ b/src/shared/proparser/profileevaluator.cpp @@ -48,7 +48,7 @@ #ifdef Q_OS_UNIX #include <unistd.h> #include <sys/utsname.h> -#elif defined(Q_OS_WIN32) +#else #include <Windows.h> #endif #include <stdio.h> diff --git a/src/shared/qtlockedfile/qtlockedfile.h b/src/shared/qtlockedfile/qtlockedfile.h index b4a5cbd063..49e26735dc 100644 --- a/src/shared/qtlockedfile/qtlockedfile.h +++ b/src/shared/qtlockedfile/qtlockedfile.h @@ -32,7 +32,7 @@ #include <QtCore/QFile> -#if defined(Q_WS_WIN) +#if defined(Q_OS_WIN) # if !defined(QT_QTLOCKEDFILE_EXPORT) && !defined(QT_QTLOCKEDFILE_IMPORT) # define QT_QTLOCKEDFILE_EXPORT # elif defined(QT_QTLOCKEDFILE_IMPORT) |