From 08f229288165e1e7c87726246ded4117b33a0a3b Mon Sep 17 00:00:00 2001 From: Julien Wadel Date: Thu, 30 Oct 2025 17:40:03 +0100 Subject: [PATCH] Remove Core5Compat dependency and use our own opacity implementation. (cherry picked from commit 229fbe1713d573d740e6796612d5a90b65f07390) --- CMakeLists.txt | 2 +- Linphone/CMakeLists.txt | 2 +- Linphone/data/CMakeLists.txt | 1 + .../view/Control/Display/MediaProgressBar.qml | 16 +++++++++++----- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bc705a0c9..e1946b3e5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -206,7 +206,7 @@ set(ENABLE_CSHARP_WRAPPER OFF CACHE BOOL "Build the CSharp wrapper for Liblinpho set(ENABLE_THEORA OFF) set(ENABLE_QT_GL ${ENABLE_VIDEO}) -find_package(Qt6 REQUIRED COMPONENTS Core Quick Widgets Core5Compat) +find_package(Qt6 REQUIRED COMPONENTS Core Quick Widgets) if(NOT Qt6_FOUND) message(FATAL_ERROR "Minimum supported Qt6!") diff --git a/Linphone/CMakeLists.txt b/Linphone/CMakeLists.txt index 994dcbc84..da291ed3a 100644 --- a/Linphone/CMakeLists.txt +++ b/Linphone/CMakeLists.txt @@ -22,7 +22,7 @@ set(APP_TARGETS ${LinphoneCxx_TARGET} ${LibLinphone_TARGET})#Liblinphone set(QT_DEFAULT_MAJOR_VERSION 6) -set(QT_PACKAGES Quick Qml Widgets Svg Multimedia Test NetworkAuth Concurrent Core5Compat)# Search Core at first for initialize Qt scripts for next find_packages. +set(QT_PACKAGES Quick Qml Widgets Svg Multimedia Test NetworkAuth Concurrent)# Search Core at first for initialize Qt scripts for next find_packages. if (UNIX AND NOT APPLE) list(APPEND QT_PACKAGES DBus) endif() diff --git a/Linphone/data/CMakeLists.txt b/Linphone/data/CMakeLists.txt index f4a9a7d66..36e6d24f1 100644 --- a/Linphone/data/CMakeLists.txt +++ b/Linphone/data/CMakeLists.txt @@ -2,6 +2,7 @@ list(APPEND _LINPHONEAPP_RC_FILES data/assistant/use-app-sip-account.rc data/assistant/create-app-sip-account.rc data/assistant/use-other-sip-account.rc data/shaders/roundEffect.frag.qsb + data/shaders/opacityMask.frag.qsb data/emoji/emoji.json ) diff --git a/Linphone/view/Control/Display/MediaProgressBar.qml b/Linphone/view/Control/Display/MediaProgressBar.qml index f87a9133f..c917ca0e7 100644 --- a/Linphone/view/Control/Display/MediaProgressBar.qml +++ b/Linphone/view/Control/Display/MediaProgressBar.qml @@ -3,7 +3,6 @@ import QtQuick.Controls as Control import QtQuick.Layouts import QtQuick.Shapes import QtQuick.Effects -import Qt5Compat.GraphicalEffects import Linphone import UtilsCpp @@ -94,12 +93,19 @@ ProgressBar { opacity: 0.5 } } - OpacityMask { + ShaderEffect { + id: opacityEffect anchors.fill: progressRectangle - source: progressRectangle - maskSource: mask + property var source: ShaderEffectSource + { + sourceItem: progressRectangle + } + property var maskSource: ShaderEffectSource + { + sourceItem: mask + } + fragmentShader: 'qrc:/data/shaders/opacityMask.frag.qsb' } - MouseArea { id: progression anchors.fill: parent