From 183f0aeec7e7b6ddc315c4da1039fb3866129d09 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
Date: Fri, 23 Aug 2019 13:46:42 +0200
Subject: [PATCH 1/2] Disable root check for haiku


diff --git a/src/ui/main.cpp b/src/ui/main.cpp
index a1be0b7..d047a04 100644
--- a/src/ui/main.cpp
+++ b/src/ui/main.cpp
@@ -92,6 +92,7 @@ int main(int argc, char *argv[])
         return EXIT_SUCCESS;
     }
 
+    #ifndef Q_OS_HAIKU
     // Check if we're running as root
     if( getuid() == 0 && !parser->isSet("allow-root") ) {
         qWarning() << QObject::tr(
@@ -100,6 +101,7 @@ int main(int argc, char *argv[])
 
         return EXIT_SUCCESS;
     }
+    #endif
 
     if (a.attachToOtherInstance()) {
         return EXIT_SUCCESS;
-- 
2.30.2


From d6df9d46cab0be8f8ed4b590b7bc268acbe03896 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Sat, 24 Aug 2019 11:18:35 +1000
Subject: [PATCH 2/2] Fix resources path


diff --git a/src/ui/notepadqq.cpp b/src/ui/notepadqq.cpp
index b93c0e4..fedee8f 100644
--- a/src/ui/notepadqq.cpp
+++ b/src/ui/notepadqq.cpp
@@ -23,9 +23,12 @@ QString Notepadqq::appDataPath(QString fileName)
 #ifdef Q_OS_MACX
     QString def = QString("%1/../Resources/").
             arg(qApp->applicationDirPath());
+#elif defined(Q_OS_HAIKU)
+    QString def = QString("%1/Resources/").
+        arg(qApp->applicationDirPath());
 #else
     QString def = QString("%1/../appdata/").
-            arg(qApp->applicationDirPath());
+        arg(qApp->applicationDirPath());
 #endif
 
     if(!QDir(def).exists())
-- 
2.30.2

