[rkward/work/frameworks-Mac] rkward: update the Qt platform detection token
R.J.V. Bertin
null at kde.org
Wed May 17 19:42:55 UTC 2017
Git commit f2397dbfab92f51a1948e6f3132c370184d6d292 by R.J.V. Bertin.
Committed on 17/05/2017 at 19:40.
Pushed by rjvbb into branch 'work/frameworks-Mac'.
update the Qt platform detection token
M +1 -1 rkward/rbackend/rklocalesupport.cpp
M +1 -1 rkward/rbackend/rksessionvars.cpp
M +1 -1 rkward/rkconsole.cpp
M +2 -2 rkward/settings/rksettingsmodulegraphics.cpp
M +4 -4 rkward/settings/rksettingsmoduler.cpp
M +1 -1 rkward/windows/rktoolwindowlist.cpp
M +1 -1 rkward/windows/rkwindowcatcher.cpp
https://commits.kde.org/rkward/f2397dbfab92f51a1948e6f3132c370184d6d292
diff --git a/rkward/rbackend/rklocalesupport.cpp b/rkward/rbackend/rklocalesupport.cpp
index 49a6d268..7e26277f 100644
--- a/rkward/rbackend/rklocalesupport.cpp
+++ b/rkward/rbackend/rklocalesupport.cpp
@@ -152,7 +152,7 @@ QTextCodec *RKGetCurrentLocaleCodec () {
localeMapper = QTextCodec::codecForName( "System" );
#else
-#if defined (_XOPEN_UNIX) && !defined(Q_OS_QNX6) && !defined(Q_OS_OSF) && !defined(Q_OS_MAC)
+#if defined (_XOPEN_UNIX) && !defined(Q_OS_QNX6) && !defined(Q_OS_OSF) && !defined(Q_OS_MACOS)
char *charset = nl_langinfo (CODESET);
if ( charset )
localeMapper = QTextCodec::codecForName( charset );
diff --git a/rkward/rbackend/rksessionvars.cpp b/rkward/rbackend/rksessionvars.cpp
index e64eb101..507e4131 100644
--- a/rkward/rbackend/rksessionvars.cpp
+++ b/rkward/rbackend/rksessionvars.cpp
@@ -127,7 +127,7 @@ QStringList RKSessionVars::frontendSessionInfo () {
lines.append (QString ("Qt version (runtime): ") + qVersion ());
#if defined Q_OS_WIN
lines.append ("Windows runtime version (refer to QSysInfo documentation to translate code into human readable form): 0x" + QString::number (QSysInfo::windowsVersion (), 16));
-#elif defined Q_OS_MAC
+#elif defined Q_OS_MACOS
lines.append ("MacOS runtime version (refer to QSysInfo documentation to translate code into human readable form): 0x" + QString::number (QSysInfo::MacintoshVersion, 16));
#endif
lines.append ("Local config directory: " + QStandardPaths::writableLocation (QStandardPaths::GenericConfigLocation));
diff --git a/rkward/rkconsole.cpp b/rkward/rkconsole.cpp
index 17d3de62..5d0d6b7f 100644
--- a/rkward/rkconsole.cpp
+++ b/rkward/rkconsole.cpp
@@ -957,7 +957,7 @@ void RKConsole::currentHelpContext (QString* symbol, QString* package) {
void RKConsole::initializeActions (KActionCollection *ac) {
RK_TRACE (APP);
-#ifdef Q_OS_MAC
+#ifdef Q_OS_MACOS
# define REAL_CTRL_KEY Qt::MetaModifier
# define REAL_CMD_KEY Qt::ControlModifier
#else
diff --git a/rkward/settings/rksettingsmodulegraphics.cpp b/rkward/settings/rksettingsmodulegraphics.cpp
index cacee0d7..ef50777e 100644
--- a/rkward/settings/rksettingsmodulegraphics.cpp
+++ b/rkward/settings/rksettingsmodulegraphics.cpp
@@ -90,7 +90,7 @@ RKSettingsModuleGraphics::RKSettingsModuleGraphics (RKSettings *gui, QWidget *pa
button = new QRadioButton (i18n ("Embed original device"), group);
replace_standard_devices_group->addButton (button, (int) EmbedDevice);
group_layout->addWidget (button);
-#ifndef Q_OS_MAC
+#ifndef Q_OS_MACOS
button->setEnabled (false);
#endif
button = new QRadioButton (i18n ("No device integration"), group);
@@ -253,7 +253,7 @@ QStringList RKSettingsModuleGraphics::makeRRunTimeOptionCommands () {
else {
#if defined Q_OS_WIN
command.append ("\"windows\"");
-#elif defined Q_OS_MAC
+#elif defined Q_OS_MACOS
command.append ("ifelse (capabilities(\"quartz\"), \"quartz\", \"X11\")");
#else
command.append ("\"X11\"");
diff --git a/rkward/settings/rksettingsmoduler.cpp b/rkward/settings/rksettingsmoduler.cpp
index cb819495..a4bb993d 100644
--- a/rkward/settings/rksettingsmoduler.cpp
+++ b/rkward/settings/rksettingsmoduler.cpp
@@ -392,7 +392,7 @@ RKSettingsModuleRPackages::RKSettingsModuleRPackages (RKSettings *gui, QWidget *
connect (archive_packages_box, &QCheckBox::stateChanged, this, &RKSettingsModuleRPackages::settingChanged);
main_vbox->addWidget (archive_packages_box);
-#if defined Q_OS_WIN || defined Q_OS_MAC
+#if defined Q_OS_WIN || defined Q_OS_MACOS
source_packages_box = new QCheckBox (i18n ("Build packages from source"), this);
source_packages_box->setChecked (source_packages);
#else
@@ -512,7 +512,7 @@ QString RKSettingsModuleRPackages::libLocsCommand () {
//static
QString RKSettingsModuleRPackages::pkgTypeOption () {
QString ret;
-#if defined Q_OS_WIN || defined Q_OS_MAC
+#if defined Q_OS_WIN || defined Q_OS_MACOS
ret.append ("options (pkgType=\"");
if (source_packages) ret.append ("source");
else if (RKSessionVars::compareRVersion ("3.1.3") <= 0) ret.append ("binary"); // "automatically select appropriate binary", unfortunately it's only available from R 3.1.3. onwards.
@@ -543,7 +543,7 @@ QStringList RKSettingsModuleRPackages::makeRRunTimeOptionCommands () {
}
list.append (command + "))\n");
-#if defined Q_OS_WIN || defined Q_OS_MAC
+#if defined Q_OS_WIN || defined Q_OS_MACOS
list.append (pkgTypeOption ());
#endif
@@ -606,7 +606,7 @@ void RKSettingsModuleRPackages::loadSettings (KConfig *config) {
liblocs = cg.readEntry ("LibraryLocations", QStringList ());
archive_packages = cg.readEntry ("archive packages", false);
-#if defined Q_OS_WIN || defined Q_OS_MAC
+#if defined Q_OS_WIN || defined Q_OS_MACOS
# if defined USE_BINARY_PACKAGES
# define USE_SOURCE_PACKAGES false
# else
diff --git a/rkward/windows/rktoolwindowlist.cpp b/rkward/windows/rktoolwindowlist.cpp
index 23a9bf34..8945e7c9 100644
--- a/rkward/windows/rktoolwindowlist.cpp
+++ b/rkward/windows/rktoolwindowlist.cpp
@@ -35,7 +35,7 @@ void RKToolWindowList::registerToolWindow (RKMDIWindow *window, const QString &i
tr.window = window;
tr.id = id;
tr.default_placement = default_placement;
-#ifdef Q_OS_MAC
+#ifdef Q_OS_MACOS
// HACK: Workaround for shortcut conflict issue: https://mail.kde.org/pipermail/rkward-devel/2011-December/003153.html
if (default_shortcut & Qt::AltModifier) default_shortcut |= Qt::ControlModifier;
#endif
diff --git a/rkward/windows/rkwindowcatcher.cpp b/rkward/windows/rkwindowcatcher.cpp
index 293c4d9a..9920016d 100644
--- a/rkward/windows/rkwindowcatcher.cpp
+++ b/rkward/windows/rkwindowcatcher.cpp
@@ -129,7 +129,7 @@ void RKWindowCatcher::stop (int new_cur_device) {
QWindow *window = QWindow::fromWinId (created_window);
RKWorkplace::mainWorkplace ()->newX11Window (window, new_cur_device);
} else {
-#if defined Q_OS_MAC
+#if defined Q_OS_MACOS
KMessageBox::information (0, i18n ("You have tried to embed a new R graphics device window in RKWard. However, this is not currently supported in this build of RKWard on Mac OS X. See http://rkward.kde.org/mac for more information."), i18n ("Could not embed R X11 window"), "embed_x11_device_not_supported");
#else
RKErrorDialog::reportableErrorMessage (0, i18n ("You have tried to embed a new R graphics device window in RKWard. However, either no window was created, or RKWard failed to detect the new window. If you think RKWard should have done better, consider reporting this as a bug. Alternatively, you may want to adjust Settings->Configure RKWard->Onscreen Graphics."), QString (), i18n ("Could not embed R X11 window"), "failure_to_detect_x11_device");
More information about the rkward-tracker
mailing list