mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
38 lines
1.1 KiB
Plaintext
38 lines
1.1 KiB
Plaintext
From e36f6867076060c98da51d4f081ad2eb9753953b Mon Sep 17 00:00:00 2001
|
|
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
|
Date: Wed, 22 Mar 2023 15:34:00 +1000
|
|
Subject: Add Haiku support
|
|
|
|
|
|
diff --git a/libs/librepcb/core/systeminfo.cpp b/libs/librepcb/core/systeminfo.cpp
|
|
index 289ee5c..5738726 100644
|
|
--- a/libs/librepcb/core/systeminfo.cpp
|
|
+++ b/libs/librepcb/core/systeminfo.cpp
|
|
@@ -63,6 +63,10 @@
|
|
#error "Unknown operating system!"
|
|
#endif
|
|
|
|
+#if defined(Q_OS_HAIKU)
|
|
+#include <OS.h>
|
|
+#endif
|
|
+
|
|
/*******************************************************************************
|
|
* Namespace
|
|
******************************************************************************/
|
|
@@ -319,6 +323,12 @@ QString SystemInfo::getProcessNameByPid(qint64 pid) {
|
|
return QString(); // process not running
|
|
}
|
|
processName = QString::fromLocal8Bit(psinfo.pr_fname);
|
|
+#elif defined(Q_OS_HAIKU)
|
|
+ team_info info;
|
|
+ if (get_team_info(pid, &info) == B_OK) {
|
|
+ processName = QString::fromLocal8Bit(info.args, 64);
|
|
+ } else
|
|
+ return QString();
|
|
#else
|
|
#error "Unknown operating system!"
|
|
#endif
|
|
--
|
|
2.37.3
|
|
|