* update qt6 upgrade progress

* add flawed addition for QRenderTarget and link needed libs

* update to better logging format

* move many assets and qml files into qrc

* get rid of deprecation messages

* remove additional deprecation notices

* make Qt6 finally render on desktop with some progress on vr

* initialize QRhi with QQuickRenderControl

* use default values to stop SegFaults

* fix compilation on windows

* add windows files for aiding in running exe

* fix formatting of testing qt.conf

* first attempt on using textures instead of files in AudioTabController

* Fix public/private access issue

---------

Co-authored-by: RTUnreal <unreal@rtinf.net>
This commit is contained in:
ykeara
2024-04-03 22:49:24 -05:00
committed by GitHub
co-authored by RTUnreal
parent 72e91e9116
commit ca0ec3e07d
109 changed files with 1558 additions and 9421 deletions
@@ -1,16 +0,0 @@
QMAKE_CXXFLAGS += -Wextra
QMAKE_CXXFLAGS += -Wshadow
QMAKE_CXXFLAGS += -Wold-style-cast
QMAKE_CXXFLAGS += -Wnon-virtual-dtor
QMAKE_CXXFLAGS += -Wcast-align -Wunused -Woverloaded-virtual -Wformat=2
QMAKE_CXXFLAGS += -Wdouble-promotion
# Enable Link Time Optimization
QMAKE_CXXFLAGS += -flto
# Clang LTO requires the gold linker instead of ld
QMAKE_LFLAGS += -flto -fuse-ld=gold
-18
View File
@@ -1,18 +0,0 @@
include(common-msvc.pri)
#win32-clang-msvc is unable to correctly build the first time
#with warnings as errors on. There seems to be an issue with the moc_predefs.h
#file not being built correctly when /WX is on. Until the issue is fixed,
#win32-clang-msvc is built without /WX.
#clang-msvc does not enable the c++17 flag with qmake's c++1z flag.
QMAKE_CXXFLAGS += /std:c++17
include(clang-gcc-common-switches.pri)
QMAKE_CXXFLAGS += -Wmost
QMAKE_CXXFLAGS += -Weffc++ -Wmissing-variable-declarations
#clang-msvc spams warnings on -Wconversion and -Wsign-conversion
# from the moc .cpp files including Qt stuff.
-62
View File
@@ -1,62 +0,0 @@
# comments are the value of CLANG_VERSION
CLANG_VERSION = $$system("clang++ --version | grep 'clang version'")
# clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
CLANG_VERSION = $$split(CLANG_VERSION, ' ')
# CLANG_VERSION is now a list, this is shown as spaces in QMAKE
# clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
CLANG_VERSION = $$member(CLANG_VERSION, 2)
# 6.0.0-1ubuntu2
CLANG_VERSION = $$split(CLANG_VERSION, '.')
# 6 0 0-1ubuntu2
CLANG_VERSION = $$member(CLANG_VERSION, 0)
# 6
greaterThan(CLANG_VERSION, 4) {
message('clang++' version is above 4. Using regular clang++.)
QMAKE_CXX = clang++
QMAKE_LINK = clang++
}
else {
message('clang++' version is not above 4. Attempting to use highest specific version.)
system("clang++-5 --version") {
QMAKE_CXX = clang++-5
QMAKE_LINK = clang++-5
message('clang++-5' found.)
}
system("clang++-6 --version") {
QMAKE_CXX = clang++-6
QMAKE_LINK = clang++-6
message('clang++-6' found.)
}
system("clang++-7 --version") {
QMAKE_CXX = clang++-7
QMAKE_LINK = clang++-7
message('clang++-7' found.)
}
system("clang++-8 --version") {
QMAKE_CXX = clang++-8
QMAKE_LINK = clang++-8
message('clang++-8' found.)
}
}
system("$$QMAKE_CXX --version")
include(clang-gcc-common-switches.pri)
QMAKE_CXXFLAGS += -Wmost
QMAKE_CXXFLAGS += -Wpedantic
warnings_as_errors {
QMAKE_CXXFLAGS += -Werror
}
#All includes from the third-party directory will not warn.
QMAKE_CXXFLAGS += --system-header-prefix=third-party
QMAKE_CXXFLAGS += --system-header-prefix=qt
# Sign conversion warns on auto generated Qt MOC files.
QMAKE_CXXFLAGS += -Weffc++ -Wconversion -Wno-sign-conversion
QMAKE_CXXFLAGS += -Wextra-semi -Wzero-as-null-pointer-constant -Wmissing-variable-declarations
@@ -1,49 +0,0 @@
#Removing -W3 from both FLAGS is necessary, otherwise compiler will give
#D9025: overriding '/W4' with '/W3'
QMAKE_CFLAGS_WARN_ON -= -W3
QMAKE_CXXFLAGS_WARN_ON -= -W3
#C4127 is a warning in qvarlengtharray.h that can not be turned off
#on the current version of MSVC.
QMAKE_CXXFLAGS += /W4 /wd4127
# The codecvt header being used in AudioManagerWindows.cpp is deprecated by the standard,
# but no suitable replacement has been standardized yet. It is possible to use the Windows
# specific MultiByteToWideChar() and WideCharToMultiByte() from <Windows.h>
DEFINES += _SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING
# Enables Whole Program Optimization
QMAKE_CXXFLAGS += /Gw
# 'operator': conversion from 'type1:field_bits' to 'type2:field_bits', possible loss of data
QMAKE_CXXFLAGS += /w14254
# 'function': member function does not override any base class virtual member function
QMAKE_CXXFLAGS += /w14263
# 'classname': class has virtual functions, but destructor is not virtual instances of this class may not be destructed correctly
QMAKE_CXXFLAGS += /w14265
# 'operator': unsigned/negative constant mismatch
QMAKE_CXXFLAGS += /w14287
# nonstandard extension used: 'variable': loop control variable declared in the for-loop is used outside the for-loop scope
QMAKE_CXXFLAGS += /we4289
# 'operator': expression is always 'boolean_value'
QMAKE_CXXFLAGS += /w14296
# 'variable': pointer truncation from 'type1' to 'type2'
QMAKE_CXXFLAGS += /w14311
# expression before comma evaluates to a function which is missing an argument list
QMAKE_CXXFLAGS += /w14545
# function call before comma missing argument list
QMAKE_CXXFLAGS += /w14546
# 'operator': operator before comma has no effect; expected operator with side-effect
QMAKE_CXXFLAGS += /w14547
# 'operator': operator before comma has no effect; did you intend 'operator'?
QMAKE_CXXFLAGS += /w14549
# expression has no effect; expected expression with side-effect
QMAKE_CXXFLAGS += /w14555
# Enable warning on thread un-safe static member initialization
QMAKE_CXXFLAGS += /w14640
# Conversion from 'type1' to 'type_2' is sign-extended. This may cause unexpected runtime behavior.
QMAKE_CXXFLAGS += /w14826
# wide string literal cast to 'LPSTR'
QMAKE_CXXFLAGS += /w14905
# string literal cast to 'LPWSTR'
QMAKE_CXXFLAGS += /w14906
# illegal copy-initialization; more than one user-defined conversion has been implicitly applied
QMAKE_CXXFLAGS += /w14928
-44
View File
@@ -1,44 +0,0 @@
GCC_VERSION = $$system("g++ -dumpversion")
greaterThan(GCC_VERSION, 6) {
message('g++' version is above 6. Using regular g++.)
}
else {
message('g++' version is not above 6. Attempting to use highest specific version.)
system(g++-7 --version) {
message('g++-7' found.)
QMAKE_CXX = g++-7
QMAKE_LINK = g++-7
}
system(g++-8 --version) {
message('g++-8' found.)
QMAKE_CXX = g++-8
QMAKE_LINK = g++-8
}
system(g++-9 --version) {
message('g++-9' found.)
QMAKE_CXX = g++-9
QMAKE_LINK = g++-9
}
}
system("$$QMAKE_CXX --version")
include(clang-gcc-common-switches.pri)
QMAKE_CXXFLAGS += -Wpedantic
warnings_as_errors {
QMAKE_CXXFLAGS += -Werror
}
# GCC only switches
QMAKE_CXXFLAGS += -Wduplicated-branches -Wduplicated-cond -Wlogical-op -Wrestrict -Wnull-dereference
# Sign conversion warns on auto generated Qt MOC files.
QMAKE_CXXFLAGS += -Wconversion -Wno-sign-conversion
QMAKE_CXXFLAGS += -Wzero-as-null-pointer-constant
# Qmake will append this even though higher optimization levels are used.
QMAKE_LFLAGS_RELEASE -= -Wl,-O1
QMAKE_LFLAGS += -Wl,-O3 -O3
-12
View File
@@ -1,12 +0,0 @@
include(common-msvc.pri)
warnings_as_errors {
# Warnings as errors
QMAKE_CXXFLAGS += /WX
}
# Enables Link Time Optimization
QMAKE_CXXFLAGS += /GL
# Force standards-conformance
QMAKE_CXXFLAGS += /permissive-
-69
View File
@@ -1,69 +0,0 @@
project_dir = $$PWD/../../
win32:LIBS += -L"$$project_dir/third-party/openvr/lib/win64" -luser32 -lole32
unix:LIBS += -L"$$project_dir/third-party/openvr/lib/linux64"
LIBS += -lopenvr_api
RESOURCES += src/res/resources.qrc
DISTFILES += \
src/res/sounds/alarm01.wav \
src/res/sounds/click.wav \
src/res/sounds/focus.wav \
src/res/img/audio/microphone/ptt_notification.png \
src/res/img/audio/microphone/ptt_notification.svg \
src/res/img/battery/* \
src/res/img/icons/* \
src/res/img/alarm/* \
src/res/img/video/* \
src/res/img/chaperone/* \
src/res/qml/qmldir \
src/res/qml/audio_page/* \
src/res/qml/ChaperonePage.qml \
src/res/qml/ChaperoneWarningsPage.qml \
src/res/qml/chaperone_page/* \
src/res/qml/chaperone_page/change_orientation/* \
src/res/qml/chaperone_page/chaperone_additional/* \
src/res/qml/chaperone_page/chaperone_additional/chaperoneboundscolor/* \
src/res/qml/chaperone_page/chaperone_additional/chaperonetype/* \
src/res/qml/chaperone_page/chaperone_additional/chaperonemisc/* \
src/res/qml/FixFloorPage.qml \
src/res/qml/PlayspacePage.qml \
src/res/qml/motion_page/* \
src/res/qml/motion_page/gravity/* \
src/res/qml/motion_page/height_toggle/* \
src/res/qml/motion_page/space_drag/* \
src/res/qml/RootPage.qml \
src/res/qml/SettingsPage.qml \
src/res/qml/StatisticsPage.qml \
src/res/qml/steamvr_page/SteamVRPage.qml \
src/res/qml/steamvr_page/steamvr_additional/* \
src/res/qml/steamvr_page/camera/* \
src/res/qml/steamvr_page/steamvrmisc/* \
src/res/qml/steamvr_page/steamvrbind/* \
src/res/qml/utilities_page/* \
src/res/qml/utilities_page/media_keys/* \
src/res/qml/utilities_page/keyboard_utils/* \
src/res/qml/utilities_page/alarm_clock/* \
src/res/qml/utilities_page/misc/* \
src/res/qml/audio_page/dialog_boxes/* \
src/res/qml/audio_page/device_selector/* \
src/res/qml/audio_page/proximity/* \
src/res/qml/audio_page/push_to_talk/* \
src/res/qml/audio_page/profiles/* \
src/res/qml/video_page/* \
src/res/qml/video_page/brightness/* \
src/res/qml/video_page/color/* \
src/res/qml/video_page/supersampling/* \
src/res/qml/video_page/miscvid/* \
src/res/qml/video_page/profiles/* \
src/res/qml/video_page/dialogboxes/* \
src/res/qml/video_page/overlaycolorbright/* \
src/res/qml/rotation_page/* \
src/res/qml/rotation_page/redirected/* \
src/res/qml/rotation_page/snap_turn/* \
src/res/qml/rotation_page/space_turn/* \
src/res/qml/rotation_page/view_ratchet/* \
src/res/qml/common/*
win32:RC_ICONS += src/res/img/icons/advicon256px.ico
-157
View File
@@ -1,157 +0,0 @@
SOURCES += src/main.cpp\
src/overlaycontroller.cpp \
src/tabcontrollers/AudioTabController.cpp \
src/tabcontrollers/ChaperoneTabController.cpp \
src/tabcontrollers/FixFloorTabController.cpp \
src/tabcontrollers/MoveCenterTabController.cpp \
src/tabcontrollers/SettingsTabController.cpp \
src/tabcontrollers/StatisticsTabController.cpp \
src/tabcontrollers/SteamVRTabController.cpp \
src/tabcontrollers/UtilitiesTabController.cpp \
src/tabcontrollers/VideoTabController.cpp \
src/tabcontrollers/RotationTabController.cpp\
src/utils/ChaperoneUtils.cpp \
src/openvr/openvr_init.cpp \
src/openvr/ivrinput.cpp \
src/openvr/ovr_settings_wrapper.cpp \
src/openvr/ovr_overlay_wrapper.cpp \
src/openvr/ovr_system_wrapper.cpp \
src/openvr/lh_console_util.cpp \
src/openvr/ovr_application_wrapper.cpp \
src/utils/setup.cpp \
src/utils/paths.cpp \
src/utils/FrameRateUtils.cpp \
src/keyboard_input/keyboard_input.cpp \
src/keyboard_input/input_parser.cpp \
src/settings/settings.cpp \
src/settings/settings_object.cpp \
src/alarm_clock/vr_alarm.cpp \
src/utils/update_rate.cpp \
HEADERS += src/overlaycontroller.h \
src/tabcontrollers/AudioTabController.h \
src/tabcontrollers/ChaperoneTabController.h \
src/tabcontrollers/FixFloorTabController.h \
src/tabcontrollers/MoveCenterTabController.h \
src/tabcontrollers/SettingsTabController.h \
src/tabcontrollers/StatisticsTabController.h \
src/tabcontrollers/SteamVRTabController.h \
src/tabcontrollers/UtilitiesTabController.h \
src/tabcontrollers/VideoTabController.h \
src/tabcontrollers/audiomanager/AudioManager.h \
src/tabcontrollers/RotationTabController.h\
src/keyboard_input/keyboard_input.h \
src/media_keys/media_keys.h \
src/utils/Matrix.h \
src/utils/ChaperoneUtils.h \
src/quaternion/quaternion.h \
src/openvr/openvr_init.h \
src/openvr/ivrinput_action.h \
src/openvr/ivrinput_manifest.h \
src/openvr/ivrinput_action_set.h \
src/openvr/ivrinput_input_source.h \
src/openvr/ivrinput.h \
src/openvr/ovr_settings_wrapper.h \
src/openvr/ovr_overlay_wrapper.h \
src/openvr/ovr_system_wrapper.h \
src/openvr/ovr_application_wrapper.h \
src/openvr/lh_console_util.h \
src/utils/setup.h \
src/utils/paths.h \
src/utils/FrameRateUtils.h \
src/keyboard_input/input_parser.h \
src/keyboard_input/input_sender.h \
src/settings/settings.h \
src/settings/internal/setting_value.h \
src/settings/internal/settings_internal.h \
src/settings/internal/settings_controller.h \
src/settings/internal/specific_setting_value.h \
src/settings/settings_object.h \
src/settings/internal/settings_object_data.h \
src/alarm_clock/vr_alarm.h \
src/settings/internal/settings_object_data.h \
src/settings/internal/settings_object_data.h \
src/utils/update_rate.h \
win32 {
SOURCES += src/tabcontrollers/audiomanager/AudioManagerWindows.cpp \
src/keyboard_input/input_sender_win.cpp \
src/media_keys/media_keys_win.cpp
HEADERS += src/tabcontrollers/audiomanager/AudioManagerWindows.h
}
unix:!macx {
!noX11 {
message(X11 features enabled.)
SOURCES += src/keyboard_input/input_sender_X11.cpp
CONFIG += x11
LIBS += -lXtst
}
else {
message(X11 features disabled.)
SOURCES += src/keyboard_input/input_sender_dummy.cpp
}
!noDBUS {
message(DBUS features enabled.)
SOURCES += src/media_keys/media_keys_dbus.cpp
QT += dbus
}
else {
message(DBUS features disabled.)
SOURCES += src/media_keys/media_keys_dummy.cpp
}
!noPulse {
message(PulseAudio features enabled.)
SOURCES += src/tabcontrollers/audiomanager/AudioManagerPulse.cpp
HEADERS += src/tabcontrollers/audiomanager/AudioManagerPulse.h \
src/tabcontrollers/audiomanager/AudioManagerPulse_internal.h
LIBS += -lpulse
}
else {
message(PulseAudio features disabled.)
SOURCES += src/tabcontrollers/audiomanager/AudioManagerDummy.cpp
HEADERS += src/tabcontrollers/audiomanager/AudioManagerDummy.h
}
}
macx {
SOURCES += src/keyboard_input/input_sender_dummy.cpp \
src/media_keys/media_keys_dummy.cpp \
src/tabcontrollers/audiomanager/AudioManagerDummy.cpp
HEADERS += src/tabcontrollers/audiomanager/AudioManagerDummy.h
}
win32-msvc {
INCLUDEPATH += third-party/openvr/headers \
third-party/easylogging++ \
third-party/policyconfig
}
win32-clang-msvc {
QMAKE_CXXFLAGS += /imsvc "$$PWD/../../third-party/openvr/headers"
QMAKE_CXXFLAGS += /imsvc "$$PWD/../../third-party/easylogging++"
QMAKE_CXXFLAGS += /imsvc "$$PWD/../../third-party/policyconfig"
}
# Anything g++ or clang
# In order to suppress warnings in third party headers
*clang|*clang-g++|*clang-libc++|*g++* {
#Force Linux to look into the current dir for the OpenVR lib
QMAKE_LFLAGS += '-Wl,-rpath,\'\$$ORIGIN\''
QMAKE_CXXFLAGS += -isystem $$[QT_INSTALL_HEADERS]
QMAKE_CXXFLAGS += -isystem $$[QT_INSTALL_HEADERS]/QtCore
QMAKE_CXXFLAGS += -isystem $$[QT_INSTALL_HEADERS]/QtGui
QMAKE_CXXFLAGS += -isystem $$PWD/../../third-party/openvr/headers
QMAKE_CXXFLAGS += -isystem $$PWD/../../third-party/easylogging++
}
# easylogging++ used to be a header only lib. Now requires easylogging++.cc
SOURCES += third-party/easylogging++/easylogging++.cc
+5
View File
@@ -0,0 +1,5 @@
if ($null -ne $env:_SAVED_PATH) {
$env:PATH=$env:_SAVED_PATH;
}
$env:_SAVED_PATH=$env:PATH;
$env:PATH+=";@NATIVE_QT_ROOT@\bin;@NATIVE_PROJECT_SOURCE_DIR@\third-party\openvr\bin\win64";
+9
View File
@@ -0,0 +1,9 @@
export _SAVED_PATH="${_SAVED_PATH:-}"
if [ ! -z "$_SAVED_PATH" ]; then
export PATH="$_SAVED_PATH"
fi
export _SAVED_PATH="$PATH"
export PATH="$PATH:$(echo "@NATIVE_QT_ROOT@"|sed -E 's/(\w):/\/\L\1/')/bin:$(echo "@PROJECT_SOURCE_DIR@"|sed -E 's/(\w):/\/\L\1/')/third-party/openvr/bin/win64"
echo $_SAVED_PATH
echo $PATH
+2
View File
@@ -0,0 +1,2 @@
[Paths]
Plugins=@QT_ROOT@\\plugins