diff --git a/src/frameworks/CMakeLists.txt b/src/frameworks/CMakeLists.txt index faa702e72..95f951852 100644 --- a/src/frameworks/CMakeLists.txt +++ b/src/frameworks/CMakeLists.txt @@ -19,7 +19,7 @@ target_sources(openboard PRIVATE UBVersion.h ) -if(CMAKE_SYSTEM_NAME STREQUAL Linux) +if(CMAKE_SYSTEM_NAME MATCHES "FreeBSD|Linux") target_sources(openboard PRIVATE UBPlatformUtils_linux.cpp ) diff --git a/src/frameworks/UBPlatformUtils_linux.cpp b/src/frameworks/UBPlatformUtils_linux.cpp index 6dde5010b..e09690739 100644 --- a/src/frameworks/UBPlatformUtils_linux.cpp +++ b/src/frameworks/UBPlatformUtils_linux.cpp @@ -43,7 +43,9 @@ #include "core/UBSettings.h" #include "gui/UBMainWindow.h" +#ifndef Q_OS_FREEBSD static OnboardListener* listener = nullptr; +#endif void UBPlatformUtils::init() { @@ -94,7 +96,7 @@ QString UBPlatformUtils::applicationTemplateDirectory() void UBPlatformUtils::hideFile(const QString &filePath) { Q_UNUSED(filePath) - // TODO UB 4.x Not possible on Linux as such, the filename should have a . as first char in name + // TODO UB 4.x Not possible on FreeBSD and Linux as such, the filename should have a . as first char in name } void UBPlatformUtils::setFileType(const QString &filePath, unsigned long fileType) @@ -102,7 +104,7 @@ void UBPlatformUtils::setFileType(const QString &filePath, unsigned long fileTyp Q_UNUSED(filePath) Q_UNUSED(fileType) - // No fileType equivalent on Linux + // No fileType equivalent on FreeBSD and Linux } void UBPlatformUtils::fadeDisplayOut() @@ -478,14 +480,14 @@ QString UBPlatformUtils::urlFromClipboard() { QString qsRet; - // Not used on Linux + // Not used on FreeBSD and Linux return qsRet; } void UBPlatformUtils::setFrontProcess() { - // not used in Linux + // not used in FreeBSD and Linux } @@ -501,6 +503,10 @@ void UBPlatformUtils::showFullScreen(QWidget *pWidget) void UBPlatformUtils::showOSK(bool show) { +#ifdef Q_OS_FREEBSD + Q_UNUSED(show); + // No on-screen keyboard support on FreeBSD +#else if (show) { QDBusInterface dbus("org.onboard.Onboard", "/org/onboard/Onboard/Keyboard"); @@ -562,4 +568,5 @@ void OnboardListener::onboardPropertiesChanged(QString interface, QMaptrigger(); } } +#endif } diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index 7a9c3f12c..fe23b85d2 100644 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -95,7 +95,7 @@ target_sources(${PROJECT_NAME} PRIVATE UBZoomPalette.h ) -if(CMAKE_SYSTEM_NAME STREQUAL Linux) +if(CMAKE_SYSTEM_NAME MATCHES "FreeBSD|Linux") target_sources(openboard PRIVATE UBKeyboardPalette_linux.cpp ) diff --git a/src/podcast/UBPodcastController.cpp b/src/podcast/UBPodcastController.cpp index 442972898..eda53d02b 100644 --- a/src/podcast/UBPodcastController.cpp +++ b/src/podcast/UBPodcastController.cpp @@ -64,7 +64,7 @@ #elif defined(Q_OS_OSX) #include "ffmpeg/UBFFmpegVideoEncoder.h" #include "ffmpeg/UBMicrophoneInput.h" -#elif defined(Q_OS_LINUX) +#elif defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD) #include "ffmpeg/UBFFmpegVideoEncoder.h" #include "ffmpeg/UBMicrophoneInput.h" #endif @@ -315,7 +315,7 @@ void UBPodcastController::start() mVideoEncoder = new UBWindowsMediaVideoEncoder(this); //deleted on stop #elif defined(Q_OS_OSX) mVideoEncoder = new UBFFmpegVideoEncoder(this); -#elif defined(Q_OS_LINUX) +#elif defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD) mVideoEncoder = new UBFFmpegVideoEncoder(this); #endif @@ -780,7 +780,7 @@ QStringList UBPodcastController::audioRecordingDevices() devices = UBWaveRecorder::waveInDevices(); #elif defined(Q_OS_OSX) devices = UBMicrophoneInput::availableDevicesNames(); -#elif defined(Q_OS_LINUX) +#elif defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD) devices = UBMicrophoneInput::availableDevicesNames(); #endif diff --git a/src/web/UBEmbedController.cpp b/src/web/UBEmbedController.cpp index 114a986ab..90a00910b 100644 --- a/src/web/UBEmbedController.cpp +++ b/src/web/UBEmbedController.cpp @@ -150,7 +150,7 @@ void UBEmbedController::textChanged(const QString& newText) static const QRegularExpression regExp("[<>:\"/\\\\|?*]"); #endif -#ifdef Q_OS_LINUX // Defined on X11. +#if defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD) // Defined on X11. QString illegalCharList(" < > : \" / \\ | ? * "); static const QRegularExpression regExp("[<>:\"/\\\\|?*]"); #endif