[education/rkward] rkward: List these options as arguments, instead, or they will evaluate to NULL
Thomas Friedrichsmeier
null at kde.org
Fri May 10 17:04:24 BST 2024
Git commit 7198649eb7c0f65df8aad9fbf6e82e9120da7d81 by Thomas Friedrichsmeier.
Committed on 10/05/2024 at 15:15.
Pushed by tfry into branch 'master'.
List these options as arguments, instead, or they will evaluate to NULL
M +1 -1 rkward/autotests/core_test.cpp
M +1 -3 rkward/rbackend/rpackages/rkward/R/public_graphics.R
https://invent.kde.org/education/rkward/-/commit/7198649eb7c0f65df8aad9fbf6e82e9120da7d81
diff --git a/rkward/autotests/core_test.cpp b/rkward/autotests/core_test.cpp
index 1bcdf48c8..56d082227 100644
--- a/rkward/autotests/core_test.cpp
+++ b/rkward/autotests/core_test.cpp
@@ -365,7 +365,7 @@ private Q_SLOTS:
void RKDeviceTest() {
// Well, this test is sort of lame but should at least catch major breakage in RK() device
- runCommandAsync(new RCommand("demo(graphics)", RCommand::User), nullptr, [](RCommand *command) {
+ runCommandAsync(new RCommand("demo(graphics, ask=FALSE)", RCommand::User), nullptr, [](RCommand *command) {
QVERIFY(!command->failed());
});
RInterface::issueCommand(new RCommand("dev.off()", RCommand::User));
diff --git a/rkward/rbackend/rpackages/rkward/R/public_graphics.R b/rkward/rbackend/rpackages/rkward/R/public_graphics.R
index 3f784f867..869aabcd1 100644
--- a/rkward/rbackend/rpackages/rkward/R/public_graphics.R
+++ b/rkward/rbackend/rpackages/rkward/R/public_graphics.R
@@ -191,10 +191,8 @@
# Internal function to create wrapper around an R device function (used for X11(), windows(), and quartz()).
#' @importFrom utils getFromNamespace
".rk.make.device.wrapper" <- function (devicename) {
- # dummy objects to satisfy R CMD check
- bg <- title <- antialias <- NULL
ret <- eval (substitute (
- function (width=getOption("rk.screendevice.width"), height=getOption("rk.screendevice.height"), pointsize=12) {
+ function (width=getOption("rk.screendevice.width"), height=getOption("rk.screendevice.height"), pointsize=12, bg, title, antialias) {
rk.mode <- getOption ("rk.override.platform.devices")
if (identical (rk.mode, "replace") || !exists (devicename, envir=asNamespace ("grDevices"), inherits=FALSE)) {
if (!identical (rk.mode, "replace")) {
More information about the rkward-tracker
mailing list