Commit 4cd725ff authored by René J.V. Bertin's avatar René J.V. Bertin

use the proper Mac platform token

parent 92323132
......@@ -44,11 +44,11 @@
#include <KSharedConfig>
#include <KUser>
#if defined(Q_OS_FREEBSD) || defined(Q_OS_OPENBSD) || defined(Q_OS_OSX)
#if defined(Q_OS_FREEBSD) || defined(Q_OS_OPENBSD) || defined(Q_OS_MACOS)
#include <sys/sysctl.h>
#endif
#if defined(Q_OS_OSX)
#if defined(Q_OS_MACOS)
#include <libproc.h>
#include <qplatformdefs.h>
#endif
......@@ -787,7 +787,7 @@ private:
}
};
#elif defined(Q_OS_OSX)
#elif defined(Q_OS_MACOS)
class MacProcessInfo : public UnixProcessInfo
{
public:
......@@ -1106,7 +1106,7 @@ ProcessInfo* ProcessInfo::newInstance(int aPid, const QString& titleFormat)
info = new LinuxProcessInfo(aPid, titleFormat);
#elif defined(Q_OS_SOLARIS)
info = new SolarisProcessInfo(aPid, titleFormat);
#elif defined(Q_OS_OSX)
#elif defined(Q_OS_MACOS)
info = new MacProcessInfo(aPid, titleFormat);
#elif defined(Q_OS_FREEBSD)
info = new FreeBSDProcessInfo(aPid, titleFormat);
......
......@@ -541,7 +541,7 @@ void SessionController::setupCommonActions()
// Copy and Paste
action = KStandardAction::copy(this, SLOT(copy()), collection);
#ifdef Q_OS_OSX
#ifdef Q_OS_MACOS
// Don't use the Konsole::ACCEL const here, we really want the Command key (Qt::META)
// TODO: check what happens if we leave it to Qt to assign the default?
collection->setDefaultShortcut(action, Qt::META + Qt::Key_C);
......@@ -553,7 +553,7 @@ void SessionController::setupCommonActions()
action = KStandardAction::paste(this, SLOT(paste()), collection);
QList<QKeySequence> pasteShortcut;
#ifdef Q_OS_OSX
#ifdef Q_OS_MACOS
pasteShortcut.append(QKeySequence(Qt::META + Qt::Key_V));
// No Insert key on Mac keyboards
#else
......@@ -564,7 +564,7 @@ void SessionController::setupCommonActions()
action = collection->addAction(QStringLiteral("paste-selection"), this, SLOT(pasteFromX11Selection()));
action->setText(i18n("Paste Selection"));
#ifdef Q_OS_OSX
#ifdef Q_OS_MACOS
collection->setDefaultShortcut(action, Qt::META + Qt::SHIFT + Qt::Key_V);
#else
collection->setDefaultShortcut(action, Konsole::ACCEL + Qt::SHIFT + Qt::Key_Insert);
......@@ -585,7 +585,7 @@ void SessionController::setupCommonActions()
action = KStandardAction::saveAs(this, SLOT(saveHistory()), collection);
action->setText(i18n("Save Output &As..."));
#ifdef Q_OS_OSX
#ifdef Q_OS_MACOS
action->setShortcut(QKeySequence(Qt::META + Qt::Key_S));
#endif
......@@ -752,7 +752,7 @@ void SessionController::setupExtraActions()
action->setData(SIGUSR2);
sendSignalActions->addAction(action);
#ifdef Q_OS_OSX
#ifdef Q_OS_MACOS
collection->setDefaultShortcut(_findAction, Qt::META + Qt::Key_F);
collection->setDefaultShortcut(_findNextAction, Qt::META + Qt::Key_G);
collection->setDefaultShortcut(_findPreviousAction, Qt::META + Qt::SHIFT + Qt::Key_G);
......
......@@ -29,7 +29,7 @@ namespace Konsole {
* Platform-specific main shortcut "opcode":
*/
enum Modifier {
#ifdef Q_OS_OSX
#ifdef Q_OS_MACOS
ACCEL = Qt::META
#else
ACCEL = Qt::CTRL
......
......@@ -730,7 +730,7 @@ void TerminalDisplay::drawBackground(QPainter& painter, const QRect& rect, const
if (useOpacitySetting && !_wallpaper->isNull() &&
_wallpaper->draw(painter, contentsRect, _opacity)) {
} else if (qAlpha(_blendColor) < 0xff && useOpacitySetting) {
#if defined(Q_OS_OSX)
#if defined(Q_OS_MACOS)
// TODO - On MacOS, using CompositionMode doesn't work. Altering the
// transparency in the color scheme alters the brightness.
painter.fillRect(contentsRect, backgroundColor);
......
......@@ -257,7 +257,7 @@ void ViewManager::setupActions()
connect(nextContainerAction, &QAction::triggered, this, &Konsole::ViewManager::nextContainer);
_viewSplitter->addAction(nextContainerAction);
#ifdef Q_OS_OSX
#ifdef Q_OS_MACOS
collection->setDefaultShortcut(moveViewLeftAction,
Konsole::ACCEL + Qt::SHIFT + Qt::Key_BracketLeft);
#else
......@@ -267,7 +267,7 @@ void ViewManager::setupActions()
&Konsole::ViewManager::moveActiveViewLeft);
_viewSplitter->addAction(moveViewLeftAction);
#ifdef Q_OS_OSX
#ifdef Q_OS_MACOS
collection->setDefaultShortcut(moveViewRightAction,
Konsole::ACCEL + Qt::SHIFT + Qt::Key_BracketRight);
#else
......
......@@ -80,7 +80,7 @@ extern "C" int Q_DECL_EXPORT kdemain(int argc, char *argv[])
// enable high dpi support
app->setAttribute(Qt::AA_UseHighDpiPixmaps, true);
#if defined(Q_OS_OSX)
#if defined(Q_OS_MACOS)
// this ensures that Ctrl and Meta are not swapped, so CTRL-C and friends
// will work correctly in the terminal
app->setAttribute(Qt::AA_MacDontSwapCtrlAndMeta);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment