Qt5: add debuginfo, node monitor support, disable AF_INET6 for new sockets

This commit is contained in:
Gerasim Troeglazov
2020-06-16 19:41:20 +10:00
parent b4c7fcaebc
commit 89040aaa92
2 changed files with 589 additions and 43 deletions

View File

@@ -1,4 +1,4 @@
From 72a1d6df493088dcc8afeb5739c95b00c0ad3e4d Mon Sep 17 00:00:00 2001
From f38755a1cb213c7808c426bba4b78ffca311c33d Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Mon, 11 Feb 2019 15:51:31 +1000
Subject: Fix Haiku build
@@ -49,10 +49,10 @@ index ab1da21..5d8617e 100644
|| OS(OPENBSD) \
|| OS(QNX) \
--
2.24.1
2.26.0
From 9faf753ec2a2bbeaf1589eacefa42fe53b97f256 Mon Sep 17 00:00:00 2001
From 3b4e6f985a16777f3b44b39ac88c0a4511770bf4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= <revol@free.fr>
Date: Mon, 11 Feb 2019 15:53:20 +1000
Subject: Add filteredDeviceFilePaths for Haiku's /dev/ports/*
@@ -84,10 +84,10 @@ index 105d10a..80932e9 100644
deviceDir.setNameFilters(deviceFileNameFilterList);
deviceDir.setFilter(QDir::Files | QDir::System | QDir::NoSymLinks);
--
2.24.1
2.26.0
From 046dfb7d983844ed34061a7a313c73233123f719 Mon Sep 17 00:00:00 2001
From 8460e088f611ade3c0359996a9290603a88a00d3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= <revol@free.fr>
Date: Mon, 11 Feb 2019 15:53:49 +1000
Subject: Make sure libs are searched in the develop/ dir by CMake
@@ -95,7 +95,7 @@ Subject: Make sure libs are searched in the develop/ dir by CMake
Static libs at least are not in the lib[/x86] dirs...
diff --git a/qtbase/mkspecs/features/create_cmake.prf b/qtbase/mkspecs/features/create_cmake.prf
index 346fbf2..74ad489 100644
index 24ed125..52f637e 100644
--- a/qtbase/mkspecs/features/create_cmake.prf
+++ b/qtbase/mkspecs/features/create_cmake.prf
@@ -112,6 +112,9 @@ win32:!static:!staticlib {
@@ -109,17 +109,17 @@ index 346fbf2..74ad489 100644
CMAKE_DLL_DIR = $$CMAKE_LIB_DIR
CMAKE_DLL_DIR_IS_ABSOLUTE = $$CMAKE_LIB_DIR_IS_ABSOLUTE
--
2.24.1
2.26.0
From 7a6a340de9f96fd30a30d0276ffe00eafb9f0ba4 Mon Sep 17 00:00:00 2001
From f1d08b2e105efc4b1f8bbca2b0e982c26b9f53e4 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Mon, 11 Feb 2019 15:55:08 +1000
Subject: Disable built-in haiku QPA plugin
diff --git a/qtbase/src/plugins/platforms/platforms.pro b/qtbase/src/plugins/platforms/platforms.pro
index c4f2b30..408d05c 100644
index 23f838a..8ef1812 100644
--- a/qtbase/src/plugins/platforms/platforms.pro
+++ b/qtbase/src/plugins/platforms/platforms.pro
@@ -42,10 +42,6 @@ freebsd {
@@ -134,10 +134,10 @@ index c4f2b30..408d05c 100644
qtConfig(integrityfb): SUBDIRS += integrity
--
2.24.1
2.26.0
From 66bb86e7716e7da580ba9b0b8d001ebb0cd1e250 Mon Sep 17 00:00:00 2001
From e2af0cb5161740492f597a5770f5c1fd28d00028 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Mon, 11 Feb 2019 15:55:38 +1000
Subject: disable mapbox-gl-native on Haiku.
@@ -157,10 +157,10 @@ index b81ad34..7b642c0 100644
warning("Submodule mapbox-gl-native does not exist. Run 'git submodule update --init' on qtlocation.")
} else {
--
2.24.1
2.26.0
From 3b5b9974d32908e3dec7fdea738396adf97a9571 Mon Sep 17 00:00:00 2001
From 4d396be95955acc290e59f33d0c4c28217a99d1c Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Mon, 11 Feb 2019 15:56:12 +1000
Subject: Fix QStandartPaths for Haiku
@@ -220,20 +220,20 @@ index 044d69f..1f255a9 100644
case GenericConfigLocation:
paths += haikuStandardPath(B_SYSTEM_SETTINGS_DIRECTORY);
--
2.24.1
2.26.0
From cdb559d0fd25be878365a09dc25b7f41da20cd5c Mon Sep 17 00:00:00 2001
From bbbcaf6e5924888d42b22917c0faa39be3edada2 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Mon, 11 Feb 2019 15:56:39 +1000
Subject: QSslSocketPrivate::unixRootCertDirectories(): add ssl path for Haiku.
diff --git a/qtbase/src/network/ssl/qsslsocket.cpp b/qtbase/src/network/ssl/qsslsocket.cpp
index e302aa1..d4a96ba 100644
index f411732..2b6043b 100644
--- a/qtbase/src/network/ssl/qsslsocket.cpp
+++ b/qtbase/src/network/ssl/qsslsocket.cpp
@@ -2875,6 +2875,7 @@ QList<QByteArray> QSslSocketPrivate::unixRootCertDirectories()
@@ -2953,6 +2953,7 @@ QList<QByteArray> QSslSocketPrivate::unixRootCertDirectories()
<< "/usr/local/ssl/certs/" // Solaris
<< "/etc/openssl/certs/" // BlackBerry
<< "/opt/openssl/certs/" // HP-UX
@@ -242,10 +242,10 @@ index e302aa1..d4a96ba 100644
}
--
2.24.1
2.26.0
From a9f9fa580272224d81fb3e5a9d0b7c3070fd2008 Mon Sep 17 00:00:00 2001
From b1897e69749cbe1fd4b47b392a4b312970deb4b6 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Mon, 11 Feb 2019 15:56:59 +1000
Subject: Fix build for Haiku platform
@@ -265,10 +265,10 @@ index 03612e5..866ad17 100644
# or gold under Linux) will not print any library search path. Need to use another
# invocation with different options (which in turn doesn't print include search
--
2.24.1
2.26.0
From b009ddf96fa235739d0446a24324d455d1de28a3 Mon Sep 17 00:00:00 2001
From 94636193a68fab34925d3f48e50b6b31a38281eb Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Mon, 11 Feb 2019 15:57:25 +1000
Subject: Fix build qt3d zip module
@@ -288,10 +288,10 @@ index 2e4e223..6436df5 100644
#include <utime.h>
#endif
--
2.24.1
2.26.0
From 502d66bc4bc8c985d25839bfb6f5c7ae1914f58d Mon Sep 17 00:00:00 2001
From a7b2f53d56e5aedb5a815d9fd834cd2bee378bfa Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Mon, 11 Feb 2019 15:57:54 +1000
Subject: Fix endian detection
@@ -315,10 +315,10 @@ index 9bb306e..9f0ea58 100644
# endif
# endif
--
2.24.1
2.26.0
From 6c841a9856e0c5b25631b82f0e2afaea4cb6acb4 Mon Sep 17 00:00:00 2001
From df5fb3342ab4226512e8628f9468a91560d54f28 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Sat, 27 Apr 2019 17:47:23 +1000
Subject: Add dnslookup query function for Haiku
@@ -403,10 +403,10 @@ index 0000000..0b387df
+
+QT_END_NAMESPACE
--
2.24.1
2.26.0
From 4feab77c35a69b97fa3c4d2727c30a711f97df9f Mon Sep 17 00:00:00 2001
From ab809e037c7086dbe5e36e9c9c75a15aa4aed8b8 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Wed, 27 May 2020 19:54:30 +1000
Subject: Disable LibResolv for Haiku
@@ -429,7 +429,7 @@ index 625fbab..8e1dce7 100644
2.26.0
From de33269cc3951365f6313d5aa9273a16570c6a65 Mon Sep 17 00:00:00 2001
From a7454336904e36c3a750063ff93a94eddbff919d Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Sun, 8 Sep 2019 00:17:19 +1000
Subject: Don't use ifaddrs for Haiku
@@ -449,17 +449,17 @@ index 4c57bff..0c8e38f 100644
#endif
--
2.24.1
2.26.0
From 603e6f9281ac458cee016cf8540880bf868607aa Mon Sep 17 00:00:00 2001
From f87d010714539a5437231b5fa4735713f1d89d29 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Sun, 8 Sep 2019 18:32:05 +1000
Subject: Add platform plugins installer
diff --git a/qtbase/src/gui/gui.pro b/qtbase/src/gui/gui.pro
index 45c8c05..8c101d4 100644
index 6e92283..c528ed3 100644
--- a/qtbase/src/gui/gui.pro
+++ b/qtbase/src/gui/gui.pro
@@ -34,6 +34,7 @@ testcocoon {
@@ -471,7 +471,7 @@ index 45c8c05..8c101d4 100644
CONFIG += simd optimize_full
diff --git a/qtbase/src/gui/kernel/qguiapplication.cpp b/qtbase/src/gui/kernel/qguiapplication.cpp
index 54f3996..bf37f28 100644
index 13369dc..cd9c393 100644
--- a/qtbase/src/gui/kernel/qguiapplication.cpp
+++ b/qtbase/src/gui/kernel/qguiapplication.cpp
@@ -116,6 +116,11 @@
@@ -486,7 +486,7 @@ index 54f3996..bf37f28 100644
#ifdef Q_OS_WASM
#include <emscripten.h>
#endif
@@ -1219,6 +1224,27 @@ static void init_platform(const QString &pluginNamesWithArguments, const QString
@@ -1245,6 +1250,27 @@ static void init_platform(const QString &pluginNamesWithArguments, const QString
if (!availablePlugins.isEmpty())
fatalMessage += QStringLiteral("\nAvailable platform plugins are: %1.\n").arg(availablePlugins.join(QLatin1String(", ")));
@@ -515,17 +515,17 @@ index 54f3996..bf37f28 100644
// Windows: Display message box unless it is a console application
// or debug build showing an assert box.
--
2.24.1
2.26.0
From 8e4435b73ebe67a37a8a9e7be5eea431ee4df091 Mon Sep 17 00:00:00 2001
From 0fab7538b3004cf69673b245bc6c817b243d4516 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Sun, 15 Dec 2019 11:27:19 +1000
Subject: Enable assembler for JIT
diff --git a/qtdeclarative/src/qml/jit/qv4assemblercommon_p.h b/qtdeclarative/src/qml/jit/qv4assemblercommon_p.h
index b18d082..0c3bb81 100644
index ead1e75..58d9635 100644
--- a/qtdeclarative/src/qml/jit/qv4assemblercommon_p.h
+++ b/qtdeclarative/src/qml/jit/qv4assemblercommon_p.h
@@ -66,7 +66,7 @@ namespace QV4 {
@@ -538,10 +538,10 @@ index b18d082..0c3bb81 100644
class PlatformAssembler_X86_64_SysV : public JSC::MacroAssembler<JSC::MacroAssemblerX86_64>
{
--
2.24.1
2.26.0
From 91bec7d81d4e8fe49fb13a1fd20ef36352beb9ef Mon Sep 17 00:00:00 2001
From dbcaaf1fd39649df2cfb4b1f43cc5fe7ca57fde2 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Wed, 27 May 2020 19:54:58 +1000
Subject: Disable sharedmemory feature for bootstrap
@@ -565,17 +565,17 @@ index c212ccb..1a31b62 100644
2.26.0
From ec29bb4e065ca75a43cb32c63119131b1348a6e3 Mon Sep 17 00:00:00 2001
From 5d0e765a448dc5c16b5ec4ab879f370238615834 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Sun, 29 Dec 2019 18:13:19 +1000
Subject: Fix build for x86_gcc2
diff --git a/qtbase/src/3rdparty/forkfd/forkfd.c b/qtbase/src/3rdparty/forkfd/forkfd.c
index e4f3bd8..a57553f 100644
index 50784de..d5a2f6e 100644
--- a/qtbase/src/3rdparty/forkfd/forkfd.c
+++ b/qtbase/src/3rdparty/forkfd/forkfd.c
@@ -683,7 +683,7 @@ int forkfd(int flags, pid_t *ppid)
@@ -725,7 +725,7 @@ int forkfd(int flags, pid_t *ppid)
/* parent process */
info->deathPipe = death_pipe[1];
fd = death_pipe[0];
@@ -585,5 +585,428 @@ index e4f3bd8..a57553f 100644
/* release the child */
#ifdef HAVE_EVENTFD
--
2.24.1
2.26.0
From 3778e64b217d5d8f0b3a270a0b7ef3907ecee25e Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Thu, 4 Jun 2020 23:11:17 +1000
Subject: Implement QFilesystemWatcher for Haiku
diff --git a/qtbase/src/corelib/io/io.pri b/qtbase/src/corelib/io/io.pri
index a33ffe7..91190d4 100644
--- a/qtbase/src/corelib/io/io.pri
+++ b/qtbase/src/corelib/io/io.pri
@@ -96,6 +96,9 @@ qtConfig(filesystemwatcher) {
} else:macos {
OBJECTIVE_SOURCES += io/qfilesystemwatcher_fsevents.mm
HEADERS += io/qfilesystemwatcher_fsevents_p.h
+ } else:haiku {
+ SOURCES += io/qfilesystemwatcher_haiku.cpp
+ HEADERS += io/qfilesystemwatcher_haiku_p.h
} else:qtConfig(inotify) {
SOURCES += io/qfilesystemwatcher_inotify.cpp
HEADERS += io/qfilesystemwatcher_inotify_p.h
diff --git a/qtbase/src/corelib/io/qfilesystemwatcher.cpp b/qtbase/src/corelib/io/qfilesystemwatcher.cpp
index 96d9210..f6147de 100644
--- a/qtbase/src/corelib/io/qfilesystemwatcher.cpp
+++ b/qtbase/src/corelib/io/qfilesystemwatcher.cpp
@@ -54,6 +54,8 @@
#include "qfilesystemwatcher_polling_p.h"
#if defined(Q_OS_WIN)
# include "qfilesystemwatcher_win_p.h"
+#elif defined(Q_OS_HAIKU)
+# include "qfilesystemwatcher_haiku_p.h"
#elif defined(USE_INOTIFY)
# include "qfilesystemwatcher_inotify_p.h"
#elif defined(Q_OS_FREEBSD) || defined(Q_OS_NETBSD) || defined(Q_OS_OPENBSD) || defined(QT_PLATFORM_UIKIT)
@@ -73,6 +75,8 @@ QFileSystemWatcherEngine *QFileSystemWatcherPrivate::createNativeEngine(QObject
{
#if defined(Q_OS_WIN)
return new QWindowsFileSystemWatcherEngine(parent);
+#elif defined(Q_OS_HAIKU)
+ return new QHaikuFileSystemWatcherEngine(parent);
#elif defined(USE_INOTIFY)
// there is a chance that inotify may fail on Linux pre-2.6.13 (August
// 2005), so we can't just new inotify directly.
diff --git a/qtbase/src/corelib/io/qfilesystemwatcher_haiku.cpp b/qtbase/src/corelib/io/qfilesystemwatcher_haiku.cpp
new file mode 100644
index 0000000..8355ca8
--- /dev/null
+++ b/qtbase/src/corelib/io/qfilesystemwatcher_haiku.cpp
@@ -0,0 +1,254 @@
+/****************************************************************************
+**
+** Copyright (C) 2020 The Qt Company Ltd.
+** Copyright (C) 2015-2020 Gerasim Troeglazov,
+** Contact: 3dEyes@gmail.com
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+****************************************************************************/
+
+#include "qfilesystemwatcher_haiku_p.h"
+#include <QtCore/qscopeguard.h>
+#include <QtCore/qtimer.h>
+#include <QDebug>
+
+QT_BEGIN_NAMESPACE
+
+QHaikuFileWatcher::QHaikuFileWatcher() : QObject(), BLooper() {};
+QHaikuDirWatcher::QHaikuDirWatcher() : QObject(), BLooper() {};
+
+QHaikuFileSystemWatcherEngine::QHaikuFileSystemWatcherEngine(QObject *parent)
+ : QFileSystemWatcherEngine(parent)
+{
+ fileLooper = new QHaikuFileWatcher();
+ connect(fileLooper, SIGNAL(fileChanged(const QString &, bool)), SLOT(bfsFileChanged(const QString &, bool)));
+ fileLooper->Run();
+
+ dirLooper = new QHaikuDirWatcher();
+ connect(dirLooper, SIGNAL(directoryChanged(const QString &, bool)), SLOT(bfsDirectoryChanged(const QString &, bool)));
+ dirLooper->Run();
+}
+
+QHaikuFileSystemWatcherEngine::~QHaikuFileSystemWatcherEngine()
+{
+ stop_watching(fileLooper);
+ if (fileLooper->Lock())
+ fileLooper->Quit();
+
+ stop_watching(dirLooper);
+ if (dirLooper->Lock())
+ dirLooper->Quit();
+}
+
+QStringList QHaikuFileSystemWatcherEngine::addPaths(const QStringList &paths,
+ QStringList *files,
+ QStringList *directories)
+{
+ QStringList unhandled;
+ for (const QString &path : paths) {
+ QFileInfo fi(path);
+ bool isDir = fi.isDir();
+ auto sg = qScopeGuard([&]{ unhandled.push_back(path); });
+ if (isDir) {
+ if (directories->contains(path))
+ continue;
+ } else {
+ if (files->contains(path))
+ continue;
+ }
+
+ BEntry entry(path.toUtf8().constData());
+ if (!entry.Exists())
+ continue;
+
+ node_ref nref;
+ entry.GetNodeRef(&nref);
+ status_t status = isDir ?
+ watch_node(&nref, (B_WATCH_NAME | B_WATCH_ATTR | B_WATCH_STAT | B_WATCH_DIRECTORY), dirLooper):
+ watch_node(&nref, (B_WATCH_NAME | B_WATCH_ATTR | B_WATCH_STAT), fileLooper);
+
+ if (status != B_OK) {
+ qWarning("watch_node(%ls) failed:", path.constData());
+ continue;
+ }
+
+ sg.dismiss();
+
+ if (isDir)
+ directories->append(path);
+ else
+ files->append(path);
+ }
+ return unhandled;
+}
+
+QStringList QHaikuFileSystemWatcherEngine::removePaths(const QStringList &paths,
+ QStringList *files,
+ QStringList *directories)
+{
+ QStringList unhandled;
+ for (const QString &path : paths) {
+ auto sg = qScopeGuard([&]{ unhandled.push_back(path); });
+
+ BEntry entry(path.toUtf8().constData());
+ node_ref nref;
+ entry.GetNodeRef(&nref);
+
+ if (directories->contains(path)) {
+ directories->removeAll(path);
+ status_t status = watch_node(&nref, B_STOP_WATCHING, dirLooper);
+ } else if (files->contains(path)) {
+ files->removeAll(path);
+ status_t status = watch_node(&nref, B_STOP_WATCHING, fileLooper);
+ } else {
+ continue;
+ }
+
+ sg.dismiss();
+ }
+
+ return unhandled;
+}
+
+void
+QHaikuDirWatcher::MessageReceived(BMessage* message)
+{
+ if (message->what == B_NODE_MONITOR) {
+ int32 opcode;
+
+ if (message->FindInt32("opcode", &opcode) != B_OK)
+ return;
+
+ switch (opcode) {
+ case B_ENTRY_MOVED:
+ {
+ int32 device = 0;
+ int64 srcFolder = 0;
+ int64 dstFolder = 0;
+ const char* name = NULL;
+ if (message->FindInt32("device", &device) != B_OK
+ || message->FindInt64("to directory", &dstFolder) != B_OK
+ || message->FindInt64("from directory", &srcFolder) != B_OK
+ || message->FindString("name", &name) != B_OK)
+ break;
+
+ entry_ref ref(device, srcFolder, name);
+ BEntry entry(&ref);
+
+ BEntry dirEntry;
+ entry.GetParent(&dirEntry);
+
+ BPath path;
+ dirEntry.GetPath(&path);
+
+ QString qpath = QString::fromUtf8(path.Path());
+
+ emit directoryChanged(qpath, false);
+ }
+ break;
+ case B_ENTRY_CREATED:
+ case B_ENTRY_REMOVED:
+ {
+ int64 directory;
+ int32 device;
+ int64 node;
+ const char *name;
+ if (message->FindInt64("directory", &directory) != B_OK
+ || message->FindInt32("device", &device) != B_OK
+ || message->FindInt64("node", &node) != B_OK
+ || message->FindString("name", &name) != B_OK)
+ break;
+
+ entry_ref ref(device, directory, name);
+ BEntry entry(&ref);
+ BEntry dirEntry;
+ entry.GetParent(&dirEntry);
+
+ BPath path;
+ dirEntry.GetPath(&path);
+
+ QString qpath = QString::fromUtf8(path.Path());
+ emit directoryChanged(qpath, opcode == B_ENTRY_REMOVED);
+ }
+ break;
+ }
+ }
+}
+
+void
+QHaikuFileWatcher::MessageReceived(BMessage* message)
+{
+ if (message->what == B_NODE_MONITOR) {
+ int32 opcode;
+ node_ref nref;
+ const char *name;
+
+ if (message->FindInt32("opcode", &opcode) != B_OK)
+ return;
+
+ switch (opcode) {
+ case B_ENTRY_MOVED:
+ {
+ int32 device = 0;
+ int64 srcFolder = 0;
+ int64 dstFolder = 0;
+ const char* name = NULL;
+ if (message->FindInt32("device", &device) != B_OK
+ || message->FindInt64("to directory", &dstFolder) != B_OK
+ || message->FindInt64("from directory", &srcFolder) != B_OK
+ || message->FindString("name", &name) != B_OK)
+ break;
+
+ entry_ref ref(device, srcFolder, name);
+ BEntry entry(&ref);
+
+ BPath path;
+ entry.GetPath(&path);
+
+ QString qpath = QString::fromUtf8(path.Path());
+
+ emit fileChanged(qpath, false);
+ }
+ break;
+ case B_STAT_CHANGED:
+ case B_ATTR_CHANGED:
+ BString path;
+ if (message->FindString("path", &path) == B_OK) {
+ QString qpath = QString::fromUtf8(path.String());
+
+ QFileInfo fi(qpath);
+ if (!fi.exists())
+ emit fileChanged(qpath, true);
+ else
+ emit fileChanged(qpath, false);
+ }
+ break;
+ }
+ }
+}
+
+void
+QHaikuFileSystemWatcherEngine::bfsDirectoryChanged(const QString &path, bool removed)
+{
+ emit directoryChanged(path, removed);
+}
+
+void
+QHaikuFileSystemWatcherEngine::bfsFileChanged(const QString &path, bool removed)
+{
+ emit fileChanged(path, removed);
+}
+
+QT_END_NAMESPACE
+
+#include "moc_qfilesystemwatcher_haiku_p.cpp"
diff --git a/qtbase/src/corelib/io/qfilesystemwatcher_haiku_p.h b/qtbase/src/corelib/io/qfilesystemwatcher_haiku_p.h
new file mode 100644
index 0000000..8a8d75a
--- /dev/null
+++ b/qtbase/src/corelib/io/qfilesystemwatcher_haiku_p.h
@@ -0,0 +1,84 @@
+/****************************************************************************
+**
+** Copyright (C) 2020 The Qt Company Ltd.
+** Copyright (C) 2015-2020 Gerasim Troeglazov,
+** Contact: 3dEyes@gmail.com
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+****************************************************************************/
+
+#ifndef QFILESYSTEMWATCHER_HAIKU_P_H
+#define QFILESYSTEMWATCHER_HAIKU_P_H
+
+#include <QtCore/qfileinfo.h>
+#include <QtCore/qmutex.h>
+#include <QtCore/qdatetime.h>
+#include <QtCore/qdir.h>
+#include <QtCore/qtimer.h>
+#include <QtCore/qhash.h>
+
+#include <Application.h>
+#include <NodeMonitor.h>
+#include <Looper.h>
+#include <String.h>
+#include <Autolock.h>
+#include <Handler.h>
+#include <Entry.h>
+#include <Path.h>
+
+#include "qfilesystemwatcher_p.h"
+
+QT_REQUIRE_CONFIG(filesystemwatcher);
+QT_BEGIN_NAMESPACE
+
+class QHaikuDirWatcher : public QObject, public BLooper {
+ Q_OBJECT
+public:
+ QHaikuDirWatcher();
+ virtual void MessageReceived(BMessage* msg);
+Q_SIGNALS:
+ void directoryChanged(const QString &path, bool removed);
+};
+
+class QHaikuFileWatcher : public QObject, public BLooper {
+ Q_OBJECT
+public:
+ QHaikuFileWatcher();
+ virtual void MessageReceived(BMessage* msg);
+Q_SIGNALS:
+ void fileChanged(const QString &path, bool removed);
+};
+
+class QHaikuFileSystemWatcherEngine : public QFileSystemWatcherEngine
+{
+ Q_OBJECT
+
+public:
+ QHaikuFileSystemWatcherEngine(QObject *parent);
+ ~QHaikuFileSystemWatcherEngine();
+
+ QStringList addPaths(const QStringList &paths, QStringList *files, QStringList *directories) override;
+ QStringList removePaths(const QStringList &paths, QStringList *files, QStringList *directories) override;
+
+private:
+ QHaikuDirWatcher *dirLooper;
+ QHaikuFileWatcher *fileLooper;
+
+private Q_SLOTS:
+ void bfsDirectoryChanged(const QString &path, bool removed);
+ void bfsFileChanged(const QString &path, bool removed);
+};
+
+QT_END_NAMESPACE
+#endif // QFILESYSTEMWATCHER_HAIKU_P_H
+
--
2.26.0
From a2c015a07be61f1fff74a8ed584b6075d3ce548e Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Tue, 16 Jun 2020 18:06:57 +1000
Subject: Don't use AF_INET6 for new sockets
diff --git a/qtbase/src/network/socket/qnativesocketengine_unix.cpp b/qtbase/src/network/socket/qnativesocketengine_unix.cpp
index e5b9fbb..a1b1fc4 100644
--- a/qtbase/src/network/socket/qnativesocketengine_unix.cpp
+++ b/qtbase/src/network/socket/qnativesocketengine_unix.cpp
@@ -265,8 +265,12 @@ bool QNativeSocketEnginePrivate::createNewSocket(QAbstractSocket::SocketType soc
}
int protocol = 0;
#endif // QT_NO_SCTP
+#ifdef Q_OS_HAIKU
+ int domain = AF_INET;
+#else
int domain = (socketProtocol == QAbstractSocket::IPv6Protocol
|| socketProtocol == QAbstractSocket::AnyIPProtocol) ? AF_INET6 : AF_INET;
+#endif
int type = (socketType == QAbstractSocket::UdpSocket) ? SOCK_DGRAM : SOCK_STREAM;
int socket = qt_safe_socket(domain, type, protocol, O_NONBLOCK);
--
2.26.0

View File

@@ -8,7 +8,7 @@ COPYRIGHT="2015-2020 The Qt Company Ltd."
LICENSE="GNU LGPL v2.1
GNU LGPL v3
FDL"
REVISION="1"
REVISION="2"
SOURCE_URI="https://download.qt.io/official_releases/qt/${portVersion%.*}/$portVersion/single/qt-everywhere-src-$portVersion.tar.xz"
CHECKSUM_SHA256="22b63d7a7a45183865cc4141124f12b673e7a17b1fe2b91e433f6547c5d548c3"
SOURCE_DIR="qt-everywhere-src-$portVersion"
@@ -436,6 +436,129 @@ BUILD_PREREQUIRES="
cmd:which
"
defineDebugInfoPackage qt5$secondaryArchSuffix \
"$libDir"/libQt5Concurrent.so.$portVersion \
"$libDir"/libQt5Core.so.$portVersion \
"$libDir"/libQt5DBus.so.$portVersion \
"$libDir"/libQt5EglFSDeviceIntegration.so.$portVersion \
"$libDir"/libQt5Gui.so.$portVersion \
"$libDir"/libQt5Network.so.$portVersion \
"$libDir"/libQt5OpenGL.so.$portVersion \
"$libDir"/libQt5PrintSupport.so.$portVersion \
"$libDir"/libQt5Sql.so.$portVersion \
"$libDir"/libQt5Test.so.$portVersion \
"$libDir"/libQt5Widgets.so.$portVersion \
"$libDir"/libQt5Xml.so.$portVersion \
"$libDir"/libQt53DAnimation.so.$portVersion \
"$libDir"/libQt53DCore.so.$portVersion \
"$libDir"/libQt53DExtras.so.$portVersion \
"$libDir"/libQt53DInput.so.$portVersion \
"$libDir"/libQt53DLogic.so.$portVersion \
"$libDir"/libQt53DQuick.so.$portVersion \
"$libDir"/libQt53DQuickAnimation.so.$portVersion \
"$libDir"/libQt53DQuickExtras.so.$portVersion \
"$libDir"/libQt53DQuickInput.so.$portVersion \
"$libDir"/libQt53DQuickRender.so.$portVersion \
"$libDir"/libQt53DQuickScene2D.so.$portVersion \
"$libDir"/libQt53DRender.so.$portVersion \
"$libDir"/libQt5Charts.so.$portVersion \
"$libDir"/libQt5Bluetooth.so.$portVersion \
"$libDir"/libQt5Nfc.so.$portVersion \
"$libDir"/libQt5DataVisualization.so.$portVersion \
"$libDir"/libQt5Qml.so.$portVersion \
"$libDir"/libQt5QmlModels.so.$portVersion \
"$libDir"/libQt5QmlWorkerScript.so.$portVersion \
"$libDir"/libQt5Quick.so.$portVersion \
"$libDir"/libQt5Quick3D.so.$portVersion \
"$libDir"/libQt5Quick3DAssetImport.so.$portVersion \
"$libDir"/libQt5Quick3DRender.so.$portVersion \
"$libDir"/libQt5Quick3DRuntimeRender.so.$portVersion \
"$libDir"/libQt5Quick3DUtils.so.$portVersion \
"$libDir"/libQt5QuickControls2.so.$portVersion \
"$libDir"/libQt5QuickParticles.so.$portVersion \
"$libDir"/libQt5QuickShapes.so.$portVersion \
"$libDir"/libQt5QuickTemplates2.so.$portVersion \
"$libDir"/libQt5QuickTest.so.$portVersion \
"$libDir"/libQt5QuickWidgets.so.$portVersion \
"$libDir"/libQt5Gamepad.so.$portVersion \
"$libDir"/libQt5Location.so.$portVersion \
"$libDir"/libQt5Positioning.so.$portVersion \
"$libDir"/libQt5PositioningQuick.so.$portVersion \
"$libDir"/libQt5Bodymovin.so.$portVersion \
"$libDir"/libQt5Multimedia.so.$portVersion \
"$libDir"/libQt5MultimediaGstTools.so.$portVersion \
"$libDir"/libQt5MultimediaQuick.so.$portVersion \
"$libDir"/libQt5MultimediaWidgets.so.$portVersion \
"$libDir"/libQt5NetworkAuth.so.$portVersion \
"$libDir"/libQt5Purchasing.so.$portVersion \
"$libDir"/libQt5RemoteObjects.so.$portVersion \
"$libDir"/libQt5Script.so.$portVersion \
"$libDir"/libQt5ScriptTools.so.$portVersion \
"$libDir"/libQt5Scxml.so.$portVersion \
"$libDir"/libQt5Sensors.so.$portVersion \
"$libDir"/libQt5SerialBus.so.$portVersion \
"$libDir"/libQt5SerialPort.so.$portVersion \
"$libDir"/libQt5TextToSpeech.so.$portVersion \
"$libDir"/libQt5Svg.so.$portVersion \
"$libDir"/libQt5Help.so.$portVersion \
"$libDir"/libQt5Designer.so.$portVersion \
"$libDir"/libQt5DesignerComponents.so.$portVersion \
"$libDir"/libQt5VirtualKeyboard.so.$portVersion \
"$libDir"/libQt5WebChannel.so.$portVersion \
"$libDir"/libQt5WebSockets.so.$portVersion \
"$libDir"/libQt5XmlPatterns.so.$portVersion \
"$libDir"/libQt5WebView.so.$portVersion \
"$(getPackagePrefix tools)/$relativeAppsDir/Qt5"/Assistant \
"$(getPackagePrefix tools)/$relativeAppsDir/Qt5"/Designer \
"$(getPackagePrefix tools)/$relativeAppsDir/Qt5"/Linguist \
"$(getPackagePrefix tools)/$relativeAppsDir/Qt5"/QDBusViewer \
"$(getPackagePrefix tools)/$relativeAppsDir/Qt5"/qdoc \
"$(getPackagePrefix tools)/$relativeBinDir"/lconvert \
"$(getPackagePrefix tools)/$relativeBinDir"/lprodump \
"$(getPackagePrefix tools)/$relativeBinDir"/lrelease \
"$(getPackagePrefix tools)/$relativeBinDir"/lrelease-pro \
"$(getPackagePrefix tools)/$relativeBinDir"/lupdate \
"$(getPackagePrefix tools)/$relativeBinDir"/lupdate-pro \
"$(getPackagePrefix tools)/$relativeBinDir"/pixeltool \
"$(getPackagePrefix tools)/$relativeBinDir"/qcollectiongenerator \
"$(getPackagePrefix tools)/$relativeBinDir"/qdbus \
"$(getPackagePrefix tools)/$relativeBinDir"/qdbuscpp2xml \
"$(getPackagePrefix tools)/$relativeBinDir"/qdbusxml2cpp \
"$(getPackagePrefix tools)/$relativeBinDir"/qdistancefieldgenerator \
"$(getPackagePrefix tools)/$relativeBinDir"/qhelpgenerator \
"$(getPackagePrefix tools)/$relativeBinDir"/qtattributionsscanner \
"$(getPackagePrefix tools)/$relativeBinDir"/qtdiag \
"$(getPackagePrefix tools)/$relativeBinDir"/qtpaths \
"$(getPackagePrefix tools)/$relativeBinDir"/qtplugininfo \
"$(getPackagePrefix devel)/$relativeBinDir"/balsam \
"$(getPackagePrefix devel)/$relativeBinDir"/canbusutil \
"$(getPackagePrefix devel)/$relativeBinDir"/meshdebug \
"$(getPackagePrefix devel)/$relativeBinDir"/moc \
"$(getPackagePrefix devel)/$relativeBinDir"/qgltf \
"$(getPackagePrefix devel)/$relativeBinDir"/qlalr \
"$(getPackagePrefix devel)/$relativeBinDir"/qmake \
"$(getPackagePrefix devel)/$relativeBinDir"/qml \
"$(getPackagePrefix devel)/$relativeBinDir"/qmlcachegen \
"$(getPackagePrefix devel)/$relativeBinDir"/qmleasing \
"$(getPackagePrefix devel)/$relativeBinDir"/qmlformat \
"$(getPackagePrefix devel)/$relativeBinDir"/qmlimportscanner \
"$(getPackagePrefix devel)/$relativeBinDir"/qmllint \
"$(getPackagePrefix devel)/$relativeBinDir"/qmlmin \
"$(getPackagePrefix devel)/$relativeBinDir"/qmlplugindump \
"$(getPackagePrefix devel)/$relativeBinDir"/qmlprofiler \
"$(getPackagePrefix devel)/$relativeBinDir"/qmlpreview \
"$(getPackagePrefix devel)/$relativeBinDir"/qmlscene \
"$(getPackagePrefix devel)/$relativeBinDir"/qmltestrunner \
"$(getPackagePrefix devel)/$relativeBinDir"/qmltyperegistrar \
"$(getPackagePrefix devel)/$relativeBinDir"/qscxmlc \
"$(getPackagePrefix devel)/$relativeBinDir"/qvkgen \
"$(getPackagePrefix devel)/$relativeBinDir"/rcc \
"$(getPackagePrefix devel)/$relativeBinDir"/repc \
"$(getPackagePrefix devel)/$relativeBinDir"/tracegen \
"$(getPackagePrefix devel)/$relativeBinDir"/uic \
"$(getPackagePrefix devel)/$relativeBinDir"/xmlpatterns \
"$(getPackagePrefix devel)/$relativeBinDir"/xmlpatternsvalidator
BUILD()
{
export LLVM_INSTALL_DIR="$(llvm-config --prefix)"