[rkward] rkward: Fix more compile time warnings.

Thomas Friedrichsmeier null at kde.org
Mon Apr 23 08:31:51 UTC 2018


Git commit f78fad32b4bf219e13556002dd448aeff79011d6 by Thomas Friedrichsmeier.
Committed on 23/04/2018 at 08:31.
Pushed by tfry into branch 'master'.

Fix more compile time warnings.

M  +5    -0    rkward/agents/rkprintagent.cpp
M  +1    -1    rkward/plugin/rkinput.h
M  +2    -2    rkward/rbackend/rkrsupport.cpp

https://commits.kde.org/rkward/f78fad32b4bf219e13556002dd448aeff79011d6

diff --git a/rkward/agents/rkprintagent.cpp b/rkward/agents/rkprintagent.cpp
index 932361bd..317a7dae 100644
--- a/rkward/agents/rkprintagent.cpp
+++ b/rkward/agents/rkprintagent.cpp
@@ -24,6 +24,7 @@
 #include <krun.h>
 #include <kservice.h>
 #include <kmessagebox.h>
+#include <kio_version.h>
 #include <KLocalizedString>
 #include <QUrl>
 
@@ -72,7 +73,11 @@ void RKPrintAgent::printPostscript (const QString &file, bool delete_file) {
 		RK_DEBUG (APP, DL_WARNING, "No valid postscript postscript provider was found");
 		KMessageBox::sorry (RKWardMainWindow::getMain (), i18n ("No service was found to provide a KDE print dialog for PostScript files. We will try to open a generic PostScript viewer (if any), instead.<br><br>Consider installing 'okular', or configure RKWard not to attempt to print using a KDE print dialog."), i18n ("Unable to open KDE print dialog"));
 		// fallback: If we can't find a proper part, try to invoke a standalone PS reader, instead
+#if KIO_VERSION < QT_VERSION_CHECK(5, 31, 0)
 		KRun::runUrl (QUrl::fromLocalFile (file), "appication/postscript", RKWardMainWindow::getMain ());
+#else
+		KRun::runUrl (QUrl::fromLocalFile (file), "appication/postscript", RKWardMainWindow::getMain (), KRun::RunFlags());
+#endif
 		return;
 	}
 
diff --git a/rkward/plugin/rkinput.h b/rkward/plugin/rkinput.h
index af971c4a..18d37bdf 100644
--- a/rkward/plugin/rkinput.h
+++ b/rkward/plugin/rkinput.h
@@ -40,7 +40,7 @@ public:
 	QVariant value (const QString &modifier=QString ()) override { return (text->value (modifier)); };
 	QStringList getUiLabelPair () const override;
 	int type () override { return ComponentInput; };
-	bool isValid ();
+	bool isValid () override;
 public slots:
 	void textChanged ();
 	void textChangedFromUi ();
diff --git a/rkward/rbackend/rkrsupport.cpp b/rkward/rbackend/rkrsupport.cpp
index bf49dadc..d4253c88 100644
--- a/rkward/rbackend/rkrsupport.cpp
+++ b/rkward/rbackend/rkrsupport.cpp
@@ -2,7 +2,7 @@
                           rkrsupport  -  description
                              -------------------
     begin                : Mon Oct 25 2010
-    copyright            : (C) 2010 by Thomas Friedrichsmeier
+    copyright            : (C) 2010-2018 by Thomas Friedrichsmeier
     email                : thomas.friedrichsmeier at kdemail.net
  ***************************************************************************/
 
@@ -238,7 +238,7 @@ RData *RKRSupport::SEXPToRData (SEXP from_exp) {
 				R_ClearExternalPtr (from_exp);
 				break;
 			}
-		case STRSXP:
+		//case STRSXP: // intentional fallthrough, conversion to stringlist is the default handling
 		default:
 			data->setData (SEXPToStringList (from_exp));
 	}



More information about the rkward-tracker mailing list