https://github.com/nextcloud/desktop/commit/8a7771dd92afeac20716295aff25cf156a04f972

Index: src/gui/CMakeLists.txt
--- src/gui/CMakeLists.txt.orig
+++ src/gui/CMakeLists.txt
@@ -3,10 +3,6 @@ find_package(Qt${QT_MAJOR_VERSION} REQUIRED COMPONENTS
 find_package(KF6Archive REQUIRED)
 find_package(KF6GuiAddons)
 
-if (NOT TARGET Qt::GuiPrivate)
-    message(FATAL_ERROR "Could not find GuiPrivate component of Qt. It might be shipped as a separate package, please check that.")
-endif()
-
 if(CMAKE_BUILD_TYPE MATCHES Debug)
     add_definitions(-DQT_QML_DEBUG)
 endif()
@@ -552,7 +548,6 @@ target_link_libraries(nextcloudCore
   PUBLIC
   Nextcloud::sync
   Qt::Widgets
-  Qt::GuiPrivate
   Qt::Svg
   Qt::Network
   Qt::Xml
