mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
to work. Previously, it only worked without the "--no-git-repo". Shrink the patch a bit by dropping an unneeded indentation change. Use commandBinDir & commandSuffix to move kdiff3 to $prefix/bin/. Switch SOURCE_URI to https and fix COPYRIGHT.
41 lines
1.2 KiB
Plaintext
41 lines
1.2 KiB
Plaintext
From b1e5b43476070d319d12d9f5632b9b6d54810ad8 Mon Sep 17 00:00:00 2001
|
|
From: Bach Nguyen <bach5000@gci.test>
|
|
Date: Tue, 26 Dec 2017 21:45:17 +0000
|
|
Subject: Fix settings dir
|
|
|
|
|
|
diff --git a/src-QT4/kreplacements/kreplacements.cpp b/src-QT4/kreplacements/kreplacements.cpp
|
|
index 6564ae8..1e648a2 100644
|
|
--- a/src-QT4/kreplacements/kreplacements.cpp
|
|
+++ b/src-QT4/kreplacements/kreplacements.cpp
|
|
@@ -48,6 +48,9 @@
|
|
#include <vector>
|
|
#include <algorithm>
|
|
|
|
+#if defined(__HAIKU__)
|
|
+#include <FindDirectory.h>
|
|
+#endif
|
|
|
|
static QString s_copyright;
|
|
static QString s_email;
|
|
@@ -422,9 +425,15 @@ QString KStandardDirs::findResource(const QString& resource, const QString& /*ap
|
|
QString configPath = exePath + "/.kdiff3rc"; // This is useful for portable installations (e.g. on USB-Stick)
|
|
if ( QFile::exists( configPath ) )
|
|
return configPath;
|
|
-#endif
|
|
+#elif defined(__HAIKU__)
|
|
+ char hdir[B_PATH_NAME_LENGTH + B_FILE_NAME_LENGTH];
|
|
+ find_directory(B_USER_SETTINGS_DIRECTORY, -1, false, hdir, sizeof(hdir));
|
|
+ QString settings = hdir;
|
|
+ return settings + "/kdiff3rc";
|
|
+#else
|
|
QString home = QDir::homePath();
|
|
return home + "/.kdiff3rc";
|
|
+#endif
|
|
}
|
|
return QString();
|
|
}
|
|
--
|
|
2.15.0
|
|
|