summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTobias Koenig <tobias.koenig@kdab.com>2015-07-24 14:42:53 +0000
committerTobias Koenig <tobias.koenig@kdab.com>2015-12-08 19:18:20 +0000
commitdf3a05b918666f11f06d721b8c203fd75e99e62a (patch)
treeb928985062b1207dd3f2ff1a9b9661a87a209d67 /src
parent330f8f6d80fe14cc82e3c33c2341c917469ba51e (diff)
Haiku: Implement QLockFilePrivate::processNameByPid
Change-Id: Ie9b76d14f901f5aadf7409183165eaccc288effd Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/io/qlockfile_unix.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/corelib/io/qlockfile_unix.cpp b/src/corelib/io/qlockfile_unix.cpp
index d7a4a70da7..ae776d4137 100644
--- a/src/corelib/io/qlockfile_unix.cpp
+++ b/src/corelib/io/qlockfile_unix.cpp
@@ -57,6 +57,8 @@
#elif defined(Q_OS_LINUX)
# include <unistd.h>
# include <cstdio>
+#elif defined(Q_OS_HAIKU)
+# include <kernel/OS.h>
#elif defined(Q_OS_BSD4) && !defined(Q_OS_IOS)
# include <sys/user.h>
# if defined(__GLIBC__) && defined(__FreeBSD_kernel__)
@@ -251,6 +253,11 @@ QString QLockFilePrivate::processNameByPid(qint64 pid)
}
buf[len] = 0;
return QFileInfo(QFile::decodeName(buf)).fileName();
+#elif defined(Q_OS_HAIKU)
+ thread_info info;
+ if (get_thread_info(pid, &info) != B_OK)
+ return QString();
+ return QFile::decodeName(info.name);
#elif defined(Q_OS_BSD4) && !defined(Q_OS_IOS)
# if defined(__GLIBC__) && defined(__FreeBSD_kernel__)
int mib[4] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, pid };