[rkward/frameworks] rkward: Various Windows build fixes.

Thomas Friedrichsmeier thomas.friedrichsmeier at ruhr-uni-bochum.de
Sun Feb 21 20:06:38 UTC 2016


Git commit eeb001f83bbb8323acefdfb8455d2108df947987 by Thomas Friedrichsmeier.
Committed on 21/02/2016 at 20:06.
Pushed by tfry into branch 'frameworks'.

Various Windows build fixes.

M  +3    -3    rkward/core/rkvariable.cpp
M  +1    -1    rkward/misc/getfilenamewidget.cpp
M  +3    -0    rkward/rbackend/rkrbackend.cpp
M  +1    -1    rkward/rkward.cpp

http://commits.kde.org/rkward/eeb001f83bbb8323acefdfb8455d2108df947987

diff --git a/rkward/core/rkvariable.cpp b/rkward/core/rkvariable.cpp
index b2ab526..47d3989 100644
--- a/rkward/core/rkvariable.cpp
+++ b/rkward/core/rkvariable.cpp
@@ -18,7 +18,7 @@
 
 #include <qstringlist.h>
 #include "float.h"
-#include "math.h"
+#include <cmath>
 
 #include "rcontainerobject.h"
 #include "robjectlist.h"
@@ -574,7 +574,7 @@ void RKVariable::setNumericFromR (int from_row, int to_row, const QVector<double
 			if (data->cell_states[row] & RKVarEditData::Invalid) data->cell_states[row] =  RKVarEditData::UnsyncedInvalidState;
 			else data->cell_states[row] = 0;
 
-			if (isnan (numdata[i]) || (!data->value_labels) || (!data->value_labels->contains (QString::number (numdata[i])))) {
+			if (std::isnan (numdata[i]) || (!data->value_labels) || (!data->value_labels->contains (QString::number (numdata[i])))) {
 				data->cell_states[row] |= RKVarEditData::NA;
 			} else {
 				data->cell_states[row] |= RKVarEditData::Valid;
@@ -588,7 +588,7 @@ void RKVariable::setNumericFromR (int from_row, int to_row, const QVector<double
 			if (data->cell_states[row] & RKVarEditData::Invalid) data->cell_states[row] = RKVarEditData::UnsyncedInvalidState;
 			else data->cell_states[row] = 0;
 
-			if (isnan (numdata[i])) {
+			if (std::isnan (numdata[i])) {
 				data->cell_states[row] |= RKVarEditData::NA;
 			} else {
 				data->cell_states[row] |= RKVarEditData::Valid;
diff --git a/rkward/misc/getfilenamewidget.cpp b/rkward/misc/getfilenamewidget.cpp
index 3eff3de..387039f 100644
--- a/rkward/misc/getfilenamewidget.cpp
+++ b/rkward/misc/getfilenamewidget.cpp
@@ -119,7 +119,7 @@ void GetFileNameWidget::hackOverrideDirDialog () {
 	dummy.setFileMode (QFileDialog::Directory);
 	dummy.setOptions (QFileDialog::ShowDirsOnly);
 	if (dummy.exec ()) {
-		edit->setUrl (dummy.selectedFiles ().value (0));
+		edit->setUrl (QUrl::fromLocalFile (dummy.selectedFiles ().value (0)));
 		emit (locationChanged ());
 	}
 }
diff --git a/rkward/rbackend/rkrbackend.cpp b/rkward/rbackend/rkrbackend.cpp
index 6402813..6f0f600 100644
--- a/rkward/rbackend/rkrbackend.cpp
+++ b/rkward/rbackend/rkrbackend.cpp
@@ -260,6 +260,9 @@ void RKTransmitNextUserCommandChunk (unsigned char* buf, int buflen) {
 	}
 }
 
+// forward declaration needed on Windows
+void RCleanUp (SA_TYPE saveact, int status, int RunLast);
+
 int RReadConsole (const char* prompt, unsigned char* buf, int buflen, int hist) {
 	RK_TRACE (RBACKEND);
 
diff --git a/rkward/rkward.cpp b/rkward/rkward.cpp
index 8ad3d18..2a7979e 100644
--- a/rkward/rkward.cpp
+++ b/rkward/rkward.cpp
@@ -211,7 +211,7 @@ void RKWardMainWindow::doPostInit () {
 #ifdef Q_OS_WIN
 	// KF5 TODO: Still needed?
 	// detect and disable the buggy "native" file dialogs
-	KConfigGroup cg = KGlobal::config ().data ()->group ("KFileDialog Settings");
+	KConfigGroup cg = KSharedConfig::openConfig ().data ()->group ("KFileDialog Settings");
 	if (cg.readEntry ("Native", true)) {
 		int res = KMessageBox::questionYesNo (this, i18n ("Your installation of KDE is configured to use \"native\" file dialogs. This is known to cause issues in some cases, and we recommend to disable \"native\" file dialogs.\nShould \"native\" file dialogs be disabled in RKWard?"),
 							i18n ("Potential problem with your configuration"), KGuiItem (i18n ("Yes, disable")), KGuiItem (i18n ("No, use \"native\" file dialogs")), "windows_native_kfiledialog");



More information about the rkward-tracker mailing list