[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [rkward] /: Fix build to earlier versions of Qt
From: Thomas Friedrichsmeier <null () kde ! org>
Date: 2018-09-29 5:47:42
Message-ID: E1g686Q-0002Xm-RE () code ! kde ! org
[Download RAW message or body]
Git commit d95fc799d1b98095f621eb7a5ddaf591254cb74d by Thomas Friedrichsmeier.
Committed on 29/09/2018 at 05:46.
Pushed by tfry into branch 'master'.
Fix build to earlier versions of Qt
M +1 -0 ChangeLog
M +4 -4 rkward/windows/rkcommandeditorwindow.cpp
https://commits.kde.org/rkward/d95fc799d1b98095f621eb7a5ddaf591254cb74d
diff --git a/ChangeLog b/ChangeLog
index 1dcf2c5e..f794e6ff 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,5 @@
--- Version 0.7.1 - UNRELEASED
+- Add various live-preview options for R scripts, including a preview of R markdown \
rendering
- Make it possible to "link" to specific settings pages from the internal \
documentation
- Slighlty less confusing output in case a package is installed from require(), such \
as in many plugins
- Fixed: RKWard icon was missing for the "enhances RKWard" column in package \
installation dialog
diff --git a/rkward/windows/rkcommandeditorwindow.cpp \
b/rkward/windows/rkcommandeditorwindow.cpp index 5e8e224b..f31a6069 100644
--- a/rkward/windows/rkcommandeditorwindow.cpp
+++ b/rkward/windows/rkcommandeditorwindow.cpp
@@ -832,8 +832,8 @@ void RKCommandEditorWindow::doRenderPreview () {
if (!preview_manager->needsCommand ()) return;
if (!preview_dir) preview_dir = new QTemporaryDir ();
- QFile save (preview_dir->filePath ("script.R"));
- if (actionmenu_preview->currentItem () == RMarkdownPreview) save.setFileName \
(preview_dir->filePath ("markdownscript.Rmd")); + QFile save (QDir \
(preview_dir->path()).absoluteFilePath ("script.R")); + if \
(actionmenu_preview->currentItem () == RMarkdownPreview) save.setFileName (QDir \
(preview_dir->path()).absoluteFilePath ("markdownscript.Rmd")); RK_ASSERT (save.open \
(QIODevice::WriteOnly)); QTextStream out (&save);
out.setCodec ("UTF-8"); // make sure that all characters can be saved, without \
nagging the user @@ -860,7 +860,7 @@ void RKCommandEditorWindow::doRenderPreview () {
command = command.arg (RObject::rQuote (save.fileName ()), RObject::rQuote \
(save.fileName () + ".html")); } else if (actionmenu_preview->currentItem () == \
RKOutputPreview) { preview->setLabel (i18n ("Preview of generated RKWard output"));
- QString output_file = preview_dir->filePath ("output.html");
+ QString output_file = QDir (preview_dir->path()).absoluteFilePath ("output.html");
command = "output <- rk.set.output.html.file(%2, silent=TRUE)\n"
"try(rk.flush.output(ask=FALSE, style=\"preview\", silent=TRUE))\n"
"try(source(%1, local=TRUE))\n"
@@ -882,7 +882,7 @@ void RKCommandEditorWindow::doRenderPreview () {
if (actionmenu_preview->currentItem () == ConsolePreview) { // somewhat hacky, I \
admit... preview->setLabel (i18n ("Preview of script running in interactive R \
Console"));
- QString output_file = RObject::rQuote (preview_dir->filePath ("output.html"));
+ QString output_file = RObject::rQuote (QDir (preview_dir->path()).absoluteFilePath \
("output.html")); RKGlobals::rInterface ()->issueCommand (QString (
"rk.assign.preview.data(%1, \
rk.set.output.html.file(%2, silent=TRUE))\n" "rk.flush.output(ask=FALSE, \
style=\"preview\", silent=TRUE)\n").arg (RObject::rQuote (preview_manager->previewId \
()), output_file), RCommand::App | RCommand::Sync);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic