Skip to content

Commit

Permalink
Remove qt5compat Module
Browse files Browse the repository at this point in the history
  • Loading branch information
HTRamsey committed Nov 10, 2024
1 parent ac083a3 commit fab8497
Show file tree
Hide file tree
Showing 21 changed files with 481 additions and 51 deletions.
10 changes: 5 additions & 5 deletions .github/actions/qt-android/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ runs:
target: desktop
arch: ${{ inputs.arch }}
dir: ${{ runner.temp }}
modules: qtcharts qtlocation qtpositioning qtspeech qt5compat qtmultimedia qtserialport qtimageformats qtshadertools qtconnectivity qtquick3d qtsensors
modules: qtcharts qtlocation qtpositioning qtspeech qtmultimedia qtserialport qtimageformats qtshadertools qtconnectivity qtquick3d qtsensors
cache: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}

- name: Install Qt for Android (armv7)
Expand All @@ -82,7 +82,7 @@ runs:
arch: android_armv7
dir: ${{ runner.temp }}
extra: --autodesktop
modules: qtcharts qtlocation qtpositioning qtspeech qt5compat qtmultimedia qtserialport qtimageformats qtshadertools qtconnectivity qtquick3d qtsensors
modules: qtcharts qtlocation qtpositioning qtspeech qtmultimedia qtserialport qtimageformats qtshadertools qtconnectivity qtquick3d qtsensors
cache: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}

- name: Install Qt for Android (arm64_v8a)
Expand All @@ -96,7 +96,7 @@ runs:
arch: android_arm64_v8a
dir: ${{ runner.temp }}
extra: --autodesktop
modules: qtcharts qtlocation qtpositioning qtspeech qt5compat qtmultimedia qtserialport qtimageformats qtshadertools qtconnectivity qtquick3d qtsensors
modules: qtcharts qtlocation qtpositioning qtspeech qtmultimedia qtserialport qtimageformats qtshadertools qtconnectivity qtquick3d qtsensors
cache: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}

- name: Install Qt for Android (x86)
Expand All @@ -110,7 +110,7 @@ runs:
arch: android_x86
dir: ${{ runner.temp }}
extra: --autodesktop
modules: qtcharts qtlocation qtpositioning qtspeech qt5compat qtmultimedia qtserialport qtimageformats qtshadertools qtconnectivity qtquick3d qtsensors
modules: qtcharts qtlocation qtpositioning qtspeech qtmultimedia qtserialport qtimageformats qtshadertools qtconnectivity qtquick3d qtsensors
cache: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}

- name: Install Qt for Android (x86_64)
Expand All @@ -124,5 +124,5 @@ runs:
arch: android_x86_64
dir: ${{ runner.temp }}
extra: --autodesktop
modules: qtcharts qtlocation qtpositioning qtspeech qt5compat qtmultimedia qtserialport qtimageformats qtshadertools qtconnectivity qtquick3d qtsensors
modules: qtcharts qtlocation qtpositioning qtspeech qtmultimedia qtserialport qtimageformats qtshadertools qtconnectivity qtquick3d qtsensors
cache: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
4 changes: 2 additions & 2 deletions .github/workflows/ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
target: desktop
arch: clang_64
dir: ${{ runner.temp }}
modules: qtcharts qtlocation qtpositioning qtspeech qt5compat qtmultimedia qtserialport qtimageformats qtshadertools qtconnectivity qtquick3d qtsensors
modules: qtcharts qtlocation qtpositioning qtspeech qtmultimedia qtserialport qtimageformats qtshadertools qtconnectivity qtquick3d qtsensors
cache: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}

- name: Install Qt for iOS
Expand All @@ -85,7 +85,7 @@ jobs:
arch: ios
dir: ${{ runner.temp }}
extra: --autodesktop
modules: qtcharts qtlocation qtpositioning qtspeech qt5compat qtmultimedia qtimageformats qtshadertools qtconnectivity qtquick3d qtsensors
modules: qtcharts qtlocation qtpositioning qtspeech qtmultimedia qtimageformats qtshadertools qtconnectivity qtquick3d qtsensors
cache: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}

- run: mkdir ${{ runner.temp }}/shadow_build_dir
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ jobs:
target: desktop
arch: gcc_64
dir: ${{ runner.temp }}
modules: qtcharts qtlocation qtpositioning qtspeech qt5compat qtmultimedia qtserialport qtimageformats qtshadertools qtconnectivity qtquick3d qtsensors
modules: qtcharts qtlocation qtpositioning qtspeech qtmultimedia qtserialport qtimageformats qtshadertools qtconnectivity qtquick3d qtsensors
cache: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}

# - name: Build GStreamer
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:
target: desktop
arch: clang_64
dir: ${{ runner.temp }}
modules: qtcharts qtlocation qtpositioning qtspeech qt5compat qtmultimedia qtserialport qtimageformats qtshadertools qtconnectivity qtquick3d qtsensors
modules: qtcharts qtlocation qtpositioning qtspeech qtmultimedia qtserialport qtimageformats qtshadertools qtconnectivity qtquick3d qtsensors
cache: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}

- run: mkdir ${{ runner.temp }}/shadow_build_dir
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ jobs:
target: desktop
arch: win64_msvc2019_64
dir: ${{ runner.temp }}
modules: qtcharts qtlocation qtpositioning qtspeech qt5compat qtmultimedia qtserialport qtimageformats qtshadertools qtconnectivity qtquick3d qtsensors
modules: qtcharts qtlocation qtpositioning qtspeech qtmultimedia qtserialport qtimageformats qtshadertools qtconnectivity qtquick3d qtsensors
cache: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}

- name: Install Qt for Windows (Arm64)
Expand All @@ -108,7 +108,7 @@ jobs:
arch: win64_msvc2019_arm64
dir: ${{ runner.temp }}
extra: --autodesktop
modules: qtcharts qtlocation qtpositioning qtspeech qt5compat qtmultimedia qtserialport qtimageformats qtshadertools qtconnectivity qtquick3d qtsensors
modules: qtcharts qtlocation qtpositioning qtspeech qtmultimedia qtserialport qtimageformats qtshadertools qtconnectivity qtquick3d qtsensors
cache: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}

- name: Set up Visual Studio shell
Expand Down
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ find_package(Qt6
COMPONENTS
Concurrent
Core
Core5Compat
Location
Multimedia
Network
Expand Down
30 changes: 19 additions & 11 deletions custom-example/res/Custom/Widgets/CustomAttitudeWidget.qml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@
*/

import QtQuick
import QtQuick.Effects

import QGroundControl
import QGroundControl.Controls
import QGroundControl.ScreenTools
import QGroundControl.Palette
import QGroundControl.FlightMap
import Qt5Compat.GraphicalEffects

Item {
id: root

Expand Down Expand Up @@ -99,18 +100,25 @@ Item {
}
}

Rectangle {
id: mask
anchors.fill: instrument
radius: width / 2
color: "black"
visible: false
MultiEffect {
source: instrument
anchors.fill: instrument
maskEnabled: true
maskSource: mask
}

OpacityMask {
anchors.fill: instrument
source: instrument
maskSource: mask
Item {
id: mask
width: instrument.width
height: instrument.height
layer.enabled: true
visible: false
Rectangle {
width: parent.width
height: parent.height
radius: width / 2
color: "black"
}
}

Rectangle {
Expand Down
2 changes: 1 addition & 1 deletion deploy/docker/Dockerfile-build-ubuntu
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM ubuntu:22.04

ARG QT_VERSION=6.6.3
ARG QT_MODULES="qtcharts qtlocation qtpositioning qtspeech qt5compat qtmultimedia qtserialport qtimageformats qtshadertools qtconnectivity qtquick3d qtsensors"
ARG QT_MODULES="qtcharts qtlocation qtpositioning qtspeech qtmultimedia qtserialport qtimageformats qtshadertools qtconnectivity qtquick3d qtsensors"

ENV DEBIAN_FRONTEND noninteractive

Expand Down
2 changes: 1 addition & 1 deletion deploy/vagrant/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ Vagrant.configure(2) do |config|
version="6.6"
host="linux"
target="desktop"
modules="qtcharts qtlocation qtpositioning qtspeech qt5compat qtmultimedia qtserialport qtimageformats qtshadertools qtconnectivity qtquick3d qtsensors"
modules="qtcharts qtlocation qtpositioning qtspeech qtmultimedia qtserialport qtimageformats qtshadertools qtconnectivity qtquick3d qtsensors"
su - vagrant -c "rm -rf ${dir}"
su - vagrant -c "mkdir -p ${dir}"
su - vagrant -c "python3 -m aqt install-qt -O ${dir} ${host} ${target} ${version} -m ${modules}"
Expand Down
12 changes: 3 additions & 9 deletions src/AutoPilotPlugins/APM/APMSafetyComponentCopter.qml
Original file line number Diff line number Diff line change
Expand Up @@ -408,27 +408,21 @@ SetupPage {
height: rltAltFinalField.y + rltAltFinalField.height + _margins
color: ggcPal.windowShade

Image {
QGCColoredImage {
id: icon
visible: _showIcon
anchors.margins: _margins
anchors.left: parent.left
anchors.top: parent.top
height: ScreenTools.defaultFontPixelWidth * 20
width: ScreenTools.defaultFontPixelWidth * 20
color: ggcPal.text
sourceSize.width: width
mipmap: true
fillMode: Image.PreserveAspectFit
visible: false
source: "/qmlimages/ReturnToHomeAltitude.svg"
}

ColorOverlay {
anchors.fill: icon
source: icon
color: ggcPal.text
visible: _showIcon
}

QGCRadioButton {
id: returnAtCurrentRadio
anchors.margins: _margins
Expand Down
2 changes: 0 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ find_package(Qt6
REQUIRED
COMPONENTS
Core
Core5Compat
QuickControls2
QuickWidgets
Widgets
Expand Down Expand Up @@ -64,7 +63,6 @@ target_link_libraries(QGC
Qt6::Quick
Qt6::QuickControls2
Qt6::QuickWidgets
Qt6::Core5Compat
Qt6::Bluetooth
API
ADSB
Expand Down
29 changes: 18 additions & 11 deletions src/FlightMap/Widgets/CompassRing.qml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
****************************************************************************/

import QtQuick
import QtQuick.Effects

import QGroundControl.Controls
import QGroundControl.ScreenTools
Expand Down Expand Up @@ -67,18 +68,24 @@ Item {
}
}

Rectangle {
id: mask
anchors.fill: instrument
radius: width / 2
color: "black"
visible: false
MultiEffect {
source: instrument
anchors.fill: instrument
maskEnabled: true
maskSource: mask
}

OpacityMask {
anchors.fill: instrument
source: instrument
maskSource: mask
Item {
id: mask
width: instrument.width
height: instrument.height
layer.enabled: true
visible: false
Rectangle {
width: parent.width
height: parent.height
radius: width / 2
color: "black"
}
}

}
3 changes: 3 additions & 0 deletions src/QmlControls/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
add_subdirectory(GraphicalEffects)

find_package(Qt6 REQUIRED COMPONENTS Concurrent Core Gui Location Positioning Qml QmlIntegration Quick Widgets)

if(QGC_UTM_ADAPTER)
Expand Down Expand Up @@ -72,6 +74,7 @@ target_link_libraries(QmlControls
Geo
GPS
MockLink
qgcgraphicaleffectsplugin
PUBLIC
Qt6::Core
Qt6::Gui
Expand Down
27 changes: 27 additions & 0 deletions src/QmlControls/GraphicalEffects/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
find_package(Qt6 REQUIRED COMPONENTS Core Qml Quick)

qt_add_qml_module(qgcgraphicaleffectsplugin
URI "QGroundControl.GraphicalEffects"
VERSION 1.0
STATIC
CLASS_NAME QGCGraphicalEffectsPlugin
PLUGIN_TARGET qgcgraphicaleffectsplugin
NO_GENERATE_PLUGIN_SOURCE
NO_PLUGIN_OPTIONAL
RESOURCE_PREFIX "/qt/qml"
QML_FILES "ColorOverlay.qml"
RESOURCES "coloroverlay.frag.qsb"
SOURCES
plugin.cpp
qgfxsourceproxy.cpp
qgfxsourceproxy_p.h
)

target_include_directories(qgcgraphicaleffectsplugin PUBLIC ${Qt6Quick_PRIVATE_INCLUDE_DIRS})

target_link_libraries(qgcgraphicaleffectsplugin
PUBLIC
Qt::Core
Qt::Qml
Qt::Quick
)
Loading

0 comments on commit fab8497

Please sign in to comment.