Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to Qt 6.8 #12145

Merged
merged 1 commit into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/actions/qt-android/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ inputs:
version:
description: Qt Version
required: false
default: 6.6.3
default: 6.8.1
abis:
description: ABIs to Build
required: false
Expand All @@ -28,14 +28,14 @@ runs:
uses: android-actions/setup-android@v3
with:
cmdline-tools-version: 12266719
packages: 'platform-tools platforms;android-35 build-tools;35.0.0' # ndk;25.1.8937393'
packages: 'platform-tools platforms;android-35 build-tools;35.0.0' # ndk;26.1.10909125'
log-accepted-android-sdk-licenses: false

- name: Install Android NDK
uses: nttld/setup-ndk@v1
id: setup-ndk
with:
ndk-version: r25b
ndk-version: r26b
add-to-path: false

- run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/android-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:

env:
ARTIFACT: QGroundControl.apk
QT_VERSION: 6.6.3
QT_VERSION: 6.8.1
GST_VERSION: 1.22.12
QT_ANDROID_KEYSTORE_PATH: ${{ github.workspace }}/deploy/android/android_release.keystore
QT_ANDROID_KEYSTORE_ALIAS: QGCAndroidKeyStore
Expand Down Expand Up @@ -69,7 +69,7 @@ jobs:
uses: ./.github/actions/qt-android
with:
host: linux
arch: gcc_64
arch: linux_gcc_64
version: ${{ env.QT_VERSION }}
abis: ${{ env.QT_ANDROID_ABIS }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/android-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

env:
ARTIFACT: QGroundControl.apk
QT_VERSION: 6.6.3
QT_VERSION: 6.8.1
GST_VERSION: 1.22.12
QT_ANDROID_KEYSTORE_PATH: ${{ github.workspace }}/deploy/android/android_release.keystore
QT_ANDROID_KEYSTORE_ALIAS: QGCAndroidKeyStore
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/android-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:

env:
ARTIFACT: QGroundControl.apk
QT_VERSION: 6.6.3
QT_VERSION: 6.8.1
GST_VERSION: 1.22.12
QT_ANDROID_KEYSTORE_PATH: ${{ github.workspace }}/deploy/android/android_release.keystore
QT_ANDROID_KEYSTORE_ALIAS: QGCAndroidKeyStore
Expand All @@ -59,7 +59,7 @@ jobs:
uses: ./.github/actions/qt-android
with:
host: windows
arch: win64_msvc2019_64
arch: win64_msvc2022_64
version: ${{ env.QT_VERSION }}
abis: ${{ env.QT_ANDROID_ABIS }}

Expand All @@ -76,7 +76,7 @@ jobs:
-DCMAKE_BUILD_TYPE=${{ matrix.BuildType }}
-DQT_ANDROID_ABIS="${{ env.QT_ANDROID_ABIS }}"
-DQT_ANDROID_BUILD_ALL_ABIS=OFF
-DQT_HOST_PATH="${{ env.QT_ROOT_DIR }}/../msvc2019_64"
-DQT_HOST_PATH="${{ env.QT_ROOT_DIR }}/../msvc2022_64"
-DQT_ANDROID_SIGN_APK=OFF
-DQT_DEBUG_FIND_PACKAGE=ON
-DQGC_STABLE_BUILD=${{ github.ref_type == 'tag' || contains(github.ref, 'Stable') && 'ON' || 'OFF' }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/custom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:

env:
ARTIFACT: QGroundControl-installer.exe
QT_VERSION: 6.6.3
QT_VERSION: 6.8.1
GST_VERSION: 1.22.12
SCCACHE_GHA_ENABLED: "true"

Expand Down Expand Up @@ -91,10 +91,10 @@ jobs:
uses: jurplel/install-qt-action@v4
with:
version: ${{ env.QT_VERSION }}
aqtversion: ==3.1.*
aqtversion: ==3.1.19
host: windows
target: desktop
arch: win64_msvc2019_64
arch: win64_msvc2022_64
dir: ${{ runner.temp }}
modules: qtcharts qtlocation qtpositioning qtspeech qt5compat qtmultimedia qtserialport qtimageformats qtshadertools qtconnectivity qtquick3d qtsensors
cache: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
Expand All @@ -107,7 +107,7 @@ jobs:
aqtversion: ==3.1.*
host: windows
target: desktop
arch: win64_msvc2019_arm64
arch: win64_msvc2022_arm64 # _cross_compiled
dir: ${{ runner.temp }}
extra: --autodesktop
modules: qtcharts qtlocation qtpositioning qtspeech qt5compat qtmultimedia qtserialport qtimageformats qtshadertools qtconnectivity qtquick3d qtsensors
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

env:
ARTIFACT: QGroundControl.app
QT_VERSION: 6.6.3
QT_VERSION: 6.8.1
GST_VERSION: 1.22.12

steps:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:

env:
ARTIFACT: QGroundControl-x86_64.AppImage
QT_VERSION: 6.6.3
QT_VERSION: 6.8.1
GST_VERSION: 1.22.12

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

env:
ARTIFACT: QGroundControl.dmg
QT_VERSION: 6.6.3
QT_VERSION: 6.8.1
GST_VERSION: 1.22.12

steps:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:

env:
ARTIFACT: QGroundControl-installer.exe
QT_VERSION: 6.6.3
QT_VERSION: 6.8.1
GST_VERSION: 1.22.12
SCCACHE_GHA_ENABLED: "true"

Expand Down Expand Up @@ -84,10 +84,10 @@ jobs:
uses: jurplel/install-qt-action@v4
with:
version: ${{ env.QT_VERSION }}
aqtversion: ==3.1.*
aqtversion: ==3.1.19
host: windows
target: desktop
arch: win64_msvc2019_64
arch: win64_msvc2022_64
dir: ${{ runner.temp }}
modules: qtcharts qtlocation qtpositioning qtspeech qt5compat qtmultimedia qtserialport qtimageformats qtshadertools qtconnectivity qtquick3d qtsensors
cache: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
Expand All @@ -100,7 +100,7 @@ jobs:
aqtversion: ==3.1.*
host: windows
target: desktop
arch: win64_msvc2019_arm64
arch: win64_msvc2022_arm64 # _cross_compiled
dir: ${{ runner.temp }}
extra: --autodesktop
modules: qtcharts qtlocation qtpositioning qtspeech qt5compat qtmultimedia qtserialport qtimageformats qtshadertools qtconnectivity qtquick3d qtsensors
Expand Down
14 changes: 9 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -193,13 +193,18 @@ if(NOT Qt6LinguistTools_DIR)
set(Qt6LinguistTools_DIR ${QT_HOST_PATH}/lib/cmake/Qt6LinguistTools)
endif()

# Require 6.6.3 because otherwise libQt6QuickControls2Basic.so.6 &
# libQt6QuickControls2BasicStyleImpl.so.6 are missing.
qt_standard_project_setup(REQUIRES 6.6.3)
qt_standard_project_setup(
REQUIRES 6.8.1
SUPPORTS_UP_TO 6.8.1
I18N_SOURCE_LANGUAGE en
)

qt_policy(
SET QTP0001 NEW
SET QTP0002 NEW
SET QTP0003 NEW
SET QTP0004 NEW
SET QTP0005 NEW
)

#######################################################
Expand Down Expand Up @@ -289,10 +294,9 @@ qt_add_executable(${PROJECT_NAME}
)

if(Qt6LinguistTools_FOUND)
# TODO: Update to new qt_add_translations form in Qt6.7
file(GLOB TS_SOURCES ${CMAKE_SOURCE_DIR}/translations/qgc_*.ts)
set_source_files_properties(${TS_SOURCES} PROPERTIES OUTPUT_LOCATION "${CMAKE_BINARY_DIR}/i18n")
qt_add_translations(${PROJECT_NAME}
qt_add_translations(${CMAKE_PROJECT_NAME}
TS_FILES ${TS_SOURCES}
RESOURCE_PREFIX "/"
LUPDATE_OPTIONS -no-obsolete
Expand Down
2 changes: 1 addition & 1 deletion cmake/Qt6QGCConfiguration.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ if(NOT QT_MKSPEC)
elseif(LINUX)
set(QT_MKSPEC gcc_64)
elseif(WIN32)
set(QT_MKSPEC msvc2019_64)
set(QT_MKSPEC msvc2022_64)
elseif(ANDROID)
if(${ANDROID_ABI} STREQUAL armeabi-v7a)
set(QT_MKSPEC android_armv7)
Expand Down
4 changes: 2 additions & 2 deletions deploy/docker/Dockerfile-build-ubuntu
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM ubuntu:20.04
FROM ubuntu:22.04

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

ENV DEBIAN_FRONTEND noninteractive
Expand Down
8 changes: 4 additions & 4 deletions deploy/vagrant/.vagrantconfig.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ configs:
'qt_deps_unpack_parent_dir': '/home/vagrant'

'qt_deps_unpack_dir': '/home/vagrant/Qt'
'qt_deps_bin_unpack_dir': '/home/vagrant/Qt/6.6.3/gcc_64/bin'
'qt_deps_lib_unpack_dir': '/home/vagrant/Qt/6.6.3/gcc_64/lib'
'qt_deps_plugins_unpack_dir': '/home/vagrant/Qt/6.6.3/gcc_64/plugins'
'qt_deps_qml_unpack_dir': '/home/vagrant/Qt/6.6.3/gcc_64/qml'
'qt_deps_bin_unpack_dir': '/home/vagrant/Qt/6.8.1/gcc_64/bin'
'qt_deps_lib_unpack_dir': '/home/vagrant/Qt/6.8.1/gcc_64/lib'
'qt_deps_plugins_unpack_dir': '/home/vagrant/Qt/6.8.1/gcc_64/plugins'
'qt_deps_qml_unpack_dir': '/home/vagrant/Qt/6.8.1/gcc_64/qml'

'project_root_dir': '/vagrant'

Expand Down
2 changes: 1 addition & 1 deletion docs/en/qgc-dev-guide/getting_started/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
qt_version: 6.6.3
qt_version: 6.8.1
---

# Getting Started with Source and Builds
Expand Down
1 change: 0 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ target_link_libraries(QGC
Qt6::QuickControls2
Qt6::QuickWidgets
Qt6::Core5Compat
Qt6::Bluetooth
API
AnalyzeView
Audio
Expand Down
1 change: 1 addition & 0 deletions src/GPS/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ target_link_libraries(GPS
Vehicle
PUBLIC
Qt6::Core
FactSystem
GPSDrivers
)

Expand Down
10 changes: 5 additions & 5 deletions src/Joystick/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ qt_add_resources(Joystick "gamecontrollerdb.txt"
FILES ${sdl_gamecontrollerdb_SOURCE_DIR}/gamecontrollerdb.txt
)

qt_add_qml_module(Joystick
URI QGroundControl.JoystickManager
VERSION 1.0
IMPORT_PATH ${QT_QML_OUTPUT_DIRECTORY}
)
# qt_add_qml_module(Joystick
# URI QGroundControl.JoystickManager
# VERSION 1.0
# IMPORT_PATH ${QT_QML_OUTPUT_DIRECTORY}
# )

set(MINIMUM_SDL2_VERSION 2.24.0)
if(NOT QGC_BUILD_DEPENDENCIES)
Expand Down
8 changes: 8 additions & 0 deletions src/Joystick/JoystickManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ JoystickManager::JoystickManager(QObject *parent)
{
// qCDebug(JoystickManagerLog) << Q_FUNC_INFO << this;



_joystickCheckTimer->setInterval(kTimerInterval);
_joystickCheckTimer->setSingleShot(false);
}
Expand All @@ -53,6 +55,12 @@ JoystickManager *JoystickManager::instance()
return _joystickManager();
}

void JoystickManager::registerQmlTypes()
{
(void) qmlRegisterUncreatableType<JoystickManager>("QGroundControl.JoystickManager", 1, 0, "JoystickManager", "Reference only");
(void) qmlRegisterUncreatableType<Joystick>("QGroundControl.JoystickManager", 1, 0, "Joystick", "Reference only");
}

void JoystickManager::init()
{
#ifdef QGC_SDL_JOYSTICK
Expand Down
1 change: 1 addition & 0 deletions src/Joystick/JoystickManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class JoystickManager : public QObject
~JoystickManager();

static JoystickManager *instance();
static void registerQmlTypes();

QVariantList joysticks();
QStringList joystickNames() const { return _name2JoystickMap.keys(); }
Expand Down
4 changes: 4 additions & 0 deletions src/QGCApplication.cc
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ void QGCApplication::init()
VideoManager::registerQmlTypes();
QGCCorePlugin::registerQmlTypes();
GPSRtk::registerQmlTypes();
JoystickManager::registerQmlTypes();
#ifdef QGC_VIEWER3D
Viewer3DManager::registerQmlTypes();
#endif
Expand Down Expand Up @@ -745,6 +746,9 @@ QGCImageProvider* QGCApplication::qgcImageProvider()
void QGCApplication::shutdown()
{
qCDebug(QGCApplicationLog) << "Exit";

VideoManager::instance()->cleanup();

// This is bad, but currently qobject inheritances are incorrect and cause crashes on exit without
delete _qmlAppEngine;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Vehicle/Actuators/ActuatorTesting.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

#include "QmlObjectListModel.h"
#include "Vehicle.h"
#include "QGCMAVLink.h"
#include "MAVLinkLib.h"
#include <QtCore/QObject>
#include <QtCore/QString>
#include <QtCore/QTimer>
Expand Down
2 changes: 1 addition & 1 deletion src/Vehicle/Actuators/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ target_link_libraries(VehicleActuators
PUBLIC
Qt6::Core
Qt6::Gui
Comms
FactSystem
MAVLink
QmlControls
Vehicle
)
Expand Down
2 changes: 1 addition & 1 deletion src/Vehicle/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ target_link_libraries(Vehicle
Audio
AutoPilotPlugins
Camera
FirmwarePlugin
Joystick
MockLink
PositionManager
Expand All @@ -53,6 +52,7 @@ target_link_libraries(Vehicle
Qt6::Positioning
Comms
FactSystem
FirmwarePlugin
Gimbal
LibEventsWrapper
MAVLink
Expand Down
2 changes: 1 addition & 1 deletion src/Vehicle/Components/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ target_link_libraries(VehicleComponents
Vehicle
PUBLIC
Qt6::Core
Comms
FactSystem
MAVLink
Utilities
)

Expand Down
2 changes: 1 addition & 1 deletion src/Vehicle/Components/CompInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#pragma once

#include "QGCMAVLink.h"
#include "MAVLinkLib.h"

#include <QtCore/QObject>

Expand Down
2 changes: 1 addition & 1 deletion src/Vehicle/Components/CompInfoParam.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#pragma once

#include "CompInfo.h"
#include "QGCMAVLink.h"
#include "MAVLinkLib.h"
#include "FactMetaData.h"

#include <QtCore/QLoggingCategory>
Expand Down
Loading
Loading