]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Haiku build fixes
authorSchrijvers Luc <begasus@gmail.com>
Sat, 18 May 2024 10:48:41 +0000 (12:48 +0200)
committerFelix Ernst <felixernst@kde.org>
Tue, 21 May 2024 11:00:41 +0000 (11:00 +0000)
Co-authored-by: Gerasim Troeglazov <3dEyes@gmail.com>
CMakeLists.txt
src/dolphinviewcontainer.cpp
src/kitemviews/private/kdirectorycontentscounterworker.cpp

index 8ea347952141136a7197ae3658a1df492f1ba0ad..5a4018351bea911cf030a2f6bdd89900f9d8af98 100644 (file)
@@ -53,7 +53,7 @@ find_package(Qt6 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS
     DBus
 )
 
-if (UNIX AND NOT APPLE)
+if (UNIX AND NOT APPLE AND NOT HAIKU)
     set(HAVE_X11 TRUE)
 endif()
 
@@ -150,7 +150,7 @@ endif()
 
 # Compatibility with platforms without native fts (e.g. musl)
 check_include_files("sys/types.h;sys/stat.h;fts.h" HAVE_FTS_H)
-if(HAVE_FTS_H)
+if(HAVE_FTS_H AND NOT HAIKU)
     check_function_exists(fts_open HAVE_FTS_OPEN)
     if(NOT HAVE_FTS_OPEN)
         check_library_exists(fts fts_open "" HAVE_LIB_FTS)
index 6eff70f9becf79b5d3ca364c41623f9eaceb989d..1c962450471cdb639e70957c0acebbf8e20bc436 100644 (file)
@@ -106,7 +106,7 @@ DolphinViewContainer::DolphinViewContainer(const QUrl &url, QWidget *parent)
     m_messageWidget->setPosition(KMessageWidget::Header);
     m_messageWidget->hide();
 
-#ifndef Q_OS_WIN
+#if !defined(Q_OS_WIN) && !defined(Q_OS_HAIKU)
     if (getuid() == 0) {
         // We must be logged in as the root user; show a big scary warning
         showMessage(i18n("Running Dolphin as root can be dangerous. Please be careful."), Warning);
index 2d60091c66735865d9483e019e3ca62105962d56..57cf7b1bc743527b6ebd970019bfe091bb160799 100644 (file)
@@ -8,7 +8,7 @@
 #include "kdirectorycontentscounterworker.h"
 
 // Required includes for countDirectoryContents():
-#ifdef Q_OS_WIN
+#if defined(Q_OS_WIN) || defined(Q_OS_HAIKU)
 #include <QDir>
 #else
 #include <QElapsedTimer>
@@ -23,7 +23,7 @@ KDirectoryContentsCounterWorker::KDirectoryContentsCounterWorker(QObject *parent
     qRegisterMetaType<KDirectoryContentsCounterWorker::Options>();
 }
 
-#ifndef Q_OS_WIN
+#if !defined(Q_OS_WIN) && !defined(Q_OS_HAIKU)
 void KDirectoryContentsCounterWorker::walkDir(const QString &dirPath, bool countHiddenFiles, uint allowedRecursiveLevel)
 {
     QByteArray text = dirPath.toLocal8Bit();
@@ -138,7 +138,7 @@ void KDirectoryContentsCounterWorker::countDirectoryContents(const QString &path
 {
     const bool countHiddenFiles = options & CountHiddenFiles;
 
-#ifdef Q_OS_WIN
+#if defined(Q_OS_WIN) || defined(Q_OS_HAIKU)
     QDir dir(path);
     QDir::Filters filters = QDir::NoDotAndDotDot | QDir::System | QDir::AllEntries;
     if (countHiddenFiles) {