mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-21 19:20:08 +02:00
Add KF6 frameworks, kio6 and compat for KF5 (#10507)
This commit is contained in:
@@ -13,7 +13,7 @@ file dialog or any other KIO enabled infrastructure."
|
||||
HOMEPAGE="https://invent.kde.org/frameworks/kio/"
|
||||
COPYRIGHT="2010-2024 KDE Organisation"
|
||||
LICENSE="GNU LGPL v2"
|
||||
REVISION="4"
|
||||
REVISION="5"
|
||||
SOURCE_URI="https://download.kde.org/stable/frameworks/${portVersion%.*}/kio-${portVersion}.tar.xz"
|
||||
CHECKSUM_SHA256="0f53387b5a883fcef3db10b7c1062485a314d42d9584d9119056e571568ff90b"
|
||||
PATCHES="kio-$portVersion.patchset"
|
||||
@@ -133,12 +133,11 @@ BUILD_PREREQUIRES="
|
||||
"
|
||||
|
||||
TEST_REQUIRES="
|
||||
qthaikuplugins$secondaryArchSuffix #it opens windows during the tests, maybe we don't want that on the buildbots.
|
||||
qthaikuplugins$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PATCH()
|
||||
{
|
||||
sed -e '/platforms:/ a \ \ \ \ - name: Haiku' -i $sourceDir/metainfo.yaml
|
||||
# disable docs generation until libxml package is fixed
|
||||
sed -e 's/add/#add/g' -i $sourceDir/docs/CMakeLists.txt
|
||||
sed -e 's/kdoctools/#kdoctool/g' -i $sourceDir/CMakeLists.txt
|
||||
@@ -146,10 +145,7 @@ PATCH()
|
||||
|
||||
BUILD()
|
||||
{
|
||||
mkdir -p build
|
||||
cd build
|
||||
|
||||
cmake .. $cmakeDirArgs \
|
||||
cmake -Bbuild -S. $cmakeDirArgs \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DKDE_INSTALL_PLUGINDIR=$addOnsDir/Qt5 \
|
||||
-DKDE_INSTALL_QTPLUGINDIR=$addOnsDir/Qt5 \
|
||||
@@ -157,16 +153,15 @@ BUILD()
|
||||
-DECM_MKSPECS_INSTALL_DIR=$dataDir/Qt5/mkspecs \
|
||||
-DECM_DIR=/system/data/cmake/Modules/ECM/cmake \
|
||||
-DKIO_NO_PUBLIC_QTCONCURRENT=ON \
|
||||
-DBUILD_TESTING=ON \
|
||||
-DKF6_COMPAT_BUILD=ON \
|
||||
-DBUILD_TESTING=OFF \
|
||||
-DWITH_X11=OFF
|
||||
|
||||
make $jobArgs
|
||||
make -C build $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
cd build
|
||||
make $jobArgs install
|
||||
make -C build install
|
||||
|
||||
prepareInstalledDevelLibs \
|
||||
libKF5KIOCore \
|
||||
@@ -184,6 +179,5 @@ INSTALL()
|
||||
TEST()
|
||||
{
|
||||
export LIBRARY_PATH="$sourceDir/build/bin${LIBRARY_PATH:+:$LIBRARY_PATH}"
|
||||
cd build
|
||||
make test
|
||||
make -C build test
|
||||
}
|
||||
|
||||
179
kde-frameworks/kio/kio6-6.2.0.recipe
Normal file
179
kde-frameworks/kio/kio6-6.2.0.recipe
Normal file
@@ -0,0 +1,179 @@
|
||||
SUMMARY="Network transparent access to files and data"
|
||||
DESCRIPTION="This framework implements almost all the file management \
|
||||
functions you will ever need. In fact, the KDE file manager (Dolphin) and the \
|
||||
KDE file dialog also uses this to provide its network-enabled file management.
|
||||
|
||||
It supports accessing files locally as well as via HTTP and FTP out of the \
|
||||
box and can be extended by plugins to support other protocols as well. \
|
||||
There is a variety of plugins available, e.g. to support access via SSH.
|
||||
|
||||
The framework can also be used to bridge a native protocol to a file-based \
|
||||
interface. This makes the data accessible in all applications using the KDE \
|
||||
file dialog or any other KIO enabled infrastructure."
|
||||
HOMEPAGE="https://invent.kde.org/frameworks/kio"
|
||||
COPYRIGHT="2010-2024 KDE Organisation"
|
||||
LICENSE="GNU LGPL v2"
|
||||
REVISION="2"
|
||||
SOURCE_URI="https://download.kde.org/stable/frameworks/${portVersion%.*}/kio-${portVersion}.tar.xz"
|
||||
CHECKSUM_SHA256="331d6ff6b9cbb0e6521a5d0746b152be2588fd631a73d0e249b78cd2cda69ccf"
|
||||
SOURCE_DIR="kio-$portVersion"
|
||||
PATCHES="kio-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
libVersion="$portVersion"
|
||||
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
|
||||
|
||||
PROVIDES="
|
||||
kio6$secondaryArchSuffix = $portVersion
|
||||
cmd:ktelnetservice6$secondaryArchSuffix = $portVersion
|
||||
cmd:ktrash6$secondaryArchSuffix = $portVersion
|
||||
lib:libKF6KIOCore$secondaryArchSuffix = $libVersionCompat
|
||||
lib:libKF6KIOFileWidgets$secondaryArchSuffix = $libVersionCompat
|
||||
lib:libKF6KIOGui$secondaryArchSuffix = $libVersionCompat
|
||||
lib:libKF6KIOWidgets$secondaryArchSuffix = $libVersionCompat
|
||||
lib:libkuriikwsfiltereng_private$secondaryArchSuffix
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libGL$secondaryArchSuffix
|
||||
lib:libKF6Archive$secondaryArchSuffix
|
||||
lib:libKF6AuthCore$secondaryArchSuffix
|
||||
lib:libKF6Bookmarks$secondaryArchSuffix
|
||||
lib:libKF6Codecs$secondaryArchSuffix
|
||||
lib:libKF6ColorScheme$secondaryArchSuffix
|
||||
lib:libKF6Completion$secondaryArchSuffix
|
||||
lib:libKF6ConfigCore$secondaryArchSuffix
|
||||
lib:libKF6ConfigGui$secondaryArchSuffix
|
||||
lib:libKF6ConfigWidgets$secondaryArchSuffix
|
||||
lib:libKF6CoreAddons$secondaryArchSuffix
|
||||
lib:libKF6Crash$secondaryArchSuffix
|
||||
lib:libKF6DBusAddons$secondaryArchSuffix
|
||||
lib:libKF6GuiAddons$secondaryArchSuffix
|
||||
lib:libKF6I18n$secondaryArchSuffix
|
||||
lib:libKF6IconThemes$secondaryArchSuffix
|
||||
lib:libKF6ItemViews$secondaryArchSuffix
|
||||
lib:libKF6JobWidgets$secondaryArchSuffix
|
||||
lib:libKF6Service$secondaryArchSuffix
|
||||
lib:libKF6Solid$secondaryArchSuffix
|
||||
lib:libKF6WidgetsAddons$secondaryArchSuffix
|
||||
lib:libKF6WindowSystem$secondaryArchSuffix
|
||||
lib:libQt6Concurrent$secondaryArchSuffix
|
||||
lib:libQt6Core$secondaryArchSuffix
|
||||
lib:libQt6Core5Compat$secondaryArchSuffix
|
||||
lib:libQt6DBus$secondaryArchSuffix
|
||||
lib:libQt6Gui$secondaryArchSuffix
|
||||
lib:libQt6Network$secondaryArchSuffix
|
||||
lib:libQt6Xml$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_devel="
|
||||
kio6${secondaryArchSuffix}_devel = $portVersion
|
||||
devel:libKF6KIOCore$secondaryArchSuffix = $libVersionCompat
|
||||
devel:libKF6KIOFileWidgets$secondaryArchSuffix = $libVersionCompat
|
||||
devel:libKF6KIOGui$secondaryArchSuffix = $libVersionCompat
|
||||
devel:libKF6KIOWidgets$secondaryArchSuffix = $libVersionCompat
|
||||
"
|
||||
REQUIRES_devel="
|
||||
kio6$secondaryArchSuffix == $portVersion base
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
extra_cmake_modules$secondaryArchSuffix >= $portVersion
|
||||
qt6_tools${secondaryArchSuffix}_devel
|
||||
# devel:libacl$secondaryArchSuffix
|
||||
devel:kded6$secondaryArchSuffix
|
||||
devel:libKF6Archive$secondaryArchSuffix == $portVersion
|
||||
devel:libKF6AuthCore$secondaryArchSuffix == $portVersion
|
||||
devel:libKF6Bookmarks$secondaryArchSuffix == $portVersion
|
||||
devel:libKF6Codecs$secondaryArchSuffix == $portVersion
|
||||
devel:libKF6ColorScheme$secondaryArchSuffix == $portVersion
|
||||
devel:libKF6Completion$secondaryArchSuffix == $portVersion
|
||||
devel:libKF6ConfigCore$secondaryArchSuffix == $portVersion
|
||||
devel:libKF6ConfigGui$secondaryArchSuffix == $portVersion
|
||||
devel:libKF6ConfigWidgets$secondaryArchSuffix == $portVersion
|
||||
devel:libKF6CoreAddons$secondaryArchSuffix == $portVersion
|
||||
devel:libKF6Crash$secondaryArchSuffix == $portVersion
|
||||
devel:libKF6DBusAddons$secondaryArchSuffix == $portVersion
|
||||
devel:libKF6GuiAddons$secondaryArchSuffix == $portVersion
|
||||
devel:libKF6DocTools$secondaryArchSuffix == $portVersion
|
||||
devel:libKF6I18n$secondaryArchSuffix == $portVersion
|
||||
devel:libKF6IconThemes$secondaryArchSuffix == $portVersion
|
||||
devel:libKF6ItemViews$secondaryArchSuffix == $portVersion
|
||||
devel:libKF6JobWidgets$secondaryArchSuffix == $portVersion
|
||||
devel:libKF6Notifications$secondaryArchSuffix == $portVersion
|
||||
devel:libKF6Service$secondaryArchSuffix == $portVersion
|
||||
devel:libKF6Solid$secondaryArchSuffix == $portVersion
|
||||
devel:libKF6Wallet$secondaryArchSuffix == $portVersion
|
||||
devel:libKF6WidgetsAddons$secondaryArchSuffix == $portVersion
|
||||
devel:libKF6WindowSystem$secondaryArchSuffix == $portVersion
|
||||
devel:libQt6Concurrent$secondaryArchSuffix
|
||||
devel:libQt6Core$secondaryArchSuffix
|
||||
devel:libQt6Core5Compat$secondaryArchSuffix
|
||||
devel:libQt6DBus$secondaryArchSuffix
|
||||
devel:libQt6Gui$secondaryArchSuffix
|
||||
devel:libQt6Network$secondaryArchSuffix
|
||||
devel:libQt6Qml$secondaryArchSuffix
|
||||
devel:libxml2$secondaryArchSuffix
|
||||
devel:libxslt$secondaryArchSuffix
|
||||
devel:libz$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:cmake
|
||||
cmd:dot
|
||||
cmd:doxygen >= 1.9
|
||||
cmd:g++$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:python3
|
||||
"
|
||||
|
||||
TEST_REQUIRES="
|
||||
qthaikuplugins$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PATCH()
|
||||
{
|
||||
# disable docs generation until libxml package is fixed
|
||||
sed -e 's/add/#add/g' -i $sourceDir/docs/CMakeLists.txt
|
||||
sed -e 's/kdoctools/#kdoctool/g' -i $sourceDir/CMakeLists.txt
|
||||
}
|
||||
|
||||
BUILD()
|
||||
{
|
||||
cmake -Bbuild -S. $cmakeDirArgs \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DKDE_INSTALL_PLUGINDIR=$addOnsDir/Qt6 \
|
||||
-DKDE_INSTALL_QTPLUGINDIR=$addOnsDir/Qt6 \
|
||||
-DKAUTH_HELPER_INSTALL_DIR:PATH=$addOnsDir/Qt6/kauth/helper \
|
||||
-DECM_DIR=/system/data/cmake/Modules/ECM/cmake \
|
||||
-DWITH_X11=OFF \
|
||||
-DWITH_WAYLAND=OFF \
|
||||
-DBUILD_QCH=ON \
|
||||
-DBUILD_TESTING=OFF
|
||||
make -Cbuild $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make -Cbuild install
|
||||
|
||||
prepareInstalledDevelLibs \
|
||||
libKF6KIOCore \
|
||||
libKF6KIOFileWidgets \
|
||||
libKF6KIOGui \
|
||||
libKF6KIOWidgets
|
||||
|
||||
packageEntries devel \
|
||||
$developDir \
|
||||
$dataDir/doc \
|
||||
$libDir/cmake
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
# 39% tests passed, 38 tests failed out of 62
|
||||
export LIBRARY_PATH="$sourceDir/build/bin${LIBRARY_PATH:+:$LIBRARY_PATH}"
|
||||
ctest --test-dir build --output-on-failure
|
||||
}
|
||||
259
kde-frameworks/kio/patches/kio-6.2.0.patchset
Normal file
259
kde-frameworks/kio/patches/kio-6.2.0.patchset
Normal file
@@ -0,0 +1,259 @@
|
||||
From 7a3859235e0b32918eec8e8b633f4a916c4a8767 Mon Sep 17 00:00:00 2001
|
||||
From: Sergei Reznikov <diver@gelios.net>
|
||||
Date: Sun, 31 Oct 2021 13:15:08 +0300
|
||||
Subject: Fix build on Haiku
|
||||
|
||||
|
||||
diff --git a/autotests/jobtest.cpp b/autotests/jobtest.cpp
|
||||
index 124e827..183c897 100644
|
||||
--- a/autotests/jobtest.cpp
|
||||
+++ b/autotests/jobtest.cpp
|
||||
@@ -1977,7 +1977,7 @@ void JobTest::statTimeResolution()
|
||||
|
||||
QFile dest_file(filePath);
|
||||
QVERIFY(dest_file.open(QIODevice::ReadOnly));
|
||||
-#if defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD)
|
||||
+#if defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD) || defined(Q_OS_HAIKU)
|
||||
// with nano secs precision
|
||||
struct timespec ut[2];
|
||||
ut[0].tv_sec = early70sTime;
|
||||
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
|
||||
index 3cc15a3..2ecdd33 100644
|
||||
--- a/src/core/CMakeLists.txt
|
||||
+++ b/src/core/CMakeLists.txt
|
||||
@@ -217,6 +217,10 @@ if (TARGET KF6::AuthCore)
|
||||
target_link_libraries(KF6KIOCore PRIVATE KF6::AuthCore) #SlaveBase uses KAuth::Action
|
||||
endif()
|
||||
|
||||
+if (HAIKU)
|
||||
+ target_link_libraries(KF6KIOCore PRIVATE network)
|
||||
+endif ()
|
||||
+
|
||||
if(ACL_FOUND)
|
||||
target_link_libraries(KF6KIOCore PRIVATE ${ACL_LIBS})
|
||||
endif()
|
||||
diff --git a/src/gui/previewjob.cpp b/src/gui/previewjob.cpp
|
||||
index 9ff3c1c..f45a0de 100644
|
||||
--- a/src/gui/previewjob.cpp
|
||||
+++ b/src/gui/previewjob.cpp
|
||||
@@ -13,7 +13,7 @@
|
||||
#include "kiogui_debug.h"
|
||||
#include "statjob.h"
|
||||
|
||||
-#if defined(Q_OS_UNIX) && !defined(Q_OS_ANDROID)
|
||||
+#if defined(Q_OS_UNIX) && !defined(Q_OS_ANDROID) && !defined(Q_OS_HAIKU)
|
||||
#define WITH_SHM 1
|
||||
#else
|
||||
#define WITH_SHM 0
|
||||
diff --git a/src/kioworkers/file/CMakeLists.txt b/src/kioworkers/file/CMakeLists.txt
|
||||
index 2a63768..6423cd9 100644
|
||||
--- a/src/kioworkers/file/CMakeLists.txt
|
||||
+++ b/src/kioworkers/file/CMakeLists.txt
|
||||
@@ -35,6 +35,10 @@ if(UNIX)
|
||||
target_link_libraries(kio_file Qt6::Network KF6::AuthCore)
|
||||
endif()
|
||||
|
||||
+if (HAIKU)
|
||||
+ target_link_libraries(kio_file gnu network)
|
||||
+endif ()
|
||||
+
|
||||
if(ACL_FOUND)
|
||||
target_link_libraries(kio_file ${ACL_LIBS})
|
||||
endif()
|
||||
diff --git a/src/kioworkers/file/file_unix.cpp b/src/kioworkers/file/file_unix.cpp
|
||||
index 9999857..8bc8447 100644
|
||||
--- a/src/kioworkers/file/file_unix.cpp
|
||||
+++ b/src/kioworkers/file/file_unix.cpp
|
||||
@@ -69,6 +69,11 @@
|
||||
#include <sys/extattr.h>
|
||||
#endif
|
||||
|
||||
+#ifdef __HAIKU__
|
||||
+#undef HAVE_DIRENT_D_TYPE
|
||||
+#undef HAVE_SYS_XATTR_H
|
||||
+#endif
|
||||
+
|
||||
using namespace KIO;
|
||||
|
||||
/* 512 kB */
|
||||
@@ -784,7 +789,7 @@ WorkerResult FileProtocol::copy(const QUrl &srcUrl, const QUrl &destUrl, int _mo
|
||||
|
||||
// copy access and modification time
|
||||
if (!wasKilled()) {
|
||||
-#if defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD)
|
||||
+#if defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD) || defined(Q_OS_HAIKU)
|
||||
// with nano secs precision
|
||||
struct timespec ut[2];
|
||||
ut[0] = buffSrc.st_atim;
|
||||
diff --git a/src/kioworkers/file/kauth/CMakeLists.txt b/src/kioworkers/file/kauth/CMakeLists.txt
|
||||
index 8d8c0ed..aa164e1 100644
|
||||
--- a/src/kioworkers/file/kauth/CMakeLists.txt
|
||||
+++ b/src/kioworkers/file/kauth/CMakeLists.txt
|
||||
@@ -1,6 +1,10 @@
|
||||
add_executable(file_helper filehelper.cpp fdsender.cpp)
|
||||
target_link_libraries(file_helper Qt6::Network KF6::AuthCore KF6::I18n KF6::KIOCore)
|
||||
|
||||
+if (HAIKU)
|
||||
+ target_link_libraries(file_helper network)
|
||||
+endif ()
|
||||
+
|
||||
#install(TARGETS file_helper DESTINATION ${KAUTH_HELPER_INSTALL_DIR})
|
||||
#kauth_install_helper_files(file_helper org.kde.kio.file root)
|
||||
#kauth_install_actions(org.kde.kio.file file.actions)
|
||||
--
|
||||
2.43.2
|
||||
|
||||
|
||||
From 28831a00bf7134d6067a199ecaee3348f39274c3 Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Tue, 17 May 2022 21:28:27 +1000
|
||||
Subject: Add OpenWith handler for Haiku
|
||||
|
||||
|
||||
diff --git a/src/gui/openurljob.cpp b/src/gui/openurljob.cpp
|
||||
index 551bdac..b15f826 100644
|
||||
--- a/src/gui/openurljob.cpp
|
||||
+++ b/src/gui/openurljob.cpp
|
||||
@@ -160,7 +160,7 @@ void KIO::OpenUrlJob::start()
|
||||
emitResult();
|
||||
};
|
||||
|
||||
-#if defined(Q_OS_WIN) || defined(Q_OS_MACOS)
|
||||
+#if defined(Q_OS_WIN) || defined(Q_OS_MACOS) || defined(Q_OS_HAIKU)
|
||||
if (d->m_externalBrowserEnabled) {
|
||||
// For Windows and MacOS, the mimetypes handling is different, so use QDesktopServices
|
||||
qtOpenUrl();
|
||||
diff --git a/src/widgets/CMakeLists.txt b/src/widgets/CMakeLists.txt
|
||||
index ae37d70..267d4ef 100644
|
||||
--- a/src/widgets/CMakeLists.txt
|
||||
+++ b/src/widgets/CMakeLists.txt
|
||||
@@ -144,6 +144,10 @@ if(ACL_FOUND)
|
||||
target_link_libraries(KF6KIOWidgets PRIVATE ${ACL_LIBS})
|
||||
endif()
|
||||
|
||||
+if(HAIKU)
|
||||
+ target_link_libraries(KF6KIOWidgets PRIVATE be tracker)
|
||||
+endif()
|
||||
+
|
||||
# Headers not prefixed with KIO/
|
||||
ecm_generate_headers(KIOWidgets_HEADERS
|
||||
HEADER_NAMES
|
||||
diff --git a/src/widgets/widgetsopenwithhandler.cpp b/src/widgets/widgetsopenwithhandler.cpp
|
||||
index 8133c2e..f8c853a 100644
|
||||
--- a/src/widgets/widgetsopenwithhandler.cpp
|
||||
+++ b/src/widgets/widgetsopenwithhandler.cpp
|
||||
@@ -20,6 +20,10 @@
|
||||
#include "widgetsopenwithhandler_win.cpp" // displayNativeOpenWithDialog
|
||||
#endif
|
||||
|
||||
+#ifdef Q_OS_HAIKU
|
||||
+#include "widgetsopenwithhandler_haiku.cpp"
|
||||
+#endif
|
||||
+
|
||||
KIO::WidgetsOpenWithHandler::WidgetsOpenWithHandler(QObject *parent)
|
||||
: KIO::OpenWithHandlerInterface(parent)
|
||||
{
|
||||
@@ -48,7 +52,7 @@ void KIO::WidgetsOpenWithHandler::promptUserForApplication(KJob *job, const QLis
|
||||
parentWidget = qApp->activeWindow();
|
||||
}
|
||||
|
||||
-#ifdef Q_OS_WIN
|
||||
+#if defined(Q_OS_WIN) || defined(Q_OS_HAIKU)
|
||||
KConfigGroup cfgGroup(KSharedConfig::openConfig(), QStringLiteral("KOpenWithDialog Settings"));
|
||||
if (cfgGroup.readEntry("Native", true)) {
|
||||
// Implemented in applicationlauncherjob_win.cpp
|
||||
diff --git a/src/widgets/widgetsopenwithhandler_haiku.cpp b/src/widgets/widgetsopenwithhandler_haiku.cpp
|
||||
new file mode 100644
|
||||
index 0000000..9614b87
|
||||
--- /dev/null
|
||||
+++ b/src/widgets/widgetsopenwithhandler_haiku.cpp
|
||||
@@ -0,0 +1,38 @@
|
||||
+/*
|
||||
+ This file is part of the KDE libraries
|
||||
+ SPDX-FileCopyrightText: 2022 Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
+
|
||||
+ SPDX-License-Identifier: LGPL-2.0-or-later
|
||||
+*/
|
||||
+
|
||||
+#include <QDir>
|
||||
+#include <QWidget>
|
||||
+
|
||||
+#include <InterfaceKit.h>
|
||||
+#include <StorageKit.h>
|
||||
+#include <SupportKit.h>
|
||||
+#include <MimeType.h>
|
||||
+#include <Roster.h>
|
||||
+
|
||||
+static bool displayNativeOpenWithDialog(const QList<QUrl> &lst, QWidget *window)
|
||||
+{
|
||||
+ BMessenger trackerMessenger("application/x-vnd.Be-TRAK");
|
||||
+ if (trackerMessenger.IsValid()) {
|
||||
+ BMessage openCommand(B_REFS_RECEIVED);
|
||||
+ for (const QUrl &url : lst) {
|
||||
+ if (!url.isLocalFile())
|
||||
+ return false;
|
||||
+ QString filepath = QDir::toNativeSeparators(url.toLocalFile());
|
||||
+ BEntry fileEntry(filepath.toUtf8().data());
|
||||
+ entry_ref fileRef;
|
||||
+ if (fileEntry.GetRef(&fileRef) == B_OK) {
|
||||
+ update_mime_info(filepath.toUtf8().data(), false, true, false);
|
||||
+ openCommand.AddRef("refs", &fileRef);
|
||||
+ }
|
||||
+ }
|
||||
+ openCommand.AddInt32("launchUsingSelector", 0);
|
||||
+ if (trackerMessenger.SendMessage(&openCommand) == B_OK)
|
||||
+ return true;
|
||||
+ }
|
||||
+ return false;
|
||||
+}
|
||||
--
|
||||
2.43.2
|
||||
|
||||
|
||||
From 4a05e6a053c850e8b36df587189047c28dfeebb2 Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Sun, 25 Feb 2024 23:14:26 +1000
|
||||
Subject: Fix build
|
||||
|
||||
|
||||
diff --git a/src/kioworkers/file/file_unix.cpp b/src/kioworkers/file/file_unix.cpp
|
||||
index 8bc8447..7a62ee1 100644
|
||||
--- a/src/kioworkers/file/file_unix.cpp
|
||||
+++ b/src/kioworkers/file/file_unix.cpp
|
||||
@@ -72,6 +72,9 @@
|
||||
#ifdef __HAIKU__
|
||||
#undef HAVE_DIRENT_D_TYPE
|
||||
#undef HAVE_SYS_XATTR_H
|
||||
+#define HAVE_SYS_XATTR_H 0
|
||||
+#undef HAVE_SYS_EXTATTR_H
|
||||
+#define HAVE_SYS_EXTATTR_H 0
|
||||
#endif
|
||||
|
||||
using namespace KIO;
|
||||
--
|
||||
2.43.2
|
||||
|
||||
|
||||
From 59314cd4664257d427649469e8c3533d74253773 Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Sun, 10 Mar 2024 15:28:06 +1000
|
||||
Subject: Disable threads kio_file support for now. It's totally broken on
|
||||
OpenBSD and Haiku (https://bugs.kde.org/show_bug.cgi?id=463796)
|
||||
|
||||
|
||||
diff --git a/src/core/worker.cpp b/src/core/worker.cpp
|
||||
index 08c0938..3333ce2 100644
|
||||
--- a/src/core/worker.cpp
|
||||
+++ b/src/core/worker.cpp
|
||||
@@ -360,7 +360,7 @@ Worker *Worker::createWorker(const QString &protocol, const QUrl &url, int &erro
|
||||
const auto useThreads = []() {
|
||||
return qgetenv("KIO_ENABLE_WORKER_THREADS") != "0";
|
||||
};
|
||||
- static bool bUseThreads = useThreads();
|
||||
+ static bool bUseThreads = false;
|
||||
|
||||
// Threads have performance benefits, but degrade robustness
|
||||
// (a worker crashing kills the app). So let's only enable the feature for kio_file, for now.
|
||||
--
|
||||
2.43.2
|
||||
|
||||
Reference in New Issue
Block a user