[education/rkward] rkward/rbackend: Add some temporary diagnostics

Thomas Friedrichsmeier null at kde.org
Sun Jul 17 15:00:21 BST 2022


Git commit 82a4c4f08f50ee367df051a1858ce7f7ecd7cd26 by Thomas Friedrichsmeier.
Committed on 17/07/2022 at 14:00.
Pushed by tfry into branch 'master'.

Add some temporary diagnostics

M  +21   -0    rkward/rbackend/rkrinterface.cpp

https://invent.kde.org/education/rkward/commit/82a4c4f08f50ee367df051a1858ce7f7ecd7cd26

diff --git a/rkward/rbackend/rkrinterface.cpp b/rkward/rbackend/rkrinterface.cpp
index 0142fc18..f3fed9a2 100644
--- a/rkward/rbackend/rkrinterface.cpp
+++ b/rkward/rbackend/rkrinterface.cpp
@@ -53,6 +53,10 @@ SPDX-License-Identifier: GPL-2.0-or-later
 #include <QPushButton>
 #include <QElapsedTimer>
 
+// TODO: remove these:
+#include <QLibraryInfo>
+#include <QStandardPaths>
+
 // flush new pieces of output after this period of time:
 #define FLUSH_INTERVAL 100
 
@@ -396,6 +400,23 @@ void RInterface::handleRequest (RBackendRequest* request) {
 			"	fix(\"LD_LIBRARY_PATH\")\n"
 			"	fix(\"PATH\")\n"
 			"})\n", RCommand::App | RCommand::Sync), chain, [](RCommand*) {});
+
+			// TODO: Remove these. Temporary diagnostics regarding kioslave failure
+			RK_DEBUG(RBACKEND, DL_INFO, "ldp: %s", qgetenv("LD_LIBRARY_PATH").data());
+			RK_DEBUG(RBACKEND, DL_INFO, "p: %s", qgetenv("PATH").data());
+			RK_DEBUG(RBACKEND, DL_INFO, "conf Prefix: %s", qPrintable(QLibraryInfo::location(QLibraryInfo::PrefixPath)));
+			RK_DEBUG(RBACKEND, DL_INFO, "conf Lib: %s", qPrintable(QLibraryInfo::location(QLibraryInfo::LibrariesPath)));
+			RK_DEBUG(RBACKEND, DL_INFO, "conf LibExec: %s", qPrintable(QLibraryInfo::location(QLibraryInfo::LibraryExecutablesPath)));
+			RK_DEBUG(RBACKEND, DL_INFO, "conf Plugins: %s", qPrintable(QLibraryInfo::location(QLibraryInfo::PluginsPath)));
+			const QString qlibexec = QLibraryInfo::location(QLibraryInfo::LibraryExecutablesPath);
+			// on !win32 we use a kf5 suffix
+			const QString qlibexecKF5 = QDir(qlibexec).filePath(QStringLiteral("kf5"));
+			// search paths
+			const QStringList searchPaths = QStringList() << QCoreApplication::applicationDirPath() // then look where our application binary is located
+                                                  << qlibexec << qlibexecKF5;
+			RK_DEBUG(RBACKEND, DL_INFO, "search: %s", qPrintable(searchPaths.join("_:")));
+			QString kioslaveExecutable = QStandardPaths::findExecutable(QStringLiteral("kioslave5"), searchPaths);
+			RK_DEBUG(RBACKEND, DL_INFO, "kioslave: %s", qPrintable(kioslaveExecutable));
 		}
 
 		// find out about standard library locations


More information about the rkward-tracker mailing list