diff --git a/CMakeLists.txt b/CMakeLists.txt index a14a6604f..1f5e6673a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,6 +29,7 @@ option(HIDE_CONSOLE "Hide console when running GUI on Windows" ON) option(BUNDLE "Enable distribution bundle" OFF) set(ARCH_OPT "native" CACHE STRING "Specify instruction set to use. Will be passed directly as `-march` or `/arch:` argument on supported compilers. \ 'native' option will figure out host machine compatibilities and set flags accordingly (even with MSVC).") +option(ENABLE_QT6 "Build with Qt6 rather than Qt5" OFF) # Sampling devices enablers option(ENABLE_AIRSPY "Enable AirSpy support" ON) @@ -410,30 +411,59 @@ set(CMAKE_AUTORCC TRUE) set(CMAKE_INCLUDE_CURRENT_DIR ON) # Qt requirements -find_package(Qt5 - REQUIRED COMPONENTS - Core - Widgets - WebSockets - Multimedia - MultimediaWidgets - Positioning - Charts - SerialPort) +# See: https://doc-snapshots.qt.io/qt6-dev/cmake-qt5-and-qt6-compatibility.html +if(ENABLE_QT6) + # Qt6 doesn't currently support Location + find_package(Qt6 + COMPONENTS + Core + Widgets + WebSockets + Multimedia + MultimediaWidgets + Positioning + Charts + SerialPort + Core5Compat) +else() + find_package(Qt5 5.15 + REQUIRED COMPONENTS + Core + Widgets + WebSockets + Multimedia + MultimediaWidgets + Positioning + Charts + SerialPort) +endif() # for the server we don't need OpenGL/Qt Quick components if (BUILD_GUI) find_package(OpenGL REQUIRED) - find_package(Qt5 - REQUIRED COMPONENTS - OpenGL - Quick - QuickWidgets - Location - TextToSpeech - WebEngine - WebEngineCore - WebEngineWidgets) + if (ENABLE_QT6) + find_package(Qt6 + REQUIRED COMPONENTS + OpenGL + OpenGLWidgets + Quick + QuickWidgets + TextToSpeech + WebEngineQuick + WebEngineCore + WebEngineWidgets) + else() + find_package(Qt5 + REQUIRED COMPONENTS + OpenGL + Quick + QuickWidgets + Location + TextToSpeech + WebEngine + WebEngineCore + WebEngineWidgets) + endif() endif() # other requirements @@ -629,7 +659,7 @@ add_executable(sdrangelbench ) target_link_libraries(sdrangelbench - Qt5::Multimedia + Qt::Multimedia sdrbench logging ) @@ -646,8 +676,8 @@ if (BUILD_GUI) target_link_libraries(${CMAKE_PROJECT_NAME} ${OPENGL_LIBRARIES} - Qt5::Widgets - Qt5::Multimedia + Qt::Widgets + Qt::Multimedia sdrbase sdrgui logging @@ -670,7 +700,7 @@ if (BUILD_SERVER) ) target_link_libraries(sdrangelsrv - Qt5::Multimedia + Qt::Multimedia sdrbase sdrsrv logging diff --git a/app/main.cpp b/app/main.cpp index f328b2b5f..f3f6ce875 100644 --- a/app/main.cpp +++ b/app/main.cpp @@ -22,8 +22,10 @@ #include #include #include +#ifdef __APPLE__ #include #include +#endif #include "loggerwithfile.h" #include "mainwindow.h" @@ -44,7 +46,7 @@ static int runQtApplication(int argc, char* argv[], qtwebapp::LoggerWithFile *lo QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); //HiDPI pixmaps QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts); // Needed for WebGL in QWebEngineView and MainWindow::openGLVersion #endif -#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0) +#if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)) && (QT_VERSION <= QT_VERSION_CHECK(6, 0, 0)) QApplication::setAttribute(Qt::AA_DisableWindowContextHelpButton); #endif diff --git a/cmake/Modules/DeployQt.cmake b/cmake/Modules/DeployQt.cmake index d302cf203..5a50f0449 100644 --- a/cmake/Modules/DeployQt.cmake +++ b/cmake/Modules/DeployQt.cmake @@ -1,6 +1,10 @@ -find_package(Qt5Core REQUIRED) +if (Qt6_FOUND) + find_package(Qt6Core REQUIRED) +else() + find_package(Qt5Core REQUIRED) +endif() -get_target_property(_qmake_executable Qt5::qmake IMPORTED_LOCATION) +get_target_property(_qmake_executable Qt::qmake IMPORTED_LOCATION) get_filename_component(_qt_bin_dir "${_qmake_executable}" DIRECTORY) find_program(WINDEPLOYQT_EXECUTABLE windeployqt HINTS "${_qt_bin_dir}") @@ -20,7 +24,7 @@ function(windeployqt target bindir qmldir) add_custom_command(TARGET ${target} POST_BUILD COMMAND "${CMAKE_COMMAND}" -E env PATH="${_qt_bin_dir}" "${WINDEPLOYQT_EXECUTABLE}" - --verbose 1 + --verbose 2 --no-compiler-runtime --dir "${bindir}" --qmldir "${qmldir}" diff --git a/cmake/cpack/CMakeLists.txt b/cmake/cpack/CMakeLists.txt index 28d91df25..80a78c404 100644 --- a/cmake/cpack/CMakeLists.txt +++ b/cmake/cpack/CMakeLists.txt @@ -1,5 +1,5 @@ # Stuff qmake can tell us -get_target_property (QMAKE_EXECUTABLE Qt5::qmake LOCATION) +get_target_property (QMAKE_EXECUTABLE Qt::qmake LOCATION) function (QUERY_QMAKE VAR RESULT) exec_program (${QMAKE_EXECUTABLE} ARGS "-query ${VAR}" RETURN_VALUE return_code OUTPUT_VARIABLE output) if (NOT return_code) diff --git a/httpserver/CMakeLists.txt b/httpserver/CMakeLists.txt index 45c3ad181..c796c8cbb 100644 --- a/httpserver/CMakeLists.txt +++ b/httpserver/CMakeLists.txt @@ -40,8 +40,8 @@ add_library(httpserver SHARED ) target_link_libraries(httpserver - Qt5::Core - Qt5::Network + Qt::Core + Qt::Network ) install(TARGETS httpserver DESTINATION ${INSTALL_LIB_DIR}) diff --git a/logging/CMakeLists.txt b/logging/CMakeLists.txt index 3c8f92781..995e22ce2 100644 --- a/logging/CMakeLists.txt +++ b/logging/CMakeLists.txt @@ -26,8 +26,8 @@ add_library(logging SHARED ) target_link_libraries(logging - Qt5::Core - Qt5::Network + Qt::Core + Qt::Network ) install(TARGETS logging DESTINATION ${INSTALL_LIB_DIR}) diff --git a/modemm17/CMakeLists.txt b/modemm17/CMakeLists.txt index fa04e8ecf..58f12be85 100644 --- a/modemm17/CMakeLists.txt +++ b/modemm17/CMakeLists.txt @@ -52,7 +52,7 @@ add_library(modemm17 SHARED ) target_link_libraries(modemm17 - Qt5::Core + Qt::Core ) install(TARGETS modemm17 DESTINATION ${INSTALL_LIB_DIR}) diff --git a/plugins/channelmimo/beamsteeringcwmod/CMakeLists.txt b/plugins/channelmimo/beamsteeringcwmod/CMakeLists.txt index e3438107b..baa8ba5c6 100644 --- a/plugins/channelmimo/beamsteeringcwmod/CMakeLists.txt +++ b/plugins/channelmimo/beamsteeringcwmod/CMakeLists.txt @@ -35,7 +35,7 @@ if (NOT SERVER_MODE) ) set(TARGET_NAME beamsteeringcwmod) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -50,7 +50,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/channelmimo/beamsteeringcwmod/beamsteeringcwmodgui.cpp b/plugins/channelmimo/beamsteeringcwmod/beamsteeringcwmodgui.cpp index fe4f37f47..e2c409655 100644 --- a/plugins/channelmimo/beamsteeringcwmod/beamsteeringcwmodgui.cpp +++ b/plugins/channelmimo/beamsteeringcwmod/beamsteeringcwmodgui.cpp @@ -194,7 +194,7 @@ void BeamSteeringCWModGUI::leaveEvent(QEvent*) m_channelMarker.setHighlighted(false); } -void BeamSteeringCWModGUI::enterEvent(QEvent*) +void BeamSteeringCWModGUI::enterEvent(EnterEventType*) { m_channelMarker.setHighlighted(true); } diff --git a/plugins/channelmimo/beamsteeringcwmod/beamsteeringcwmodgui.h b/plugins/channelmimo/beamsteeringcwmod/beamsteeringcwmodgui.h index ae9eb358a..6c9b93ff8 100644 --- a/plugins/channelmimo/beamsteeringcwmod/beamsteeringcwmodgui.h +++ b/plugins/channelmimo/beamsteeringcwmod/beamsteeringcwmodgui.h @@ -89,7 +89,7 @@ private: void updateAbsoluteCenterFrequency(); void leaveEvent(QEvent*); - void enterEvent(QEvent*); + void enterEvent(EnterEventType*); void applyInterpolation(); void applyPosition(); diff --git a/plugins/channelmimo/doa2/CMakeLists.txt b/plugins/channelmimo/doa2/CMakeLists.txt index 42cc6d2f0..b7a0939c8 100644 --- a/plugins/channelmimo/doa2/CMakeLists.txt +++ b/plugins/channelmimo/doa2/CMakeLists.txt @@ -39,7 +39,7 @@ if (NOT SERVER_MODE) ) set(TARGET_NAME doa2) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -54,7 +54,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/channelmimo/doa2/doa2gui.cpp b/plugins/channelmimo/doa2/doa2gui.cpp index b341f4155..2067aa29f 100644 --- a/plugins/channelmimo/doa2/doa2gui.cpp +++ b/plugins/channelmimo/doa2/doa2gui.cpp @@ -260,7 +260,7 @@ void DOA2GUI::leaveEvent(QEvent*) m_channelMarker.setHighlighted(false); } -void DOA2GUI::enterEvent(QEvent*) +void DOA2GUI::enterEvent(EnterEventType*) { m_channelMarker.setHighlighted(true); } diff --git a/plugins/channelmimo/doa2/doa2gui.h b/plugins/channelmimo/doa2/doa2gui.h index db099aaa4..ca2100f88 100644 --- a/plugins/channelmimo/doa2/doa2gui.h +++ b/plugins/channelmimo/doa2/doa2gui.h @@ -94,7 +94,7 @@ private: void updateDOA(); void leaveEvent(QEvent*); - void enterEvent(QEvent*); + void enterEvent(EnterEventType*); private slots: void handleSourceMessages(); diff --git a/plugins/channelmimo/interferometer/CMakeLists.txt b/plugins/channelmimo/interferometer/CMakeLists.txt index 5bd83f884..e0f2f7e42 100644 --- a/plugins/channelmimo/interferometer/CMakeLists.txt +++ b/plugins/channelmimo/interferometer/CMakeLists.txt @@ -37,7 +37,7 @@ if (NOT SERVER_MODE) ) set(TARGET_NAME interferometer) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -52,7 +52,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/channelmimo/interferometer/interferometergui.cpp b/plugins/channelmimo/interferometer/interferometergui.cpp index 6f2b85468..6f135d448 100644 --- a/plugins/channelmimo/interferometer/interferometergui.cpp +++ b/plugins/channelmimo/interferometer/interferometergui.cpp @@ -229,7 +229,7 @@ void InterferometerGUI::leaveEvent(QEvent*) m_channelMarker.setHighlighted(false); } -void InterferometerGUI::enterEvent(QEvent*) +void InterferometerGUI::enterEvent(EnterEventType*) { m_channelMarker.setHighlighted(true); } diff --git a/plugins/channelmimo/interferometer/interferometergui.h b/plugins/channelmimo/interferometer/interferometergui.h index 02bcf6cab..22c193d1e 100644 --- a/plugins/channelmimo/interferometer/interferometergui.h +++ b/plugins/channelmimo/interferometer/interferometergui.h @@ -91,7 +91,7 @@ private: void updateAbsoluteCenterFrequency(); void leaveEvent(QEvent*); - void enterEvent(QEvent*); + void enterEvent(EnterEventType*); private slots: void handleSourceMessages(); diff --git a/plugins/channelrx/CMakeLists.txt b/plugins/channelrx/CMakeLists.txt index 474babb75..f3ad92696 100644 --- a/plugins/channelrx/CMakeLists.txt +++ b/plugins/channelrx/CMakeLists.txt @@ -1,6 +1,6 @@ project(demod) -if (ENABLE_CHANNELRX_DEMODADSB AND Qt5Quick_FOUND AND Qt5QuickWidgets_FOUND AND Qt5Positioning_FOUND) +if (ENABLE_CHANNELRX_DEMODADSB AND Qt${QT_DEFAULT_MAJOR_VERSION}Quick_FOUND AND Qt${QT_DEFAULT_MAJOR_VERSION}QuickWidgets_FOUND AND Qt${QT_DEFAULT_MAJOR_VERSION}Positioning_FOUND) add_subdirectory(demodadsb) # add_subdirectory(demodvormc) endif() diff --git a/plugins/channelrx/chanalyzer/CMakeLists.txt b/plugins/channelrx/chanalyzer/CMakeLists.txt index ba324e091..62352c1ec 100644 --- a/plugins/channelrx/chanalyzer/CMakeLists.txt +++ b/plugins/channelrx/chanalyzer/CMakeLists.txt @@ -34,8 +34,8 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core - Qt5::Widgets + Qt::Core + Qt::Widgets sdrbase sdrgui ) diff --git a/plugins/channelrx/chanalyzer/chanalyzergui.cpp b/plugins/channelrx/chanalyzer/chanalyzergui.cpp index b85da7f58..2169fe1b6 100644 --- a/plugins/channelrx/chanalyzer/chanalyzergui.cpp +++ b/plugins/channelrx/chanalyzer/chanalyzergui.cpp @@ -703,7 +703,7 @@ void ChannelAnalyzerGUI::leaveEvent(QEvent* event) ChannelGUI::leaveEvent(event); } -void ChannelAnalyzerGUI::enterEvent(QEvent* event) +void ChannelAnalyzerGUI::enterEvent(EnterEventType* event) { m_channelMarker.setHighlighted(true); ChannelGUI::enterEvent(event); diff --git a/plugins/channelrx/chanalyzer/chanalyzergui.h b/plugins/channelrx/chanalyzer/chanalyzergui.h index 1744544b6..34e1223f7 100644 --- a/plugins/channelrx/chanalyzer/chanalyzergui.h +++ b/plugins/channelrx/chanalyzer/chanalyzergui.h @@ -100,7 +100,7 @@ private: void updateAbsoluteCenterFrequency(); void leaveEvent(QEvent*); - void enterEvent(QEvent*); + void enterEvent(EnterEventType*); private slots: void on_deltaFrequency_changed(qint64 value); diff --git a/plugins/channelrx/demodadsb/CMakeLists.txt b/plugins/channelrx/demodadsb/CMakeLists.txt index a23f30a5f..02078f24a 100644 --- a/plugins/channelrx/demodadsb/CMakeLists.txt +++ b/plugins/channelrx/demodadsb/CMakeLists.txt @@ -29,7 +29,7 @@ set(adsb_HEADERS include_directories( ${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client ${Boost_INCLUDE_DIRS} - ${Qt5Gui_PRIVATE_INCLUDE_DIRS} + ${Qt${QT_DEFAULT_MAJOR_VERSION}Gui_PRIVATE_INCLUDE_DIRS} ) if(NOT SERVER_MODE) @@ -61,7 +61,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME demodadsb) - set(TARGET_LIB Qt5::Widgets Qt5::Quick Qt5::QuickWidgets Qt5::Positioning Qt5::TextToSpeech) + set(TARGET_LIB Qt::Widgets Qt::Quick Qt::QuickWidgets Qt::Positioning Qt::TextToSpeech) set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -81,7 +81,7 @@ endif() target_link_libraries(${TARGET_NAME} Boost::disable_autolinking - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/channelrx/demodadsb/adsbdemodgui.cpp b/plugins/channelrx/demodadsb/adsbdemodgui.cpp index 605bedcfb..385878a98 100644 --- a/plugins/channelrx/demodadsb/adsbdemodgui.cpp +++ b/plugins/channelrx/demodadsb/adsbdemodgui.cpp @@ -1947,7 +1947,7 @@ void ADSBDemodGUI::decodeCommB(const QByteArray data, const QDateTime dateTime, } airlineRegistration[2] = '\0'; QString airlineRegistrationString = QString(airlineRegistration).trimmed(); - bool airlineRegistrationInvalid = QString(airlineRegistrationStatus).contains('#') || !QChar::isLetter(c[0]) || !QChar::isLetter(c[1]); + bool airlineRegistrationInvalid = QString(airlineRegistrationString).contains('#') || !QChar::isLetter(c[0]) || !QChar::isLetter(c[1]); bool airlineRegistrationInconsistent = !airlineRegistrationStatus && (c[0] || c[1]); bool bds_2_1 = !aircraftRegistrationInvalid && !aircraftRegistrationInconsistent && !airlineRegistrationInvalid && !airlineRegistrationInconsistent; @@ -4599,6 +4599,11 @@ void ADSBDemodGUI::applyMapSettings() Real stationAltitude = MainCore::instance()->getSettings().getAltitude(); QQuickItem *item = ui->map->rootObject(); + if (!item) + { + qCritical("ADSBDemodGUI::applyMapSettings: Map not found. Are all required Qt plugins installed?"); + return; + } QObject *object = item->findChild("map"); QGeoCoordinate coords; @@ -5067,7 +5072,7 @@ void ADSBDemodGUI::leaveEvent(QEvent* event) ChannelGUI::leaveEvent(event); } -void ADSBDemodGUI::enterEvent(QEvent* event) +void ADSBDemodGUI::enterEvent(EnterEventType* event) { m_channelMarker.setHighlighted(true); ChannelGUI::enterEvent(event); diff --git a/plugins/channelrx/demodadsb/adsbdemodgui.h b/plugins/channelrx/demodadsb/adsbdemodgui.h index 8bf57accf..6c79cf271 100644 --- a/plugins/channelrx/demodadsb/adsbdemodgui.h +++ b/plugins/channelrx/demodadsb/adsbdemodgui.h @@ -1016,7 +1016,7 @@ private: void applyImportSettings(); void leaveEvent(QEvent*); - void enterEvent(QEvent*); + void enterEvent(EnterEventType*); private slots: void on_deltaFrequency_changed(qint64 value); diff --git a/plugins/channelrx/demodadsb/adsbosmtemplateserver.h b/plugins/channelrx/demodadsb/adsbosmtemplateserver.h index 4f744e578..e1ffb9fb0 100644 --- a/plugins/channelrx/demodadsb/adsbosmtemplateserver.h +++ b/plugins/channelrx/demodadsb/adsbosmtemplateserver.h @@ -21,6 +21,7 @@ #include #include #include +#include // Redirect OSM maps so we can support Street, Satellite and an Aviation map (CartoDB position) class ADSBOSMTemplateServer : public QTcpServer @@ -56,7 +57,7 @@ private slots: if (socket->canReadLine()) { QString line = socket->readLine(); - QStringList tokens = QString(line).split(QRegExp("[ \r\n][ \r\n]*")); + QStringList tokens = QString(line).split(QRegularExpression("[ \r\n][ \r\n]*")); if (tokens[0] == "GET") { bool hires = tokens[1].contains("hires"); diff --git a/plugins/channelrx/demodais/CMakeLists.txt b/plugins/channelrx/demodais/CMakeLists.txt index 14bf2cd59..09978a0b9 100644 --- a/plugins/channelrx/demodais/CMakeLists.txt +++ b/plugins/channelrx/demodais/CMakeLists.txt @@ -34,7 +34,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME demodais) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -49,7 +49,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/channelrx/demodais/aisdemodgui.cpp b/plugins/channelrx/demodais/aisdemodgui.cpp index 2a3e708e8..b365a9bb7 100644 --- a/plugins/channelrx/demodais/aisdemodgui.cpp +++ b/plugins/channelrx/demodais/aisdemodgui.cpp @@ -632,7 +632,7 @@ void AISDemodGUI::leaveEvent(QEvent* event) ChannelGUI::leaveEvent(event); } -void AISDemodGUI::enterEvent(QEvent* event) +void AISDemodGUI::enterEvent(EnterEventType* event) { m_channelMarker.setHighlighted(true); ChannelGUI::enterEvent(event); diff --git a/plugins/channelrx/demodais/aisdemodgui.h b/plugins/channelrx/demodais/aisdemodgui.h index 7209daaf1..e644ede36 100644 --- a/plugins/channelrx/demodais/aisdemodgui.h +++ b/plugins/channelrx/demodais/aisdemodgui.h @@ -104,7 +104,7 @@ private: void updateAbsoluteCenterFrequency(); void leaveEvent(QEvent*); - void enterEvent(QEvent*); + void enterEvent(EnterEventType*); void resizeTable(); QAction *createCheckableItem(QString& text, int idx, bool checked, const char *slot); diff --git a/plugins/channelrx/demodam/CMakeLists.txt b/plugins/channelrx/demodam/CMakeLists.txt index ecc7b89b1..c185ce8d9 100644 --- a/plugins/channelrx/demodam/CMakeLists.txt +++ b/plugins/channelrx/demodam/CMakeLists.txt @@ -38,7 +38,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME demodam) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -53,7 +53,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/channelrx/demodam/amdemodgui.cpp b/plugins/channelrx/demodam/amdemodgui.cpp index 360fad1b8..fcc729bbc 100644 --- a/plugins/channelrx/demodam/amdemodgui.cpp +++ b/plugins/channelrx/demodam/amdemodgui.cpp @@ -404,7 +404,7 @@ void AMDemodGUI::leaveEvent(QEvent* event) ChannelGUI::leaveEvent(event); } -void AMDemodGUI::enterEvent(QEvent* event) +void AMDemodGUI::enterEvent(EnterEventType* event) { m_channelMarker.setHighlighted(true); ChannelGUI::enterEvent(event); diff --git a/plugins/channelrx/demodam/amdemodgui.h b/plugins/channelrx/demodam/amdemodgui.h index cedcf4b0c..5f442266d 100644 --- a/plugins/channelrx/demodam/amdemodgui.h +++ b/plugins/channelrx/demodam/amdemodgui.h @@ -79,7 +79,7 @@ private: void updateAbsoluteCenterFrequency(); void leaveEvent(QEvent*); - void enterEvent(QEvent*); + void enterEvent(EnterEventType*); private slots: void on_deltaFrequency_changed(qint64 value); diff --git a/plugins/channelrx/demodapt/CMakeLists.txt b/plugins/channelrx/demodapt/CMakeLists.txt index da90ac59a..29aa74166 100644 --- a/plugins/channelrx/demodapt/CMakeLists.txt +++ b/plugins/channelrx/demodapt/CMakeLists.txt @@ -45,7 +45,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME demodapt) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -68,7 +68,7 @@ if(SGP4_EXTERNAL) endif() target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/channelrx/demodapt/aptdemodgui.cpp b/plugins/channelrx/demodapt/aptdemodgui.cpp index 25cd5af69..277d3851e 100644 --- a/plugins/channelrx/demodapt/aptdemodgui.cpp +++ b/plugins/channelrx/demodapt/aptdemodgui.cpp @@ -827,7 +827,7 @@ void APTDemodGUI::leaveEvent(QEvent* event) ChannelGUI::leaveEvent(event); } -void APTDemodGUI::enterEvent(QEvent* event) +void APTDemodGUI::enterEvent(EnterEventType* event) { m_channelMarker.setHighlighted(true); ChannelGUI::enterEvent(event); diff --git a/plugins/channelrx/demodapt/aptdemodgui.h b/plugins/channelrx/demodapt/aptdemodgui.h index 71fc5b2cf..e48acecc9 100644 --- a/plugins/channelrx/demodapt/aptdemodgui.h +++ b/plugins/channelrx/demodapt/aptdemodgui.h @@ -133,7 +133,7 @@ private: void resetDecoder(); void leaveEvent(QEvent*); - void enterEvent(QEvent*); + void enterEvent(EnterEventType*); private slots: void on_deltaFrequency_changed(qint64 value); diff --git a/plugins/channelrx/demodapt/aptdemodimageworker.cpp b/plugins/channelrx/demodapt/aptdemodimageworker.cpp index 185bad321..d33c11127 100644 --- a/plugins/channelrx/demodapt/aptdemodimageworker.cpp +++ b/plugins/channelrx/demodapt/aptdemodimageworker.cpp @@ -486,7 +486,7 @@ QRgb APTDemodImageWorker::findNearest(const QImage &image, double latitude, doub yMin = std::max(yMin, yStartPostCrop); yMax = std::min(yMax, yEndPostCrop); xMin = std::max(xMin, 0); - xMax = std::min(xMax, m_pixelCoords[0].size()); + xMax = std::min(xMax, (int)m_pixelCoords[0].size()); } const int ySize = yEndPostCrop-1; diff --git a/plugins/channelrx/demodatv/CMakeLists.txt b/plugins/channelrx/demodatv/CMakeLists.txt index 3f1bb5301..322a55fd6 100644 --- a/plugins/channelrx/demodatv/CMakeLists.txt +++ b/plugins/channelrx/demodatv/CMakeLists.txt @@ -34,8 +34,8 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core - Qt5::Widgets + Qt::Core + Qt::Widgets sdrbase sdrgui ) diff --git a/plugins/channelrx/demodatv/atvdemodgui.cpp b/plugins/channelrx/demodatv/atvdemodgui.cpp index 1c91dd850..11f363966 100644 --- a/plugins/channelrx/demodatv/atvdemodgui.cpp +++ b/plugins/channelrx/demodatv/atvdemodgui.cpp @@ -415,7 +415,7 @@ void ATVDemodGUI::leaveEvent(QEvent* event) ChannelGUI::leaveEvent(event); } -void ATVDemodGUI::enterEvent(QEvent* event) +void ATVDemodGUI::enterEvent(EnterEventType* event) { m_channelMarker.setHighlighted(true); ChannelGUI::enterEvent(event); diff --git a/plugins/channelrx/demodatv/atvdemodgui.h b/plugins/channelrx/demodatv/atvdemodgui.h index 663d565a9..50a7ffd1b 100644 --- a/plugins/channelrx/demodatv/atvdemodgui.h +++ b/plugins/channelrx/demodatv/atvdemodgui.h @@ -103,7 +103,7 @@ private: void updateAbsoluteCenterFrequency(); void leaveEvent(QEvent*); - void enterEvent(QEvent*); + void enterEvent(EnterEventType*); private slots: void handleSourceMessages(); diff --git a/plugins/channelrx/demodbfm/CMakeLists.txt b/plugins/channelrx/demodbfm/CMakeLists.txt index 3eeb92783..46af33186 100644 --- a/plugins/channelrx/demodbfm/CMakeLists.txt +++ b/plugins/channelrx/demodbfm/CMakeLists.txt @@ -45,7 +45,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME demodbfm) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -60,7 +60,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/channelrx/demodbfm/bfmdemodgui.cpp b/plugins/channelrx/demodbfm/bfmdemodgui.cpp index 01995ff02..daacf41dc 100644 --- a/plugins/channelrx/demodbfm/bfmdemodgui.cpp +++ b/plugins/channelrx/demodbfm/bfmdemodgui.cpp @@ -509,7 +509,7 @@ void BFMDemodGUI::leaveEvent(QEvent* event) ChannelGUI::leaveEvent(event); } -void BFMDemodGUI::enterEvent(QEvent* event) +void BFMDemodGUI::enterEvent(EnterEventType* event) { m_channelMarker.setHighlighted(true); ChannelGUI::enterEvent(event); diff --git a/plugins/channelrx/demodbfm/bfmdemodgui.h b/plugins/channelrx/demodbfm/bfmdemodgui.h index 7b3f441a3..ed4a5b42e 100644 --- a/plugins/channelrx/demodbfm/bfmdemodgui.h +++ b/plugins/channelrx/demodbfm/bfmdemodgui.h @@ -97,7 +97,7 @@ private: void updateAbsoluteCenterFrequency(); void leaveEvent(QEvent*); - void enterEvent(QEvent*); + void enterEvent(EnterEventType*); void changeFrequency(qint64 f); diff --git a/plugins/channelrx/demodchirpchat/CMakeLists.txt b/plugins/channelrx/demodchirpchat/CMakeLists.txt index af65e7238..f312b65e4 100644 --- a/plugins/channelrx/demodchirpchat/CMakeLists.txt +++ b/plugins/channelrx/demodchirpchat/CMakeLists.txt @@ -41,7 +41,7 @@ if(NOT SERVER_MODE) chirpchatdemodgui.h ) set(TARGET_NAME demodchirpchat) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -56,7 +56,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/channelrx/demoddab/CMakeLists.txt b/plugins/channelrx/demoddab/CMakeLists.txt index 39d39ca60..38311707a 100644 --- a/plugins/channelrx/demoddab/CMakeLists.txt +++ b/plugins/channelrx/demoddab/CMakeLists.txt @@ -39,7 +39,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME demoddab) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -54,7 +54,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/channelrx/demoddab/dabdemodgui.cpp b/plugins/channelrx/demoddab/dabdemodgui.cpp index af7515879..4aa91d933 100644 --- a/plugins/channelrx/demoddab/dabdemodgui.cpp +++ b/plugins/channelrx/demoddab/dabdemodgui.cpp @@ -595,7 +595,7 @@ void DABDemodGUI::leaveEvent(QEvent* event) ChannelGUI::leaveEvent(event); } -void DABDemodGUI::enterEvent(QEvent* event) +void DABDemodGUI::enterEvent(EnterEventType* event) { m_channelMarker.setHighlighted(true); ChannelGUI::enterEvent(event); diff --git a/plugins/channelrx/demoddab/dabdemodgui.h b/plugins/channelrx/demoddab/dabdemodgui.h index b5b4e9681..246e760d8 100644 --- a/plugins/channelrx/demoddab/dabdemodgui.h +++ b/plugins/channelrx/demoddab/dabdemodgui.h @@ -99,7 +99,7 @@ private: void updateAbsoluteCenterFrequency(); void leaveEvent(QEvent*); - void enterEvent(QEvent*); + void enterEvent(EnterEventType*); void resetService(); void clearProgram(); void resizeTable(); diff --git a/plugins/channelrx/demoddatv/CMakeLists.txt b/plugins/channelrx/demoddatv/CMakeLists.txt index 67570c885..552991080 100644 --- a/plugins/channelrx/demoddatv/CMakeLists.txt +++ b/plugins/channelrx/demoddatv/CMakeLists.txt @@ -77,10 +77,10 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core - Qt5::Widgets - Qt5::Multimedia - Qt5::MultimediaWidgets + Qt::Core + Qt::Widgets + Qt::Multimedia + Qt::MultimediaWidgets sdrbase sdrgui ${AVCODEC_LIBRARIES} diff --git a/plugins/channelrx/demoddatv/datvdemodgui.cpp b/plugins/channelrx/demoddatv/datvdemodgui.cpp index 0c524ba76..aeb54c4a3 100644 --- a/plugins/channelrx/demoddatv/datvdemodgui.cpp +++ b/plugins/channelrx/demoddatv/datvdemodgui.cpp @@ -498,7 +498,7 @@ void DATVDemodGUI::leaveEvent(QEvent* event) ChannelGUI::leaveEvent(event); } -void DATVDemodGUI::enterEvent(QEvent* event) +void DATVDemodGUI::enterEvent(EnterEventType* event) { blockApplySettings(true); m_channelMarker.setHighlighted(true); diff --git a/plugins/channelrx/demoddatv/datvdemodgui.h b/plugins/channelrx/demoddatv/datvdemodgui.h index 495ef9abf..c5c6a89c5 100644 --- a/plugins/channelrx/demoddatv/datvdemodgui.h +++ b/plugins/channelrx/demoddatv/datvdemodgui.h @@ -148,7 +148,7 @@ private: void displayRRCParameters(bool blnVisible); void leaveEvent(QEvent*); - void enterEvent(QEvent*); + void enterEvent(EnterEventType*); bool handleMessage(const Message& objMessage); void makeUIConnections(); void updateAbsoluteCenterFrequency(); diff --git a/plugins/channelrx/demoddatv/leansdr/generic.h b/plugins/channelrx/demoddatv/leansdr/generic.h index e7af15fc0..cd85aff50 100644 --- a/plugins/channelrx/demoddatv/leansdr/generic.h +++ b/plugins/channelrx/demoddatv/leansdr/generic.h @@ -37,6 +37,8 @@ namespace leansdr // Simple blocks ////////////////////////////////////////////////////////////////////// +/* // Commented out, as not needed, as does compile on Windows + // [file_reader] reads raw data from a file descriptor into a [pipebuf]. // If the file descriptor is seekable, data can be looped. @@ -151,6 +153,8 @@ struct file_reader : runnable pipewriter out; }; +*/ + // [file_writer] writes raw data from a [pipebuf] to a file descriptor. template diff --git a/plugins/channelrx/demoddsd/CMakeLists.txt b/plugins/channelrx/demoddsd/CMakeLists.txt index 9908a5245..e4205aaec 100644 --- a/plugins/channelrx/demoddsd/CMakeLists.txt +++ b/plugins/channelrx/demoddsd/CMakeLists.txt @@ -43,7 +43,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME demoddsd) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -62,7 +62,7 @@ if(LIBDSDCC_EXTERNAL) endif() target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/channelrx/demoddsd/dsddemodgui.cpp b/plugins/channelrx/demoddsd/dsddemodgui.cpp index 345985277..5316023e8 100644 --- a/plugins/channelrx/demoddsd/dsddemodgui.cpp +++ b/plugins/channelrx/demoddsd/dsddemodgui.cpp @@ -571,7 +571,7 @@ void DSDDemodGUI::leaveEvent(QEvent* event) ChannelGUI::leaveEvent(event); } -void DSDDemodGUI::enterEvent(QEvent* event) +void DSDDemodGUI::enterEvent(EnterEventType* event) { m_channelMarker.setHighlighted(true); ChannelGUI::enterEvent(event); diff --git a/plugins/channelrx/demoddsd/dsddemodgui.h b/plugins/channelrx/demoddsd/dsddemodgui.h index 9d1968804..614381d1c 100644 --- a/plugins/channelrx/demoddsd/dsddemodgui.h +++ b/plugins/channelrx/demoddsd/dsddemodgui.h @@ -122,7 +122,7 @@ private: void updateAbsoluteCenterFrequency(); void leaveEvent(QEvent*); - void enterEvent(QEvent*); + void enterEvent(EnterEventType*); private slots: void on_deltaFrequency_changed(qint64 value); diff --git a/plugins/channelrx/demodfreedv/CMakeLists.txt b/plugins/channelrx/demodfreedv/CMakeLists.txt index 33a21d386..79a70448a 100644 --- a/plugins/channelrx/demodfreedv/CMakeLists.txt +++ b/plugins/channelrx/demodfreedv/CMakeLists.txt @@ -34,7 +34,7 @@ if(NOT SERVER_MODE) freedvdemodgui.h ) set(TARGET_NAME demodfreedv) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -53,7 +53,7 @@ if(CODEC2_EXTERNAL) endif() target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/channelrx/demodfreedv/freedvdemodgui.cpp b/plugins/channelrx/demodfreedv/freedvdemodgui.cpp index 22e344022..55d2faae7 100644 --- a/plugins/channelrx/demodfreedv/freedvdemodgui.cpp +++ b/plugins/channelrx/demodfreedv/freedvdemodgui.cpp @@ -422,7 +422,7 @@ void FreeDVDemodGUI::leaveEvent(QEvent* event) ChannelGUI::leaveEvent(event); } -void FreeDVDemodGUI::enterEvent(QEvent* event) +void FreeDVDemodGUI::enterEvent(EnterEventType* event) { m_channelMarker.setHighlighted(true); ChannelGUI::enterEvent(event); diff --git a/plugins/channelrx/demodfreedv/freedvdemodgui.h b/plugins/channelrx/demodfreedv/freedvdemodgui.h index 8d9be693d..5088194bd 100644 --- a/plugins/channelrx/demodfreedv/freedvdemodgui.h +++ b/plugins/channelrx/demodfreedv/freedvdemodgui.h @@ -104,7 +104,7 @@ private: void updateAbsoluteCenterFrequency(); void leaveEvent(QEvent*); - void enterEvent(QEvent*); + void enterEvent(EnterEventType*); private slots: void on_deltaFrequency_changed(qint64 value); diff --git a/plugins/channelrx/demodm17/CMakeLists.txt b/plugins/channelrx/demodm17/CMakeLists.txt index 792748365..27918126f 100644 --- a/plugins/channelrx/demodm17/CMakeLists.txt +++ b/plugins/channelrx/demodm17/CMakeLists.txt @@ -44,7 +44,7 @@ if(NOT SERVER_MODE) m17statustextdialog.h ) set(TARGET_NAME demodm17) - set(TARGET_LIB "Qt5::Widgets" Qt5::Charts) + set(TARGET_LIB "Qt::Widgets" Qt::Charts) set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -63,7 +63,7 @@ if(CODEC2_EXTERNAL) endif() target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/channelrx/demodm17/m17demodgui.cpp b/plugins/channelrx/demodm17/m17demodgui.cpp index 636acfd29..50aae0dd2 100644 --- a/plugins/channelrx/demodm17/m17demodgui.cpp +++ b/plugins/channelrx/demodm17/m17demodgui.cpp @@ -612,7 +612,7 @@ void M17DemodGUI::leaveEvent(QEvent* event) ChannelGUI::leaveEvent(event); } -void M17DemodGUI::enterEvent(QEvent* event) +void M17DemodGUI::enterEvent(EnterEventType* event) { m_channelMarker.setHighlighted(true); ChannelGUI::enterEvent(event); diff --git a/plugins/channelrx/demodm17/m17demodgui.h b/plugins/channelrx/demodm17/m17demodgui.h index 110922cca..35b3b7975 100644 --- a/plugins/channelrx/demodm17/m17demodgui.h +++ b/plugins/channelrx/demodm17/m17demodgui.h @@ -137,7 +137,7 @@ private: static float distance(float lat1, float lon1, float lat2, float lon2); void leaveEvent(QEvent*); - void enterEvent(QEvent*); + void enterEvent(EnterEventType*); private slots: void on_deltaFrequency_changed(qint64 value); diff --git a/plugins/channelrx/demodnfm/CMakeLists.txt b/plugins/channelrx/demodnfm/CMakeLists.txt index 26de054e7..117f7ae61 100644 --- a/plugins/channelrx/demodnfm/CMakeLists.txt +++ b/plugins/channelrx/demodnfm/CMakeLists.txt @@ -39,7 +39,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME demodnfm) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -54,7 +54,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/channelrx/demodnfm/nfmdemodgui.cpp b/plugins/channelrx/demodnfm/nfmdemodgui.cpp index bdfe0c2bf..69f176ea8 100644 --- a/plugins/channelrx/demodnfm/nfmdemodgui.cpp +++ b/plugins/channelrx/demodnfm/nfmdemodgui.cpp @@ -539,7 +539,7 @@ void NFMDemodGUI::leaveEvent(QEvent* event) ChannelGUI::leaveEvent(event); } -void NFMDemodGUI::enterEvent(QEvent* event) +void NFMDemodGUI::enterEvent(EnterEventType* event) { m_channelMarker.setHighlighted(true); ChannelGUI::enterEvent(event); diff --git a/plugins/channelrx/demodnfm/nfmdemodgui.h b/plugins/channelrx/demodnfm/nfmdemodgui.h index e320900d6..68dc7be73 100644 --- a/plugins/channelrx/demodnfm/nfmdemodgui.h +++ b/plugins/channelrx/demodnfm/nfmdemodgui.h @@ -79,7 +79,7 @@ private: void updateAbsoluteCenterFrequency(); void leaveEvent(QEvent*); - void enterEvent(QEvent*); + void enterEvent(EnterEventType*); private slots: void on_deltaFrequency_changed(qint64 value); diff --git a/plugins/channelrx/demodpacket/CMakeLists.txt b/plugins/channelrx/demodpacket/CMakeLists.txt index 6967d60b3..df95998c0 100644 --- a/plugins/channelrx/demodpacket/CMakeLists.txt +++ b/plugins/channelrx/demodpacket/CMakeLists.txt @@ -34,7 +34,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME demodpacket) - set(TARGET_LIB "Qt5::Widgets" Qt5::Quick Qt5::QuickWidgets Qt5::Positioning) + set(TARGET_LIB "Qt::Widgets" Qt::Quick Qt::QuickWidgets Qt::Positioning) set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -49,7 +49,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/channelrx/demodpacket/packetdemodgui.cpp b/plugins/channelrx/demodpacket/packetdemodgui.cpp index 4061a612a..5faa2384e 100644 --- a/plugins/channelrx/demodpacket/packetdemodgui.cpp +++ b/plugins/channelrx/demodpacket/packetdemodgui.cpp @@ -576,7 +576,7 @@ void PacketDemodGUI::leaveEvent(QEvent* event) ChannelGUI::leaveEvent(event); } -void PacketDemodGUI::enterEvent(QEvent* event) +void PacketDemodGUI::enterEvent(EnterEventType* event) { m_channelMarker.setHighlighted(true); ChannelGUI::enterEvent(event); diff --git a/plugins/channelrx/demodpacket/packetdemodgui.h b/plugins/channelrx/demodpacket/packetdemodgui.h index 613692a8b..8369b6638 100644 --- a/plugins/channelrx/demodpacket/packetdemodgui.h +++ b/plugins/channelrx/demodpacket/packetdemodgui.h @@ -103,7 +103,7 @@ private: void updateAbsoluteCenterFrequency(); void leaveEvent(QEvent*); - void enterEvent(QEvent*); + void enterEvent(EnterEventType*); void resizeTable(); QAction *createCheckableItem(QString& text, int idx, bool checked); diff --git a/plugins/channelrx/demodpager/CMakeLists.txt b/plugins/channelrx/demodpager/CMakeLists.txt index a8a3503c0..beb2eefdf 100644 --- a/plugins/channelrx/demodpager/CMakeLists.txt +++ b/plugins/channelrx/demodpager/CMakeLists.txt @@ -37,7 +37,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME demodpager) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -52,7 +52,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/channelrx/demodpager/pagerdemodgui.cpp b/plugins/channelrx/demodpager/pagerdemodgui.cpp index 9175c445d..0e56bd151 100644 --- a/plugins/channelrx/demodpager/pagerdemodgui.cpp +++ b/plugins/channelrx/demodpager/pagerdemodgui.cpp @@ -665,7 +665,7 @@ void PagerDemodGUI::leaveEvent(QEvent* event) ChannelGUI::leaveEvent(event); } -void PagerDemodGUI::enterEvent(QEvent* event) +void PagerDemodGUI::enterEvent(EnterEventType* event) { m_channelMarker.setHighlighted(true); ChannelGUI::enterEvent(event); diff --git a/plugins/channelrx/demodpager/pagerdemodgui.h b/plugins/channelrx/demodpager/pagerdemodgui.h index f42f136be..d0b9bf619 100644 --- a/plugins/channelrx/demodpager/pagerdemodgui.h +++ b/plugins/channelrx/demodpager/pagerdemodgui.h @@ -100,7 +100,7 @@ private: void updateAbsoluteCenterFrequency(); void leaveEvent(QEvent*); - void enterEvent(QEvent*); + void enterEvent(EnterEventType*); void resizeTable(); QAction *createCheckableItem(QString& text, int idx, bool checked, const char *slot); diff --git a/plugins/channelrx/demodpager/pagerdemodsink.cpp b/plugins/channelrx/demodpager/pagerdemodsink.cpp index af023831c..04261c007 100644 --- a/plugins/channelrx/demodpager/pagerdemodsink.cpp +++ b/plugins/channelrx/demodpager/pagerdemodsink.cpp @@ -274,12 +274,12 @@ void PagerDemodSink::decodeBatch() if (getMessageQueueToChannel()) { // Convert from 7-bit to UTF-8 using user specified encoding - for (int i = 0; i < m_alphaMessage; i++) + for (int i = 0; i < m_alphaMessage.size(); i++) { QChar c = m_alphaMessage[i]; int idx = m_settings.m_sevenbit.indexOf(c.toLatin1()); if (idx >= 0) { - c = m_settings.m_unicode[idx]; + c = QChar(m_settings.m_unicode[idx]); } m_alphaMessage[i] = c; } diff --git a/plugins/channelrx/demodradiosonde/CMakeLists.txt b/plugins/channelrx/demodradiosonde/CMakeLists.txt index 4301cd726..74b63171a 100644 --- a/plugins/channelrx/demodradiosonde/CMakeLists.txt +++ b/plugins/channelrx/demodradiosonde/CMakeLists.txt @@ -34,7 +34,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME demodradiosonde) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -49,7 +49,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/channelrx/demodradiosonde/radiosondedemodgui.cpp b/plugins/channelrx/demodradiosonde/radiosondedemodgui.cpp index 3713a4228..3ad505ba6 100644 --- a/plugins/channelrx/demodradiosonde/radiosondedemodgui.cpp +++ b/plugins/channelrx/demodradiosonde/radiosondedemodgui.cpp @@ -769,7 +769,7 @@ void RadiosondeDemodGUI::leaveEvent(QEvent* event) ChannelGUI::leaveEvent(event); } -void RadiosondeDemodGUI::enterEvent(QEvent* event) +void RadiosondeDemodGUI::enterEvent(EnterEventType* event) { m_channelMarker.setHighlighted(true); ChannelGUI::enterEvent(event); diff --git a/plugins/channelrx/demodradiosonde/radiosondedemodgui.h b/plugins/channelrx/demodradiosonde/radiosondedemodgui.h index ca3879c8b..0e987abbd 100644 --- a/plugins/channelrx/demodradiosonde/radiosondedemodgui.h +++ b/plugins/channelrx/demodradiosonde/radiosondedemodgui.h @@ -102,7 +102,7 @@ private: void updateAbsoluteCenterFrequency(); void leaveEvent(QEvent*); - void enterEvent(QEvent*); + void enterEvent(EnterEventType*); void resizeTable(); QAction *createCheckableItem(QString& text, int idx, bool checked, const char *slot); diff --git a/plugins/channelrx/demodssb/CMakeLists.txt b/plugins/channelrx/demodssb/CMakeLists.txt index 934a50796..f617295af 100644 --- a/plugins/channelrx/demodssb/CMakeLists.txt +++ b/plugins/channelrx/demodssb/CMakeLists.txt @@ -33,7 +33,7 @@ if(NOT SERVER_MODE) ssbdemodgui.h ) set(TARGET_NAME demodssb) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -48,7 +48,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/channelrx/demodssb/ssbdemodgui.cpp b/plugins/channelrx/demodssb/ssbdemodgui.cpp index d5c7f80ea..02cfe584a 100644 --- a/plugins/channelrx/demodssb/ssbdemodgui.cpp +++ b/plugins/channelrx/demodssb/ssbdemodgui.cpp @@ -667,7 +667,7 @@ void SSBDemodGUI::leaveEvent(QEvent* event) ChannelGUI::leaveEvent(event); } -void SSBDemodGUI::enterEvent(QEvent* event) +void SSBDemodGUI::enterEvent(EnterEventType* event) { m_channelMarker.setHighlighted(true); ChannelGUI::enterEvent(event); diff --git a/plugins/channelrx/demodssb/ssbdemodgui.h b/plugins/channelrx/demodssb/ssbdemodgui.h index 7a1519a97..623b49805 100644 --- a/plugins/channelrx/demodssb/ssbdemodgui.h +++ b/plugins/channelrx/demodssb/ssbdemodgui.h @@ -89,7 +89,7 @@ private: void updateAbsoluteCenterFrequency(); void leaveEvent(QEvent*); - void enterEvent(QEvent*); + void enterEvent(EnterEventType*); private slots: void on_deltaFrequency_changed(qint64 value); diff --git a/plugins/channelrx/demodvor/CMakeLists.txt b/plugins/channelrx/demodvor/CMakeLists.txt index c488df18f..da0bd5eb0 100644 --- a/plugins/channelrx/demodvor/CMakeLists.txt +++ b/plugins/channelrx/demodvor/CMakeLists.txt @@ -36,7 +36,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME demodvor) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -51,7 +51,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/channelrx/demodvor/vordemodgui.cpp b/plugins/channelrx/demodvor/vordemodgui.cpp index 24354e896..cacb5c12b 100644 --- a/plugins/channelrx/demodvor/vordemodgui.cpp +++ b/plugins/channelrx/demodvor/vordemodgui.cpp @@ -395,7 +395,7 @@ void VORDemodGUI::leaveEvent(QEvent* event) ChannelGUI::leaveEvent(event); } -void VORDemodGUI::enterEvent(QEvent* event) +void VORDemodGUI::enterEvent(EnterEventType* event) { m_channelMarker.setHighlighted(true); ChannelGUI::enterEvent(event); diff --git a/plugins/channelrx/demodvor/vordemodgui.h b/plugins/channelrx/demodvor/vordemodgui.h index 7ebdc943b..cc0bba9b8 100644 --- a/plugins/channelrx/demodvor/vordemodgui.h +++ b/plugins/channelrx/demodvor/vordemodgui.h @@ -91,7 +91,7 @@ private: void updateAbsoluteCenterFrequency(); void leaveEvent(QEvent*); - void enterEvent(QEvent*); + void enterEvent(EnterEventType*); private slots: void on_deltaFrequency_changed(qint64 value); diff --git a/plugins/channelrx/demodvormc/CMakeLists.txt b/plugins/channelrx/demodvormc/CMakeLists.txt index 46490ec17..47916407e 100644 --- a/plugins/channelrx/demodvormc/CMakeLists.txt +++ b/plugins/channelrx/demodvormc/CMakeLists.txt @@ -41,7 +41,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME demodvormc) - set(TARGET_LIB "Qt5::Widgets" Qt5::Quick Qt5::QuickWidgets Qt5::Positioning) + set(TARGET_LIB "Qt::Widgets" Qt::Quick Qt::QuickWidgets Qt::Positioning) set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -56,7 +56,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/channelrx/demodvormc/vordemodmcgui.cpp b/plugins/channelrx/demodvormc/vordemodmcgui.cpp index b5c9537da..871ffa896 100644 --- a/plugins/channelrx/demodvormc/vordemodmcgui.cpp +++ b/plugins/channelrx/demodvormc/vordemodmcgui.cpp @@ -1353,7 +1353,7 @@ void VORDemodMCGUI::leaveEvent(QEvent* event) ChannelGUI::leaveEvent(event); } -void VORDemodMCGUI::enterEvent(QEvent* event) +void VORDemodMCGUI::enterEvent(EnterEventType* event) { m_channelMarker.setHighlighted(true); ChannelGUI::enterEvent(event); diff --git a/plugins/channelrx/demodvormc/vordemodmcgui.h b/plugins/channelrx/demodvormc/vordemodmcgui.h index 4a08a14a1..419ad4546 100644 --- a/plugins/channelrx/demodvormc/vordemodmcgui.h +++ b/plugins/channelrx/demodvormc/vordemodmcgui.h @@ -269,7 +269,7 @@ private: void updateAbsoluteCenterFrequency(); void leaveEvent(QEvent*); - void enterEvent(QEvent*); + void enterEvent(EnterEventType*); void resizeTable(); QAction *createCheckableItem(QString& text, int idx, bool checked); diff --git a/plugins/channelrx/demodwfm/CMakeLists.txt b/plugins/channelrx/demodwfm/CMakeLists.txt index 1ae921975..d3e227c07 100644 --- a/plugins/channelrx/demodwfm/CMakeLists.txt +++ b/plugins/channelrx/demodwfm/CMakeLists.txt @@ -34,7 +34,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME demodwfm) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -49,7 +49,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/channelrx/demodwfm/wfmdemodgui.cpp b/plugins/channelrx/demodwfm/wfmdemodgui.cpp index 9863112df..28b7f0583 100644 --- a/plugins/channelrx/demodwfm/wfmdemodgui.cpp +++ b/plugins/channelrx/demodwfm/wfmdemodgui.cpp @@ -323,7 +323,7 @@ void WFMDemodGUI::leaveEvent(QEvent* event) ChannelGUI::leaveEvent(event); } -void WFMDemodGUI::enterEvent(QEvent* event) +void WFMDemodGUI::enterEvent(EnterEventType* event) { m_channelMarker.setHighlighted(true); ChannelGUI::enterEvent(event); diff --git a/plugins/channelrx/demodwfm/wfmdemodgui.h b/plugins/channelrx/demodwfm/wfmdemodgui.h index e456cd5fc..8fa18e55c 100644 --- a/plugins/channelrx/demodwfm/wfmdemodgui.h +++ b/plugins/channelrx/demodwfm/wfmdemodgui.h @@ -73,7 +73,7 @@ private: void updateAbsoluteCenterFrequency(); void leaveEvent(QEvent*); - void enterEvent(QEvent*); + void enterEvent(EnterEventType*); private slots: void on_deltaFrequency_changed(qint64 value); diff --git a/plugins/channelrx/filesink/CMakeLists.txt b/plugins/channelrx/filesink/CMakeLists.txt index 90388df02..c9b375c44 100644 --- a/plugins/channelrx/filesink/CMakeLists.txt +++ b/plugins/channelrx/filesink/CMakeLists.txt @@ -36,7 +36,7 @@ if(NOT SERVER_MODE) filesinkgui.h ) set(TARGET_NAME filesink) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -51,7 +51,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/channelrx/filesink/filesinkgui.cpp b/plugins/channelrx/filesink/filesinkgui.cpp index 9ae6005d8..5bb96aaca 100644 --- a/plugins/channelrx/filesink/filesinkgui.cpp +++ b/plugins/channelrx/filesink/filesinkgui.cpp @@ -314,7 +314,7 @@ void FileSinkGUI::leaveEvent(QEvent* event) ChannelGUI::leaveEvent(event); } -void FileSinkGUI::enterEvent(QEvent* event) +void FileSinkGUI::enterEvent(EnterEventType* event) { m_channelMarker.setHighlighted(true); ChannelGUI::enterEvent(event); diff --git a/plugins/channelrx/filesink/filesinkgui.h b/plugins/channelrx/filesink/filesinkgui.h index f38d0cbda..7a53698a1 100644 --- a/plugins/channelrx/filesink/filesinkgui.h +++ b/plugins/channelrx/filesink/filesinkgui.h @@ -103,7 +103,7 @@ private: void updateAbsoluteCenterFrequency(); void leaveEvent(QEvent*); - void enterEvent(QEvent*); + void enterEvent(EnterEventType*); private slots: void handleSourceMessages(); diff --git a/plugins/channelrx/freqtracker/CMakeLists.txt b/plugins/channelrx/freqtracker/CMakeLists.txt index ebafbb087..a6eea37b0 100644 --- a/plugins/channelrx/freqtracker/CMakeLists.txt +++ b/plugins/channelrx/freqtracker/CMakeLists.txt @@ -37,7 +37,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME freqtracker) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -52,7 +52,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/channelrx/freqtracker/freqtrackergui.cpp b/plugins/channelrx/freqtracker/freqtrackergui.cpp index 1cfb33a7a..d76cc758d 100644 --- a/plugins/channelrx/freqtracker/freqtrackergui.cpp +++ b/plugins/channelrx/freqtracker/freqtrackergui.cpp @@ -471,7 +471,7 @@ void FreqTrackerGUI::leaveEvent(QEvent* event) ChannelGUI::leaveEvent(event); } -void FreqTrackerGUI::enterEvent(QEvent* event) +void FreqTrackerGUI::enterEvent(EnterEventType* event) { m_channelMarker.setHighlighted(true); ChannelGUI::enterEvent(event); diff --git a/plugins/channelrx/freqtracker/freqtrackergui.h b/plugins/channelrx/freqtracker/freqtrackergui.h index 5f590ac81..7610eac20 100644 --- a/plugins/channelrx/freqtracker/freqtrackergui.h +++ b/plugins/channelrx/freqtracker/freqtrackergui.h @@ -96,7 +96,7 @@ private: void updateAbsoluteCenterFrequency(); void leaveEvent(QEvent*); - void enterEvent(QEvent*); + void enterEvent(EnterEventType*); private slots: void on_deltaFrequency_changed(qint64 value); diff --git a/plugins/channelrx/localsink/CMakeLists.txt b/plugins/channelrx/localsink/CMakeLists.txt index d1a9e4ab5..a5bfdd8bb 100644 --- a/plugins/channelrx/localsink/CMakeLists.txt +++ b/plugins/channelrx/localsink/CMakeLists.txt @@ -36,7 +36,7 @@ if(NOT SERVER_MODE) localsinkgui.h ) set(TARGET_NAME localsink) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -51,7 +51,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/channelrx/localsink/localsinkgui.cpp b/plugins/channelrx/localsink/localsinkgui.cpp index 01df6b2f3..f73bcce3d 100644 --- a/plugins/channelrx/localsink/localsinkgui.cpp +++ b/plugins/channelrx/localsink/localsinkgui.cpp @@ -231,7 +231,7 @@ void LocalSinkGUI::leaveEvent(QEvent* event) ChannelGUI::leaveEvent(event); } -void LocalSinkGUI::enterEvent(QEvent* event) +void LocalSinkGUI::enterEvent(EnterEventType* event) { m_channelMarker.setHighlighted(true); ChannelGUI::enterEvent(event); diff --git a/plugins/channelrx/localsink/localsinkgui.h b/plugins/channelrx/localsink/localsinkgui.h index 6d678d563..1904c4dca 100644 --- a/plugins/channelrx/localsink/localsinkgui.h +++ b/plugins/channelrx/localsink/localsinkgui.h @@ -91,7 +91,7 @@ private: void updateAbsoluteCenterFrequency(); void leaveEvent(QEvent*); - void enterEvent(QEvent*); + void enterEvent(EnterEventType*); void applyDecimation(); void applyPosition(); diff --git a/plugins/channelrx/noisefigure/CMakeLists.txt b/plugins/channelrx/noisefigure/CMakeLists.txt index 84a0ac269..4c6fbcb0c 100644 --- a/plugins/channelrx/noisefigure/CMakeLists.txt +++ b/plugins/channelrx/noisefigure/CMakeLists.txt @@ -41,7 +41,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME noisefigure) - set(TARGET_LIB "Qt5::Widgets" Qt5::Charts) + set(TARGET_LIB "Qt::Widgets" Qt::Charts) set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -56,7 +56,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/channelrx/noisefigure/noisefigure.cpp b/plugins/channelrx/noisefigure/noisefigure.cpp index 34b5f4682..f4ef3c25e 100644 --- a/plugins/channelrx/noisefigure/noisefigure.cpp +++ b/plugins/channelrx/noisefigure/noisefigure.cpp @@ -264,7 +264,7 @@ void NoiseFigure::nextState() if (m_settings.m_sweepSpec == NoiseFigureSettings::LIST) { // Create list of sweep values from string - QRegExp separator("[( |,|\t|)]"); + QRegularExpression separator("[( |,|\t|)]"); QStringList valueStrings = m_settings.m_sweepList.trimmed().split(separator); m_values.clear(); for (int i = 0; i < valueStrings.size(); i++) diff --git a/plugins/channelrx/noisefigure/noisefigureenrdialog.h b/plugins/channelrx/noisefigure/noisefigureenrdialog.h index 7a2fae08b..0fa082de7 100644 --- a/plugins/channelrx/noisefigure/noisefigureenrdialog.h +++ b/plugins/channelrx/noisefigure/noisefigureenrdialog.h @@ -23,7 +23,9 @@ #include "ui_noisefigureenrdialog.h" #include "noisefiguresettings.h" +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) using namespace QtCharts; +#endif class NoiseFigureENRDialog : public QDialog { Q_OBJECT diff --git a/plugins/channelrx/noisefigure/noisefiguregui.cpp b/plugins/channelrx/noisefigure/noisefiguregui.cpp index 41e96b60c..96274d3fb 100644 --- a/plugins/channelrx/noisefigure/noisefiguregui.cpp +++ b/plugins/channelrx/noisefigure/noisefiguregui.cpp @@ -765,7 +765,7 @@ void NoiseFigureGUI::leaveEvent(QEvent* event) ChannelGUI::leaveEvent(event); } -void NoiseFigureGUI::enterEvent(QEvent* event) +void NoiseFigureGUI::enterEvent(EnterEventType* event) { m_channelMarker.setHighlighted(true); ChannelGUI::enterEvent(event); diff --git a/plugins/channelrx/noisefigure/noisefiguregui.h b/plugins/channelrx/noisefigure/noisefiguregui.h index 100350faa..0bb96162b 100644 --- a/plugins/channelrx/noisefigure/noisefiguregui.h +++ b/plugins/channelrx/noisefigure/noisefiguregui.h @@ -42,7 +42,9 @@ namespace Ui { class NoiseFigureGUI; } +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) using namespace QtCharts; +#endif class NoiseFigureGUI : public ChannelGUI { Q_OBJECT @@ -107,7 +109,7 @@ private: void updateAbsoluteCenterFrequency(); void leaveEvent(QEvent*); - void enterEvent(QEvent*); + void enterEvent(EnterEventType*); void resizeTable(); QAction *createCheckableItem(QString& text, int idx, bool checked, const char *slot); diff --git a/plugins/channelrx/radioastronomy/CMakeLists.txt b/plugins/channelrx/radioastronomy/CMakeLists.txt index 04e07176e..5ac580a00 100644 --- a/plugins/channelrx/radioastronomy/CMakeLists.txt +++ b/plugins/channelrx/radioastronomy/CMakeLists.txt @@ -43,7 +43,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME radioastronomy) - set(TARGET_LIB "Qt5::Widgets" Qt5::Charts) + set(TARGET_LIB "Qt::Widgets" Qt::Charts) set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -58,7 +58,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/channelrx/radioastronomy/radioastronomygui.cpp b/plugins/channelrx/radioastronomy/radioastronomygui.cpp index c3b4e3e38..708821929 100644 --- a/plugins/channelrx/radioastronomy/radioastronomygui.cpp +++ b/plugins/channelrx/radioastronomy/radioastronomygui.cpp @@ -2552,7 +2552,7 @@ void RadioAstronomyGUI::leaveEvent(QEvent* event) ChannelGUI::leaveEvent(event); } -void RadioAstronomyGUI::enterEvent(QEvent* event) +void RadioAstronomyGUI::enterEvent(EnterEventType* event) { m_channelMarker.setHighlighted(true); ChannelGUI::enterEvent(event); diff --git a/plugins/channelrx/radioastronomy/radioastronomygui.h b/plugins/channelrx/radioastronomy/radioastronomygui.h index 434fd87b9..c94603d19 100644 --- a/plugins/channelrx/radioastronomy/radioastronomygui.h +++ b/plugins/channelrx/radioastronomy/radioastronomygui.h @@ -49,7 +49,9 @@ namespace Ui { } class RadioAstronomyGUI; +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) using namespace QtCharts; +#endif class RadioAstronomyGUI : public ChannelGUI { Q_OBJECT @@ -450,7 +452,7 @@ private: int powerYUnitsToIndex(RadioAstronomySettings::PowerYUnits units); void leaveEvent(QEvent*); - void enterEvent(QEvent*); + void enterEvent(EnterEventType*); void resizePowerTable(); void resizePowerMarkerTable(); diff --git a/plugins/channelrx/radioclock/CMakeLists.txt b/plugins/channelrx/radioclock/CMakeLists.txt index e2a8e98e3..384151cdd 100644 --- a/plugins/channelrx/radioclock/CMakeLists.txt +++ b/plugins/channelrx/radioclock/CMakeLists.txt @@ -34,7 +34,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME radioclock) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -49,7 +49,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/channelrx/radioclock/radioclockgui.cpp b/plugins/channelrx/radioclock/radioclockgui.cpp index de236c357..3c5304022 100644 --- a/plugins/channelrx/radioclock/radioclockgui.cpp +++ b/plugins/channelrx/radioclock/radioclockgui.cpp @@ -388,7 +388,7 @@ void RadioClockGUI::leaveEvent(QEvent* event) ChannelGUI::leaveEvent(event); } -void RadioClockGUI::enterEvent(QEvent* event) +void RadioClockGUI::enterEvent(EnterEventType* event) { m_channelMarker.setHighlighted(true); ChannelGUI::enterEvent(event); diff --git a/plugins/channelrx/radioclock/radioclockgui.h b/plugins/channelrx/radioclock/radioclockgui.h index 2d855e054..76de92de5 100644 --- a/plugins/channelrx/radioclock/radioclockgui.h +++ b/plugins/channelrx/radioclock/radioclockgui.h @@ -97,7 +97,7 @@ private: void displayDateTime(); void leaveEvent(QEvent*); - void enterEvent(QEvent*); + void enterEvent(EnterEventType*); private slots: void on_deltaFrequency_changed(qint64 value); diff --git a/plugins/channelrx/remotesink/CMakeLists.txt b/plugins/channelrx/remotesink/CMakeLists.txt index 5c37a8457..33a2f974f 100644 --- a/plugins/channelrx/remotesink/CMakeLists.txt +++ b/plugins/channelrx/remotesink/CMakeLists.txt @@ -40,7 +40,7 @@ if(NOT SERVER_MODE) remotesinkgui.h ) set(TARGET_NAME remotesink) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -59,7 +59,7 @@ if(CM256CC_EXTERNAL) endif() target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/channelrx/remotesink/remotesinkgui.cpp b/plugins/channelrx/remotesink/remotesinkgui.cpp index bef8b2086..c506cf976 100644 --- a/plugins/channelrx/remotesink/remotesinkgui.cpp +++ b/plugins/channelrx/remotesink/remotesinkgui.cpp @@ -200,7 +200,7 @@ void RemoteSinkGUI::leaveEvent(QEvent* event) ChannelGUI::leaveEvent(event); } -void RemoteSinkGUI::enterEvent(QEvent* event) +void RemoteSinkGUI::enterEvent(EnterEventType* event) { m_channelMarker.setHighlighted(true); ChannelGUI::enterEvent(event); diff --git a/plugins/channelrx/remotesink/remotesinkgui.h b/plugins/channelrx/remotesink/remotesinkgui.h index 441ae61ec..238a3377d 100644 --- a/plugins/channelrx/remotesink/remotesinkgui.h +++ b/plugins/channelrx/remotesink/remotesinkgui.h @@ -89,7 +89,7 @@ private: void updateAbsoluteCenterFrequency(); void leaveEvent(QEvent*); - void enterEvent(QEvent*); + void enterEvent(EnterEventType*); void applyDecimation(); void applyPosition(); diff --git a/plugins/channelrx/remotetcpsink/CMakeLists.txt b/plugins/channelrx/remotetcpsink/CMakeLists.txt index 4abac8af6..12fedbdab 100644 --- a/plugins/channelrx/remotetcpsink/CMakeLists.txt +++ b/plugins/channelrx/remotetcpsink/CMakeLists.txt @@ -34,7 +34,7 @@ if(NOT SERVER_MODE) remotetcpsinkgui.h ) set(TARGET_NAME remotetcpsink) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -49,7 +49,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/channelrx/remotetcpsink/remotetcpsinkgui.cpp b/plugins/channelrx/remotetcpsink/remotetcpsinkgui.cpp index cf0725775..a752105af 100644 --- a/plugins/channelrx/remotetcpsink/remotetcpsinkgui.cpp +++ b/plugins/channelrx/remotetcpsink/remotetcpsinkgui.cpp @@ -260,7 +260,7 @@ void RemoteTCPSinkGUI::leaveEvent(QEvent* event) ChannelGUI::leaveEvent(event); } -void RemoteTCPSinkGUI::enterEvent(QEvent* event) +void RemoteTCPSinkGUI::enterEvent(EnterEventType* event) { m_channelMarker.setHighlighted(true); ChannelGUI::enterEvent(event); diff --git a/plugins/channelrx/remotetcpsink/remotetcpsinkgui.h b/plugins/channelrx/remotetcpsink/remotetcpsinkgui.h index 850ca5bd0..b777a851f 100644 --- a/plugins/channelrx/remotetcpsink/remotetcpsinkgui.h +++ b/plugins/channelrx/remotetcpsink/remotetcpsinkgui.h @@ -97,7 +97,7 @@ private: void updateAbsoluteCenterFrequency(); void leaveEvent(QEvent*); - void enterEvent(QEvent*); + void enterEvent(EnterEventType*); void applyDecimation(); void applyPosition(); diff --git a/plugins/channelrx/sigmffilesink/CMakeLists.txt b/plugins/channelrx/sigmffilesink/CMakeLists.txt index 07299ff08..fb41a3ffb 100644 --- a/plugins/channelrx/sigmffilesink/CMakeLists.txt +++ b/plugins/channelrx/sigmffilesink/CMakeLists.txt @@ -36,7 +36,7 @@ if(NOT SERVER_MODE) sigmffilesinkgui.h ) set(TARGET_NAME sigmffilesink) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -51,7 +51,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/channelrx/sigmffilesink/sigmffilesinkgui.cpp b/plugins/channelrx/sigmffilesink/sigmffilesinkgui.cpp index 390864ec4..727105d4b 100644 --- a/plugins/channelrx/sigmffilesink/sigmffilesinkgui.cpp +++ b/plugins/channelrx/sigmffilesink/sigmffilesinkgui.cpp @@ -306,7 +306,7 @@ void SigMFFileSinkGUI::leaveEvent(QEvent* event) ChannelGUI::leaveEvent(event); } -void SigMFFileSinkGUI::enterEvent(QEvent* event) +void SigMFFileSinkGUI::enterEvent(EnterEventType* event) { m_channelMarker.setHighlighted(true); ChannelGUI::enterEvent(event); diff --git a/plugins/channelrx/sigmffilesink/sigmffilesinkgui.h b/plugins/channelrx/sigmffilesink/sigmffilesinkgui.h index eb18bc049..c3712d04c 100644 --- a/plugins/channelrx/sigmffilesink/sigmffilesinkgui.h +++ b/plugins/channelrx/sigmffilesink/sigmffilesinkgui.h @@ -103,7 +103,7 @@ private: void updateAbsoluteCenterFrequency(); void leaveEvent(QEvent*); - void enterEvent(QEvent*); + void enterEvent(EnterEventType*); private slots: void handleSourceMessages(); diff --git a/plugins/channelrx/udpsink/CMakeLists.txt b/plugins/channelrx/udpsink/CMakeLists.txt index c62573b54..d6bb2c174 100644 --- a/plugins/channelrx/udpsink/CMakeLists.txt +++ b/plugins/channelrx/udpsink/CMakeLists.txt @@ -35,7 +35,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME udpsink) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -50,9 +50,9 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} - Qt5::Network + Qt::Network sdrbase ${TARGET_LIB_GUI} ) diff --git a/plugins/channelrx/udpsink/udpsinkgui.cpp b/plugins/channelrx/udpsink/udpsinkgui.cpp index f5f22272b..5bdb1b2e1 100644 --- a/plugins/channelrx/udpsink/udpsinkgui.cpp +++ b/plugins/channelrx/udpsink/udpsinkgui.cpp @@ -657,7 +657,7 @@ void UDPSinkGUI::leaveEvent(QEvent* event) ChannelGUI::leaveEvent(event); } -void UDPSinkGUI::enterEvent(QEvent* event) +void UDPSinkGUI::enterEvent(EnterEventType* event) { m_channelMarker.setHighlighted(true); ChannelGUI::enterEvent(event); diff --git a/plugins/channelrx/udpsink/udpsinkgui.h b/plugins/channelrx/udpsink/udpsinkgui.h index d08e5dd4a..9ab86b0b6 100644 --- a/plugins/channelrx/udpsink/udpsinkgui.h +++ b/plugins/channelrx/udpsink/udpsinkgui.h @@ -101,7 +101,7 @@ private: void updateAbsoluteCenterFrequency(); void leaveEvent(QEvent*); - void enterEvent(QEvent*); + void enterEvent(EnterEventType*); private slots: void handleSourceMessages(); diff --git a/plugins/channeltx/filesource/CMakeLists.txt b/plugins/channeltx/filesource/CMakeLists.txt index 3a107439d..20d497ba8 100644 --- a/plugins/channeltx/filesource/CMakeLists.txt +++ b/plugins/channeltx/filesource/CMakeLists.txt @@ -36,7 +36,7 @@ if(NOT SERVER_MODE) filesourcegui.h ) set(TARGET_NAME filesource) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -51,9 +51,9 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} - Qt5::Network + Qt::Network sdrbase ${TARGET_LIB_GUI} swagger diff --git a/plugins/channeltx/filesource/filesourcegui.cpp b/plugins/channeltx/filesource/filesourcegui.cpp index cd7370d3e..1b6123a8e 100644 --- a/plugins/channeltx/filesource/filesourcegui.cpp +++ b/plugins/channeltx/filesource/filesourcegui.cpp @@ -339,7 +339,7 @@ void FileSourceGUI::leaveEvent(QEvent* event) ChannelGUI::leaveEvent(event); } -void FileSourceGUI::enterEvent(QEvent* event) +void FileSourceGUI::enterEvent(EnterEventType* event) { m_channelMarker.setHighlighted(true); ChannelGUI::enterEvent(event); diff --git a/plugins/channeltx/filesource/filesourcegui.h b/plugins/channeltx/filesource/filesourcegui.h index 92c86ec7f..a72e57457 100644 --- a/plugins/channeltx/filesource/filesourcegui.h +++ b/plugins/channeltx/filesource/filesourcegui.h @@ -100,7 +100,7 @@ private: void updateAbsoluteCenterFrequency(); void leaveEvent(QEvent*); - void enterEvent(QEvent*); + void enterEvent(EnterEventType*); void applyInterpolation(); void applyPosition(); diff --git a/plugins/channeltx/localsource/CMakeLists.txt b/plugins/channeltx/localsource/CMakeLists.txt index 4cd089401..f75b559ab 100644 --- a/plugins/channeltx/localsource/CMakeLists.txt +++ b/plugins/channeltx/localsource/CMakeLists.txt @@ -38,7 +38,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME localsource) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -53,7 +53,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/channeltx/localsource/localsourcegui.cpp b/plugins/channeltx/localsource/localsourcegui.cpp index 2bb031387..247fb3685 100644 --- a/plugins/channeltx/localsource/localsourcegui.cpp +++ b/plugins/channeltx/localsource/localsourcegui.cpp @@ -206,7 +206,7 @@ void LocalSourceGUI::leaveEvent(QEvent* event) ChannelGUI::leaveEvent(event); } -void LocalSourceGUI::enterEvent(QEvent* event) +void LocalSourceGUI::enterEvent(EnterEventType* event) { m_channelMarker.setHighlighted(true); ChannelGUI::enterEvent(event); diff --git a/plugins/channeltx/localsource/localsourcegui.h b/plugins/channeltx/localsource/localsourcegui.h index c7a58498e..4d23fe05c 100644 --- a/plugins/channeltx/localsource/localsourcegui.h +++ b/plugins/channeltx/localsource/localsourcegui.h @@ -90,7 +90,7 @@ private: void updateAbsoluteCenterFrequency(); void leaveEvent(QEvent*); - void enterEvent(QEvent*); + void enterEvent(EnterEventType*); void applyInterpolation(); void applyPosition(); diff --git a/plugins/channeltx/mod802.15.4/CMakeLists.txt b/plugins/channeltx/mod802.15.4/CMakeLists.txt index 7562e2fac..574cd4b96 100644 --- a/plugins/channeltx/mod802.15.4/CMakeLists.txt +++ b/plugins/channeltx/mod802.15.4/CMakeLists.txt @@ -41,7 +41,7 @@ if(NOT SERVER_MODE) ieee_802_15_4_modtxsettingsdialog.h ) set(TARGET_NAME modieee_802_15_4) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -56,7 +56,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/channeltx/mod802.15.4/ieee_802_15_4_modgui.cpp b/plugins/channeltx/mod802.15.4/ieee_802_15_4_modgui.cpp index bd5f3e6da..7ed6abc60 100644 --- a/plugins/channeltx/mod802.15.4/ieee_802_15_4_modgui.cpp +++ b/plugins/channeltx/mod802.15.4/ieee_802_15_4_modgui.cpp @@ -612,7 +612,7 @@ void IEEE_802_15_4_ModGUI::leaveEvent(QEvent* event) ChannelGUI::leaveEvent(event); } -void IEEE_802_15_4_ModGUI::enterEvent(QEvent* event) +void IEEE_802_15_4_ModGUI::enterEvent(EnterEventType* event) { m_channelMarker.setHighlighted(true); ChannelGUI::enterEvent(event); diff --git a/plugins/channeltx/mod802.15.4/ieee_802_15_4_modgui.h b/plugins/channeltx/mod802.15.4/ieee_802_15_4_modgui.h index 48ccf3d8c..e18876165 100644 --- a/plugins/channeltx/mod802.15.4/ieee_802_15_4_modgui.h +++ b/plugins/channeltx/mod802.15.4/ieee_802_15_4_modgui.h @@ -103,7 +103,7 @@ private: void updateAbsoluteCenterFrequency(); void leaveEvent(QEvent*); - void enterEvent(QEvent*); + void enterEvent(EnterEventType*); private slots: void handleSourceMessages(); diff --git a/plugins/channeltx/mod802.15.4/ieee_802_15_4_modsource.cpp b/plugins/channeltx/mod802.15.4/ieee_802_15_4_modsource.cpp index 6f6b4b672..90ec3c0fe 100644 --- a/plugins/channeltx/mod802.15.4/ieee_802_15_4_modsource.cpp +++ b/plugins/channeltx/mod802.15.4/ieee_802_15_4_modsource.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #include "dsp/basebandsamplesink.h" #include "dsp/scopevis.h" diff --git a/plugins/channeltx/modais/CMakeLists.txt b/plugins/channeltx/modais/CMakeLists.txt index 27e36de95..b5f71ee84 100644 --- a/plugins/channeltx/modais/CMakeLists.txt +++ b/plugins/channeltx/modais/CMakeLists.txt @@ -39,7 +39,7 @@ if(NOT SERVER_MODE) aismodtxsettingsdialog.h ) set(TARGET_NAME modais) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -54,7 +54,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/channeltx/modais/aismodgui.cpp b/plugins/channeltx/modais/aismodgui.cpp index 3dc479673..371b8e5db 100644 --- a/plugins/channeltx/modais/aismodgui.cpp +++ b/plugins/channeltx/modais/aismodgui.cpp @@ -582,7 +582,7 @@ void AISModGUI::leaveEvent(QEvent* event) ChannelGUI::leaveEvent(event); } -void AISModGUI::enterEvent(QEvent* event) +void AISModGUI::enterEvent(EnterEventType* event) { m_channelMarker.setHighlighted(true); ChannelGUI::enterEvent(event); diff --git a/plugins/channeltx/modais/aismodgui.h b/plugins/channeltx/modais/aismodgui.h index 7deb50c85..fd5d68307 100644 --- a/plugins/channeltx/modais/aismodgui.h +++ b/plugins/channeltx/modais/aismodgui.h @@ -94,7 +94,7 @@ private: void updateAbsoluteCenterFrequency(); void leaveEvent(QEvent*); - void enterEvent(QEvent*); + void enterEvent(EnterEventType*); private slots: void handleSourceMessages(); diff --git a/plugins/channeltx/modam/CMakeLists.txt b/plugins/channeltx/modam/CMakeLists.txt index 3b08ed84e..cd7cb0e05 100644 --- a/plugins/channeltx/modam/CMakeLists.txt +++ b/plugins/channeltx/modam/CMakeLists.txt @@ -35,7 +35,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME modam) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -50,7 +50,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/channeltx/modam/ammodgui.cpp b/plugins/channeltx/modam/ammodgui.cpp index a38379b54..7b387a71e 100644 --- a/plugins/channeltx/modam/ammodgui.cpp +++ b/plugins/channeltx/modam/ammodgui.cpp @@ -488,7 +488,7 @@ void AMModGUI::leaveEvent(QEvent* event) ChannelGUI::leaveEvent(event); } -void AMModGUI::enterEvent(QEvent* event) +void AMModGUI::enterEvent(EnterEventType* event) { m_channelMarker.setHighlighted(true); ChannelGUI::enterEvent(event); diff --git a/plugins/channeltx/modam/ammodgui.h b/plugins/channeltx/modam/ammodgui.h index 07985e85c..f30e74167 100644 --- a/plugins/channeltx/modam/ammodgui.h +++ b/plugins/channeltx/modam/ammodgui.h @@ -100,7 +100,7 @@ private: void updateAbsoluteCenterFrequency(); void leaveEvent(QEvent*); - void enterEvent(QEvent*); + void enterEvent(EnterEventType*); private slots: void handleSourceMessages(); diff --git a/plugins/channeltx/modatv/CMakeLists.txt b/plugins/channeltx/modatv/CMakeLists.txt index 832871c57..c10a3f2bf 100644 --- a/plugins/channeltx/modatv/CMakeLists.txt +++ b/plugins/channeltx/modatv/CMakeLists.txt @@ -38,7 +38,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME modatv) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -53,7 +53,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/channeltx/modatv/atvmodgui.cpp b/plugins/channeltx/modatv/atvmodgui.cpp index f2e327909..a5113c1d5 100644 --- a/plugins/channeltx/modatv/atvmodgui.cpp +++ b/plugins/channeltx/modatv/atvmodgui.cpp @@ -826,7 +826,7 @@ void ATVModGUI::leaveEvent(QEvent* event) ChannelGUI::leaveEvent(event); } -void ATVModGUI::enterEvent(QEvent* event) +void ATVModGUI::enterEvent(EnterEventType* event) { m_channelMarker.setHighlighted(true); ChannelGUI::enterEvent(event); diff --git a/plugins/channeltx/modatv/atvmodgui.h b/plugins/channeltx/modatv/atvmodgui.h index cfbf04961..dcd68af47 100644 --- a/plugins/channeltx/modatv/atvmodgui.h +++ b/plugins/channeltx/modatv/atvmodgui.h @@ -106,7 +106,7 @@ private: void updateAbsoluteCenterFrequency(); void leaveEvent(QEvent*); - void enterEvent(QEvent*); + void enterEvent(EnterEventType*); private slots: void handleSourceMessages(); diff --git a/plugins/channeltx/modchirpchat/CMakeLists.txt b/plugins/channeltx/modchirpchat/CMakeLists.txt index d8638f088..19439ad9b 100644 --- a/plugins/channeltx/modchirpchat/CMakeLists.txt +++ b/plugins/channeltx/modchirpchat/CMakeLists.txt @@ -42,7 +42,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME modchirpchat) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -57,7 +57,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/channeltx/modchirpchat/chirpchatmodgui.cpp b/plugins/channeltx/modchirpchat/chirpchatmodgui.cpp index 4c32cdf5a..3d70d6235 100644 --- a/plugins/channeltx/modchirpchat/chirpchatmodgui.cpp +++ b/plugins/channeltx/modchirpchat/chirpchatmodgui.cpp @@ -599,7 +599,7 @@ void ChirpChatModGUI::leaveEvent(QEvent* event) ChannelGUI::leaveEvent(event); } -void ChirpChatModGUI::enterEvent(QEvent* event) +void ChirpChatModGUI::enterEvent(EnterEventType* event) { m_channelMarker.setHighlighted(true); ChannelGUI::enterEvent(event); diff --git a/plugins/channeltx/modchirpchat/chirpchatmodgui.h b/plugins/channeltx/modchirpchat/chirpchatmodgui.h index 98d3affb7..5390c3967 100644 --- a/plugins/channeltx/modchirpchat/chirpchatmodgui.h +++ b/plugins/channeltx/modchirpchat/chirpchatmodgui.h @@ -92,7 +92,7 @@ private: void updateAbsoluteCenterFrequency(); void leaveEvent(QEvent*); - void enterEvent(QEvent*); + void enterEvent(EnterEventType*); private slots: void handleSourceMessages(); diff --git a/plugins/channeltx/moddatv/CMakeLists.txt b/plugins/channeltx/moddatv/CMakeLists.txt index 77c1ad85a..149ac26a8 100644 --- a/plugins/channeltx/moddatv/CMakeLists.txt +++ b/plugins/channeltx/moddatv/CMakeLists.txt @@ -59,7 +59,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME moddatv) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -75,7 +75,7 @@ add_library(${TARGET_NAME} SHARED target_link_libraries(${TARGET_NAME} Boost::disable_autolinking - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/channeltx/moddatv/datvmodgui.cpp b/plugins/channeltx/moddatv/datvmodgui.cpp index d38f124d3..8a84c88de 100644 --- a/plugins/channeltx/moddatv/datvmodgui.cpp +++ b/plugins/channeltx/moddatv/datvmodgui.cpp @@ -612,7 +612,7 @@ void DATVModGUI::leaveEvent(QEvent* event) ChannelGUI::leaveEvent(event); } -void DATVModGUI::enterEvent(QEvent* event) +void DATVModGUI::enterEvent(EnterEventType* event) { m_channelMarker.setHighlighted(true); ChannelGUI::enterEvent(event); diff --git a/plugins/channeltx/moddatv/datvmodgui.h b/plugins/channeltx/moddatv/datvmodgui.h index 561f44f44..5bf02cb39 100644 --- a/plugins/channeltx/moddatv/datvmodgui.h +++ b/plugins/channeltx/moddatv/datvmodgui.h @@ -104,7 +104,7 @@ private: void updateFEC(); void leaveEvent(QEvent*); - void enterEvent(QEvent*); + void enterEvent(EnterEventType*); private slots: void handleSourceMessages(); diff --git a/plugins/channeltx/modfreedv/CMakeLists.txt b/plugins/channeltx/modfreedv/CMakeLists.txt index b45390959..d231d0505 100644 --- a/plugins/channeltx/modfreedv/CMakeLists.txt +++ b/plugins/channeltx/modfreedv/CMakeLists.txt @@ -34,7 +34,7 @@ if(NOT SERVER_MODE) freedvmodgui.h ) set(TARGET_NAME modfreedv) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -53,7 +53,7 @@ if(CODEC2_EXTERNAL) endif() target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/channeltx/modfreedv/freedvmodgui.cpp b/plugins/channeltx/modfreedv/freedvmodgui.cpp index f42917c7c..d1fcca227 100644 --- a/plugins/channeltx/modfreedv/freedvmodgui.cpp +++ b/plugins/channeltx/modfreedv/freedvmodgui.cpp @@ -530,7 +530,7 @@ void FreeDVModGUI::leaveEvent(QEvent* event) ChannelGUI::leaveEvent(event); } -void FreeDVModGUI::enterEvent(QEvent* event) +void FreeDVModGUI::enterEvent(EnterEventType* event) { m_channelMarker.setHighlighted(true); ChannelGUI::enterEvent(event); diff --git a/plugins/channeltx/modfreedv/freedvmodgui.h b/plugins/channeltx/modfreedv/freedvmodgui.h index 6bd48fc5d..a439968bd 100644 --- a/plugins/channeltx/modfreedv/freedvmodgui.h +++ b/plugins/channeltx/modfreedv/freedvmodgui.h @@ -105,7 +105,7 @@ private: void updateAbsoluteCenterFrequency(); void leaveEvent(QEvent*); - void enterEvent(QEvent*); + void enterEvent(EnterEventType*); private slots: void handleSourceMessages(); diff --git a/plugins/channeltx/modm17/CMakeLists.txt b/plugins/channeltx/modm17/CMakeLists.txt index 889b17f1a..090d13c77 100644 --- a/plugins/channeltx/modm17/CMakeLists.txt +++ b/plugins/channeltx/modm17/CMakeLists.txt @@ -44,7 +44,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME modm17) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -63,7 +63,7 @@ if(CODEC2_EXTERNAL) endif() target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/channeltx/modm17/m17modgui.cpp b/plugins/channeltx/modm17/m17modgui.cpp index f8ccd2a4c..fa04175f3 100644 --- a/plugins/channeltx/modm17/m17modgui.cpp +++ b/plugins/channeltx/modm17/m17modgui.cpp @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include "device/deviceuiset.h" #include "plugin/pluginapi.h" @@ -471,7 +471,7 @@ M17ModGUI::M17ModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSam m_feedbackAudioSampleRate(-1), m_tickCount(0), m_enableNavTime(false), - m_dcsCodeValidator(QRegExp("[0-7]{1,3}")) + m_dcsCodeValidator(QRegularExpression("[0-7]{1,3}")) { setAttribute(Qt::WA_DeleteOnClose, true); m_helpURL = "plugins/channeltx/modm17/readme.md"; @@ -702,7 +702,7 @@ void M17ModGUI::leaveEvent(QEvent* event) ChannelGUI::leaveEvent(event); } -void M17ModGUI::enterEvent(QEvent* event) +void M17ModGUI::enterEvent(EnterEventType* event) { m_channelMarker.setHighlighted(true); ChannelGUI::enterEvent(event); diff --git a/plugins/channeltx/modm17/m17modgui.h b/plugins/channeltx/modm17/m17modgui.h index 59e7b89cc..4ed4b277a 100644 --- a/plugins/channeltx/modm17/m17modgui.h +++ b/plugins/channeltx/modm17/m17modgui.h @@ -18,7 +18,7 @@ #ifndef PLUGINS_CHANNELTX_MODM17_M17MODGUI_H_ #define PLUGINS_CHANNELTX_MODM17_M17MODGUI_H_ -#include +#include #include "channel/channelgui.h" #include "dsp/channelmarker.h" @@ -88,7 +88,7 @@ private: std::size_t m_tickCount; bool m_enableNavTime; MessageQueue m_inputMessageQueue; - QRegExpValidator m_dcsCodeValidator; + QRegularExpressionValidator m_dcsCodeValidator; explicit M17ModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSource *channelTx, QWidget* parent = nullptr); virtual ~M17ModGUI(); @@ -106,7 +106,7 @@ private: int packetTypeToIndex(M17ModSettings::PacketType type); void leaveEvent(QEvent*); - void enterEvent(QEvent*); + void enterEvent(EnterEventType*); private slots: void handleSourceMessages(); diff --git a/plugins/channeltx/modnfm/CMakeLists.txt b/plugins/channeltx/modnfm/CMakeLists.txt index 468708800..5bd9d0f1b 100644 --- a/plugins/channeltx/modnfm/CMakeLists.txt +++ b/plugins/channeltx/modnfm/CMakeLists.txt @@ -37,7 +37,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME modnfm) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -52,7 +52,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/channeltx/modnfm/nfmmodgui.cpp b/plugins/channeltx/modnfm/nfmmodgui.cpp index fe1dca53f..6d526aebd 100644 --- a/plugins/channeltx/modnfm/nfmmodgui.cpp +++ b/plugins/channeltx/modnfm/nfmmodgui.cpp @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include "device/deviceuiset.h" #include "plugin/pluginapi.h" @@ -440,7 +440,7 @@ NFMModGUI::NFMModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSam m_feedbackAudioSampleRate(-1), m_tickCount(0), m_enableNavTime(false), - m_dcsCodeValidator(QRegExp("[0-7]{1,3}")) + m_dcsCodeValidator(QRegularExpression("[0-7]{1,3}")) { setAttribute(Qt::WA_DeleteOnClose, true); m_helpURL = "plugins/channeltx/modnfm/readme.md"; @@ -608,7 +608,7 @@ void NFMModGUI::leaveEvent(QEvent* event) ChannelGUI::leaveEvent(event); } -void NFMModGUI::enterEvent(QEvent* event) +void NFMModGUI::enterEvent(EnterEventType* event) { m_channelMarker.setHighlighted(true); ChannelGUI::enterEvent(event); diff --git a/plugins/channeltx/modnfm/nfmmodgui.h b/plugins/channeltx/modnfm/nfmmodgui.h index 7aa5d926e..29a9771b8 100644 --- a/plugins/channeltx/modnfm/nfmmodgui.h +++ b/plugins/channeltx/modnfm/nfmmodgui.h @@ -18,7 +18,7 @@ #ifndef PLUGINS_CHANNELTX_MODNFM_NFMMODGUI_H_ #define PLUGINS_CHANNELTX_MODNFM_NFMMODGUI_H_ -#include +#include #include "channel/channelgui.h" #include "dsp/channelmarker.h" @@ -87,7 +87,7 @@ private: bool m_enableNavTime; NFMModSettings::NFMModInputAF m_modAFInput; MessageQueue m_inputMessageQueue; - QRegExpValidator m_dcsCodeValidator; + QRegularExpressionValidator m_dcsCodeValidator; explicit NFMModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSource *channelTx, QWidget* parent = 0); virtual ~NFMModGUI(); @@ -102,7 +102,7 @@ private: void updateAbsoluteCenterFrequency(); void leaveEvent(QEvent*); - void enterEvent(QEvent*); + void enterEvent(EnterEventType*); private slots: void handleSourceMessages(); diff --git a/plugins/channeltx/modpacket/CMakeLists.txt b/plugins/channeltx/modpacket/CMakeLists.txt index b165b2768..8acf95911 100644 --- a/plugins/channeltx/modpacket/CMakeLists.txt +++ b/plugins/channeltx/modpacket/CMakeLists.txt @@ -42,7 +42,7 @@ if(NOT SERVER_MODE) packetmodtxsettingsdialog.h ) set(TARGET_NAME modpacket) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -57,7 +57,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/channeltx/modpacket/packetmodgui.cpp b/plugins/channeltx/modpacket/packetmodgui.cpp index c97fd032e..bf13a8b7a 100644 --- a/plugins/channeltx/modpacket/packetmodgui.cpp +++ b/plugins/channeltx/modpacket/packetmodgui.cpp @@ -602,7 +602,7 @@ void PacketModGUI::leaveEvent(QEvent* event) ChannelGUI::leaveEvent(event); } -void PacketModGUI::enterEvent(QEvent* event) +void PacketModGUI::enterEvent(EnterEventType* event) { m_channelMarker.setHighlighted(true); ChannelGUI::enterEvent(event); diff --git a/plugins/channeltx/modpacket/packetmodgui.h b/plugins/channeltx/modpacket/packetmodgui.h index 1ff5837f7..060a14135 100644 --- a/plugins/channeltx/modpacket/packetmodgui.h +++ b/plugins/channeltx/modpacket/packetmodgui.h @@ -92,7 +92,7 @@ private: void updateAbsoluteCenterFrequency(); void leaveEvent(QEvent*); - void enterEvent(QEvent*); + void enterEvent(EnterEventType*); private slots: void handleSourceMessages(); diff --git a/plugins/channeltx/modssb/CMakeLists.txt b/plugins/channeltx/modssb/CMakeLists.txt index e08d42ad6..5156b2e36 100644 --- a/plugins/channeltx/modssb/CMakeLists.txt +++ b/plugins/channeltx/modssb/CMakeLists.txt @@ -35,7 +35,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME modssb) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -50,7 +50,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/channeltx/modssb/ssbmodgui.cpp b/plugins/channeltx/modssb/ssbmodgui.cpp index da76f8108..2be75db9c 100644 --- a/plugins/channeltx/modssb/ssbmodgui.cpp +++ b/plugins/channeltx/modssb/ssbmodgui.cpp @@ -744,7 +744,7 @@ void SSBModGUI::leaveEvent(QEvent* event) ChannelGUI::leaveEvent(event); } -void SSBModGUI::enterEvent(QEvent* event) +void SSBModGUI::enterEvent(EnterEventType* event) { m_channelMarker.setHighlighted(true); ChannelGUI::enterEvent(event); diff --git a/plugins/channeltx/modssb/ssbmodgui.h b/plugins/channeltx/modssb/ssbmodgui.h index dd793e1bc..cde19b90b 100644 --- a/plugins/channeltx/modssb/ssbmodgui.h +++ b/plugins/channeltx/modssb/ssbmodgui.h @@ -108,7 +108,7 @@ private: void updateAbsoluteCenterFrequency(); void leaveEvent(QEvent*); - void enterEvent(QEvent*); + void enterEvent(EnterEventType*); private slots: void handleSourceMessages(); diff --git a/plugins/channeltx/modwfm/CMakeLists.txt b/plugins/channeltx/modwfm/CMakeLists.txt index 299df0e07..d2cc22fc0 100644 --- a/plugins/channeltx/modwfm/CMakeLists.txt +++ b/plugins/channeltx/modwfm/CMakeLists.txt @@ -35,7 +35,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME modwfm) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -50,7 +50,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/channeltx/modwfm/wfmmodgui.cpp b/plugins/channeltx/modwfm/wfmmodgui.cpp index 48cfc8b36..f007b14a8 100644 --- a/plugins/channeltx/modwfm/wfmmodgui.cpp +++ b/plugins/channeltx/modwfm/wfmmodgui.cpp @@ -503,7 +503,7 @@ void WFMModGUI::leaveEvent(QEvent* event) ChannelGUI::leaveEvent(event); } -void WFMModGUI::enterEvent(QEvent* event) +void WFMModGUI::enterEvent(EnterEventType* event) { m_channelMarker.setHighlighted(true); ChannelGUI::enterEvent(event); diff --git a/plugins/channeltx/modwfm/wfmmodgui.h b/plugins/channeltx/modwfm/wfmmodgui.h index 19e72eae9..f6cd5b507 100644 --- a/plugins/channeltx/modwfm/wfmmodgui.h +++ b/plugins/channeltx/modwfm/wfmmodgui.h @@ -98,7 +98,7 @@ private: void updateAbsoluteCenterFrequency(); void leaveEvent(QEvent*); - void enterEvent(QEvent*); + void enterEvent(EnterEventType*); static int requiredBW(int rfBW) { diff --git a/plugins/channeltx/remotesource/CMakeLists.txt b/plugins/channeltx/remotesource/CMakeLists.txt index 1f812a2d5..1a5ac0b76 100644 --- a/plugins/channeltx/remotesource/CMakeLists.txt +++ b/plugins/channeltx/remotesource/CMakeLists.txt @@ -39,7 +39,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME remotesource) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -58,9 +58,9 @@ if(CM256CC_EXTERNAL) endif() target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} - Qt5::Network + Qt::Network sdrbase ${TARGET_LIB_GUI} swagger diff --git a/plugins/channeltx/remotesource/remotesourcegui.cpp b/plugins/channeltx/remotesource/remotesourcegui.cpp index a5cb5a9c2..334e2a201 100644 --- a/plugins/channeltx/remotesource/remotesourcegui.cpp +++ b/plugins/channeltx/remotesource/remotesourcegui.cpp @@ -279,7 +279,7 @@ void RemoteSourceGUI::leaveEvent(QEvent* event) ChannelGUI::leaveEvent(event); } -void RemoteSourceGUI::enterEvent(QEvent* event) +void RemoteSourceGUI::enterEvent(EnterEventType* event) { m_channelMarker.setHighlighted(true); ChannelGUI::enterEvent(event); diff --git a/plugins/channeltx/remotesource/remotesourcegui.h b/plugins/channeltx/remotesource/remotesourcegui.h index 0035875b1..a7d643110 100644 --- a/plugins/channeltx/remotesource/remotesourcegui.h +++ b/plugins/channeltx/remotesource/remotesourcegui.h @@ -101,7 +101,7 @@ private: void updateAbsoluteCenterFrequency(); void leaveEvent(QEvent*); - void enterEvent(QEvent*); + void enterEvent(EnterEventType*); void displayEventCounts(); void displayEventStatus(int recoverableCount, int unrecoverableCount); diff --git a/plugins/channeltx/remotesource/remotesourceworker.cpp b/plugins/channeltx/remotesource/remotesourceworker.cpp index 8d2f9dffe..9e61ed332 100644 --- a/plugins/channeltx/remotesource/remotesourceworker.cpp +++ b/plugins/channeltx/remotesource/remotesourceworker.cpp @@ -20,6 +20,7 @@ #include #include +#include #include "cm256cc/cm256.h" #include "remotesourceworker.h" diff --git a/plugins/channeltx/udpsource/CMakeLists.txt b/plugins/channeltx/udpsource/CMakeLists.txt index 4aa3b5bf0..deb682aed 100644 --- a/plugins/channeltx/udpsource/CMakeLists.txt +++ b/plugins/channeltx/udpsource/CMakeLists.txt @@ -39,7 +39,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME udpsource) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -54,9 +54,9 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} - Qt5::Network + Qt::Network sdrbase ${TARGET_LIB_GUI} swagger diff --git a/plugins/channeltx/udpsource/udpsourcegui.cpp b/plugins/channeltx/udpsource/udpsourcegui.cpp index ccf220989..7e06158f8 100644 --- a/plugins/channeltx/udpsource/udpsourcegui.cpp +++ b/plugins/channeltx/udpsource/udpsourcegui.cpp @@ -538,7 +538,7 @@ void UDPSourceGUI::leaveEvent(QEvent* event) ChannelGUI::leaveEvent(event); } -void UDPSourceGUI::enterEvent(QEvent* event) +void UDPSourceGUI::enterEvent(EnterEventType* event) { m_channelMarker.setHighlighted(true); ChannelGUI::enterEvent(event); diff --git a/plugins/channeltx/udpsource/udpsourcegui.h b/plugins/channeltx/udpsource/udpsourcegui.h index 68afee72d..af7abf7be 100644 --- a/plugins/channeltx/udpsource/udpsourcegui.h +++ b/plugins/channeltx/udpsource/udpsourcegui.h @@ -97,7 +97,7 @@ private: void updateAbsoluteCenterFrequency(); void leaveEvent(QEvent*); - void enterEvent(QEvent*); + void enterEvent(EnterEventType*); private slots: void handleSourceMessages(); diff --git a/plugins/feature/CMakeLists.txt b/plugins/feature/CMakeLists.txt index 31cf277e7..d7d11584d 100644 --- a/plugins/feature/CMakeLists.txt +++ b/plugins/feature/CMakeLists.txt @@ -1,14 +1,14 @@ project(feature) -if (ENABLE_FEATURE_GS232CONTROLLER AND Qt5SerialPort_FOUND) +if (ENABLE_FEATURE_GS232CONTROLLER AND Qt${QT_DEFAULT_MAJOR_VERSION}SerialPort_FOUND) add_subdirectory(gs232controller) endif() -if (ENABLE_FEATURE_MAP AND Qt5Quick_FOUND AND Qt5QuickWidgets_FOUND AND Qt5Positioning_FOUND AND Qt5Location_FOUND AND Qt5WebEngine_FOUND) +if (ENABLE_FEATURE_MAP AND Qt${QT_DEFAULT_MAJOR_VERSION}Quick_FOUND AND Qt${QT_DEFAULT_MAJOR_VERSION}QuickWidgets_FOUND AND Qt${QT_DEFAULT_MAJOR_VERSION}Positioning_FOUND AND Qt${QT_DEFAULT_MAJOR_VERSION}Location_FOUND AND Qt${QT_DEFAULT_MAJOR_VERSION}WebEngine_FOUND) add_subdirectory(map) endif() -if (ENABLE_FEATURE_VORLOCALIZER AND Qt5Quick_FOUND AND Qt5QuickWidgets_FOUND AND Qt5Positioning_FOUND) +if (ENABLE_FEATURE_VORLOCALIZER AND Qt${QT_DEFAULT_MAJOR_VERSION}Quick_FOUND AND Qt${QT_DEFAULT_MAJOR_VERSION}QuickWidgets_FOUND AND Qt${QT_DEFAULT_MAJOR_VERSION}Positioning_FOUND) add_subdirectory(vorlocalizer) endif() @@ -45,19 +45,19 @@ if (ENABLE_FEATURE_SIMPLEPTT) endif() if (NOT SERVER_MODE) - if (ENABLE_FEATURE_SATELLITETRACKER AND SGP4_FOUND AND Qt5Positioning_FOUND AND Qt5Charts_FOUND AND Qt5TextToSpeech_FOUND) + if (ENABLE_FEATURE_SATELLITETRACKER AND SGP4_FOUND AND Qt${QT_DEFAULT_MAJOR_VERSION}Positioning_FOUND AND Qt${QT_DEFAULT_MAJOR_VERSION}Charts_FOUND AND Qt${QT_DEFAULT_MAJOR_VERSION}TextToSpeech_FOUND) add_subdirectory(satellitetracker) endif() if (ENABLE_FEATURE_JOGDIALCONTROLLER) add_subdirectory(jogdialcontroller) endif() else() - if (ENABLE_FEATURE_SATELLITETRACKER AND SGP4_FOUND AND Qt5Positioning_FOUND AND Qt5Charts_FOUND) + if (ENABLE_FEATURE_SATELLITETRACKER AND SGP4_FOUND AND Qt${QT_DEFAULT_MAJOR_VERSION}Positioning_FOUND AND Qt${QT_DEFAULT_MAJOR_VERSION}Charts_FOUND) add_subdirectory(satellitetracker) endif() endif() -if (Qt5Charts_FOUND) +if (Qt${QT_DEFAULT_MAJOR_VERSION}Charts_FOUND) if (ENABLE_FEATURE_RADIOSONDE) add_subdirectory(radiosonde) endif() diff --git a/plugins/feature/afc/CMakeLists.txt b/plugins/feature/afc/CMakeLists.txt index b7a6bdfb9..fd64256c2 100644 --- a/plugins/feature/afc/CMakeLists.txt +++ b/plugins/feature/afc/CMakeLists.txt @@ -34,7 +34,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME featureafc) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -49,7 +49,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/feature/ais/CMakeLists.txt b/plugins/feature/ais/CMakeLists.txt index ea46a9386..afdec0c05 100644 --- a/plugins/feature/ais/CMakeLists.txt +++ b/plugins/feature/ais/CMakeLists.txt @@ -31,7 +31,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME featureais) - set(TARGET_LIB Qt5::Widgets) + set(TARGET_LIB Qt::Widgets) set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -46,7 +46,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/feature/ambe/CMakeLists.txt b/plugins/feature/ambe/CMakeLists.txt index e2fb11f72..82704fb2c 100644 --- a/plugins/feature/ambe/CMakeLists.txt +++ b/plugins/feature/ambe/CMakeLists.txt @@ -35,7 +35,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME featureambe) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -50,7 +50,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/feature/antennatools/CMakeLists.txt b/plugins/feature/antennatools/CMakeLists.txt index be0acb2a6..bcbdccd6e 100644 --- a/plugins/feature/antennatools/CMakeLists.txt +++ b/plugins/feature/antennatools/CMakeLists.txt @@ -31,7 +31,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME antennatools) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -46,7 +46,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/feature/aprs/CMakeLists.txt b/plugins/feature/aprs/CMakeLists.txt index c12ada009..0f67590dd 100644 --- a/plugins/feature/aprs/CMakeLists.txt +++ b/plugins/feature/aprs/CMakeLists.txt @@ -37,7 +37,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME aprs) - set(TARGET_LIB "Qt5::Widgets" Qt5::Charts) + set(TARGET_LIB "Qt::Widgets" Qt::Charts) set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -52,7 +52,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/feature/aprs/aprsgui.h b/plugins/feature/aprs/aprsgui.h index fdb730a91..5422034db 100644 --- a/plugins/feature/aprs/aprsgui.h +++ b/plugins/feature/aprs/aprsgui.h @@ -41,7 +41,9 @@ namespace Ui { class APRSGUI; } +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) using namespace QtCharts; +#endif class APRSGUI; diff --git a/plugins/feature/aprs/aprsworker.cpp b/plugins/feature/aprs/aprsworker.cpp index d28c38d55..e8b211c24 100644 --- a/plugins/feature/aprs/aprsworker.cpp +++ b/plugins/feature/aprs/aprsworker.cpp @@ -192,7 +192,7 @@ void APRSWorker::errorOccurred(QAbstractSocket::SocketError socketError) { qDebug() << "APRSWorker::errorOccurred: " << socketError; if (m_msgQueueToFeature) - m_msgQueueToFeature->push(APRS::MsgReportWorker::create(m_socket.errorString() + " " + socketError)); + m_msgQueueToFeature->push(APRS::MsgReportWorker::create(m_socket.errorString())); } void APRSWorker::recv() diff --git a/plugins/feature/demodanalyzer/CMakeLists.txt b/plugins/feature/demodanalyzer/CMakeLists.txt index 428207ca6..c6998f852 100644 --- a/plugins/feature/demodanalyzer/CMakeLists.txt +++ b/plugins/feature/demodanalyzer/CMakeLists.txt @@ -32,7 +32,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME featuredemodanalyzer) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -47,7 +47,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/feature/gs232controller/CMakeLists.txt b/plugins/feature/gs232controller/CMakeLists.txt index 8b46bae28..ccc58673f 100644 --- a/plugins/feature/gs232controller/CMakeLists.txt +++ b/plugins/feature/gs232controller/CMakeLists.txt @@ -33,7 +33,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME featuregs232controller) - set(TARGET_LIB Qt5::Widgets) + set(TARGET_LIB Qt::Widgets) set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -48,8 +48,8 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core - Qt5::SerialPort + Qt::Core + Qt::SerialPort ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/feature/jogdialcontroller/CMakeLists.txt b/plugins/feature/jogdialcontroller/CMakeLists.txt index 3bfd8c35e..685849487 100644 --- a/plugins/feature/jogdialcontroller/CMakeLists.txt +++ b/plugins/feature/jogdialcontroller/CMakeLists.txt @@ -30,7 +30,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME jogdialcontroller) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -45,7 +45,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/feature/limerfe/CMakeLists.txt b/plugins/feature/limerfe/CMakeLists.txt index 6ed968ef8..4cfc776a6 100644 --- a/plugins/feature/limerfe/CMakeLists.txt +++ b/plugins/feature/limerfe/CMakeLists.txt @@ -33,7 +33,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME featurelimerfe) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -48,7 +48,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/feature/map/CMakeLists.txt b/plugins/feature/map/CMakeLists.txt index fe578a004..8d4e51f92 100644 --- a/plugins/feature/map/CMakeLists.txt +++ b/plugins/feature/map/CMakeLists.txt @@ -24,7 +24,7 @@ set(map_HEADERS include_directories( ${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client - ${Qt5Gui_PRIVATE_INCLUDE_DIRS} + ${Qt${QT_DEFAULT_MAJOR_VERSION}Gui_PRIVATE_INCLUDE_DIRS} ) if(NOT SERVER_MODE) @@ -70,7 +70,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME map) - set(TARGET_LIB "Qt5::Widgets" Qt5::Quick Qt5::QuickWidgets Qt5::Positioning Qt5::Location Qt5::WebEngine Qt5::WebEngineCore Qt5::WebEngineWidgets) + set(TARGET_LIB "Qt::Widgets" Qt::Quick Qt::QuickWidgets Qt::Positioning Qt::Location Qt::WebEngine Qt::WebEngineCore Qt::WebEngineWidgets) set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -85,7 +85,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/feature/pertester/CMakeLists.txt b/plugins/feature/pertester/CMakeLists.txt index d2ad7d26f..33c2b0116 100644 --- a/plugins/feature/pertester/CMakeLists.txt +++ b/plugins/feature/pertester/CMakeLists.txt @@ -33,7 +33,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME featurepertester) - set(TARGET_LIB Qt5::Widgets) + set(TARGET_LIB Qt::Widgets) set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -48,7 +48,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/feature/pertester/pertestersettings.cpp b/plugins/feature/pertester/pertestersettings.cpp index 0121b1d8d..7820d9224 100644 --- a/plugins/feature/pertester/pertestersettings.cpp +++ b/plugins/feature/pertester/pertestersettings.cpp @@ -18,6 +18,7 @@ #include #include +#include #include "util/simpleserializer.h" #include "settings/serializable.h" diff --git a/plugins/feature/radiosonde/CMakeLists.txt b/plugins/feature/radiosonde/CMakeLists.txt index 3a08fa765..c9d5a22b8 100644 --- a/plugins/feature/radiosonde/CMakeLists.txt +++ b/plugins/feature/radiosonde/CMakeLists.txt @@ -31,7 +31,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME featureradiosonde) - set(TARGET_LIB Qt5::Widgets Qt5::Charts) + set(TARGET_LIB Qt::Widgets Qt::Charts) set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -46,7 +46,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/feature/radiosonde/radiosondegui.h b/plugins/feature/radiosonde/radiosondegui.h index 355a9b76d..b922ec680 100644 --- a/plugins/feature/radiosonde/radiosondegui.h +++ b/plugins/feature/radiosonde/radiosondegui.h @@ -40,7 +40,9 @@ namespace Ui { class RadiosondeGUI; } +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) using namespace QtCharts; +#endif class RadiosondeGUI : public FeatureGUI { Q_OBJECT diff --git a/plugins/feature/remotecontrol/CMakeLists.txt b/plugins/feature/remotecontrol/CMakeLists.txt index 079e2844b..12f0fb2cf 100644 --- a/plugins/feature/remotecontrol/CMakeLists.txt +++ b/plugins/feature/remotecontrol/CMakeLists.txt @@ -42,7 +42,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME featureremotecontrol) - set(TARGET_LIB Qt5::Widgets Qt5::Charts) + set(TARGET_LIB Qt::Widgets Qt::Charts) set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -57,7 +57,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/feature/remotecontrol/remotecontrolgui.h b/plugins/feature/remotecontrol/remotecontrolgui.h index 1c12d0b5d..8c71fcd95 100644 --- a/plugins/feature/remotecontrol/remotecontrolgui.h +++ b/plugins/feature/remotecontrol/remotecontrolgui.h @@ -43,7 +43,9 @@ namespace Ui { class RemoteControlGUI; } +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) using namespace QtCharts; +#endif class RemoteControlGUI : public FeatureGUI { Q_OBJECT diff --git a/plugins/feature/rigctlserver/CMakeLists.txt b/plugins/feature/rigctlserver/CMakeLists.txt index 98579e8c0..25737fa14 100644 --- a/plugins/feature/rigctlserver/CMakeLists.txt +++ b/plugins/feature/rigctlserver/CMakeLists.txt @@ -32,7 +32,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME featurerigctlserver) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -47,7 +47,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/feature/satellitetracker/CMakeLists.txt b/plugins/feature/satellitetracker/CMakeLists.txt index 7e630f403..f6324c8e4 100644 --- a/plugins/feature/satellitetracker/CMakeLists.txt +++ b/plugins/feature/satellitetracker/CMakeLists.txt @@ -48,12 +48,12 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME featuresatellitetracker) - set(TARGET_LIB Qt5::Widgets Qt5::Positioning Qt5::Charts Qt5::TextToSpeech) + set(TARGET_LIB Qt::Widgets Qt::Positioning Qt::Charts Qt::TextToSpeech) set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() set(TARGET_NAME featuresatellitetrackersrv) - set(TARGET_LIB Qt5::Positioning Qt5::Charts) + set(TARGET_LIB Qt::Positioning Qt::Charts) set(TARGET_LIB_GUI "") set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR}) endif() @@ -67,12 +67,17 @@ if(SGP4_EXTERNAL) endif() target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} ${SGP4_LIBRARIES} ) +if (Qt6_FOUND) + target_link_libraries(${TARGET_NAME} + Qt::Core5Compat + ) +endif() install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_FOLDER}) diff --git a/plugins/feature/satellitetracker/satellitedevicesettingsgui.cpp b/plugins/feature/satellitetracker/satellitedevicesettingsgui.cpp index 0eac51e7f..9d06a72bf 100644 --- a/plugins/feature/satellitetracker/satellitedevicesettingsgui.cpp +++ b/plugins/feature/satellitetracker/satellitedevicesettingsgui.cpp @@ -191,9 +191,9 @@ void SatelliteDeviceSettingsGUI::addPresets(const QString& deviceSetType) for (int i = 0; i < count; i++) { const Preset *preset = mainSettings.getPreset(i); - if (((preset->isSourcePreset() && (m_currentPresetType == "R"))) - || ((preset->isSinkPreset() && (m_currentPresetType == "T"))) - || ((preset->isMIMOPreset() && (m_currentPresetType == "M")))) + if (((preset->isSourcePreset() && (m_currentPresetType == 'R'))) + || ((preset->isSinkPreset() && (m_currentPresetType == 'T'))) + || ((preset->isMIMOPreset() && (m_currentPresetType == 'M')))) { m_presetWidget->addItem(QString("%1: %2 - %3") .arg(preset->getGroup()) @@ -212,9 +212,9 @@ const Preset* SatelliteDeviceSettingsGUI::getSelectedPreset() for (int i = 0; i < count; i++) { const Preset *preset = mainSettings.getPreset(i); - if ( ((preset->isSourcePreset() && (m_currentPresetType == "R"))) - || ((preset->isSinkPreset() && (m_currentPresetType == "T"))) - || ((preset->isMIMOPreset() && (m_currentPresetType == "M")))) + if ( ((preset->isSourcePreset() && (m_currentPresetType == 'R'))) + || ((preset->isSinkPreset() && (m_currentPresetType == 'T'))) + || ((preset->isMIMOPreset() && (m_currentPresetType == 'M')))) { if (listIdx == presetIdx) { return preset; diff --git a/plugins/feature/satellitetracker/satellitetrackergui.h b/plugins/feature/satellitetracker/satellitetrackergui.h index 477c8fe09..166161969 100644 --- a/plugins/feature/satellitetracker/satellitetrackergui.h +++ b/plugins/feature/satellitetracker/satellitetrackergui.h @@ -40,7 +40,9 @@ namespace Ui { class SatelliteTrackerGUI; } +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) using namespace QtCharts; +#endif class SatelliteTrackerGUI : public FeatureGUI { Q_OBJECT diff --git a/plugins/feature/satellitetracker/satellitetrackersettings.cpp b/plugins/feature/satellitetracker/satellitetrackersettings.cpp index 195781958..8b8e167ba 100644 --- a/plugins/feature/satellitetracker/satellitetrackersettings.cpp +++ b/plugins/feature/satellitetracker/satellitetrackersettings.cpp @@ -18,6 +18,7 @@ #include #include +#include #include "util/simpleserializer.h" #include "settings/serializable.h" @@ -270,19 +271,6 @@ void SatelliteTrackerSettings::deserializeStringList(const QByteArray& data, QLi delete stream; } -QDataStream& operator<<(QDataStream& out, const QList *list) -{ - out << *list; - return out; -} - -QDataStream& operator>>(QDataStream& in, QList*& list) -{ - list = new QList(); - in >> *list; - return in; -} - QDataStream& operator<<(QDataStream& out, const SatelliteTrackerSettings::SatelliteDeviceSettings* settings) { out << settings->m_deviceSetIndex; @@ -316,6 +304,19 @@ QDataStream& operator>>(QDataStream& in, SatelliteTrackerSettings::SatelliteDevi return in; } +QDataStream& operator<<(QDataStream& out, const QList *list) +{ + out << *list; + return out; +} + +QDataStream& operator>>(QDataStream& in, QList*& list) +{ + list = new QList(); + in >> *list; + return in; +} + QByteArray SatelliteTrackerSettings::serializeDeviceSettings(QHash *> deviceSettings) const { QByteArray data; diff --git a/plugins/feature/satellitetracker/satellitetrackersgp4.h b/plugins/feature/satellitetracker/satellitetrackersgp4.h index 3612d86c0..ffc9bff83 100644 --- a/plugins/feature/satellitetracker/satellitetrackersgp4.h +++ b/plugins/feature/satellitetracker/satellitetrackersgp4.h @@ -23,7 +23,9 @@ #include #include +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) using namespace QtCharts; +#endif struct SatellitePass { QDateTime m_aos; diff --git a/plugins/feature/satellitetracker/satnogs.h b/plugins/feature/satellitetracker/satnogs.h index 7d1cfc525..e5da8a817 100644 --- a/plugins/feature/satellitetracker/satnogs.h +++ b/plugins/feature/satellitetracker/satnogs.h @@ -23,6 +23,7 @@ #include #include #include +#include struct SatNogsTransmitter { diff --git a/plugins/feature/simpleptt/CMakeLists.txt b/plugins/feature/simpleptt/CMakeLists.txt index 33bb4781b..ebb651830 100644 --- a/plugins/feature/simpleptt/CMakeLists.txt +++ b/plugins/feature/simpleptt/CMakeLists.txt @@ -34,7 +34,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME featuresimpleptt) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -49,7 +49,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/feature/startracker/CMakeLists.txt b/plugins/feature/startracker/CMakeLists.txt index f79d4b3f1..3d44af827 100644 --- a/plugins/feature/startracker/CMakeLists.txt +++ b/plugins/feature/startracker/CMakeLists.txt @@ -44,7 +44,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME featurestartracker) - set(TARGET_LIB Qt5::Widgets Qt5::Charts) + set(TARGET_LIB Qt::Widgets Qt::Charts) set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -59,7 +59,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/feature/startracker/startrackergui.cpp b/plugins/feature/startracker/startrackergui.cpp index 4f53cf787..7dfad661f 100644 --- a/plugins/feature/startracker/startrackergui.cpp +++ b/plugins/feature/startracker/startrackergui.cpp @@ -168,7 +168,7 @@ bool StarTrackerGUI::handleMessage(const Message& message) bool found = false; for (int i = 0; i < m_lineOfSightMarkers.size(); i++) { - if (m_lineOfSightMarkers[i]->m_name == swgSettings->getName()) + if (m_lineOfSightMarkers[i]->m_name == *swgSettings->getName()) { if (swgSettings->getD() == 0.0) { diff --git a/plugins/feature/startracker/startrackergui.h b/plugins/feature/startracker/startrackergui.h index c0acf6015..979994537 100644 --- a/plugins/feature/startracker/startrackergui.h +++ b/plugins/feature/startracker/startrackergui.h @@ -45,7 +45,9 @@ namespace Ui { class StarTrackerGUI; } +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) using namespace QtCharts; +#endif class StarTrackerGUI : public FeatureGUI { Q_OBJECT diff --git a/plugins/feature/vorlocalizer/CMakeLists.txt b/plugins/feature/vorlocalizer/CMakeLists.txt index aaf5267bd..599c94481 100644 --- a/plugins/feature/vorlocalizer/CMakeLists.txt +++ b/plugins/feature/vorlocalizer/CMakeLists.txt @@ -37,7 +37,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME vorlocalizer) - set(TARGET_LIB "Qt5::Widgets" Qt5::Quick Qt5::QuickWidgets Qt5::Positioning) + set(TARGET_LIB "Qt::Widgets" Qt::Quick Qt::QuickWidgets Qt::Positioning) set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -52,7 +52,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/samplemimo/bladerf2mimo/CMakeLists.txt b/plugins/samplemimo/bladerf2mimo/CMakeLists.txt index 8720d5f93..5e6a086b3 100644 --- a/plugins/samplemimo/bladerf2mimo/CMakeLists.txt +++ b/plugins/samplemimo/bladerf2mimo/CMakeLists.txt @@ -35,7 +35,7 @@ if (NOT SERVER_MODE) bladerf2mimogui.h ) set(TARGET_NAME mimobladerf2) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -54,7 +54,7 @@ if(LIBBLADERF_EXTERNAL) endif() target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/samplemimo/limesdrmimo/CMakeLists.txt b/plugins/samplemimo/limesdrmimo/CMakeLists.txt index 78b8310b4..1d73578cc 100644 --- a/plugins/samplemimo/limesdrmimo/CMakeLists.txt +++ b/plugins/samplemimo/limesdrmimo/CMakeLists.txt @@ -35,7 +35,7 @@ if (NOT SERVER_MODE) limesdrmimogui.h ) set(TARGET_NAME mimolimesdr) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -54,7 +54,7 @@ if(LIMESUITE_EXTERNAL) endif() target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/samplemimo/metismiso/CMakeLists.txt b/plugins/samplemimo/metismiso/CMakeLists.txt index d6df9eb7b..b84fcc9c9 100644 --- a/plugins/samplemimo/metismiso/CMakeLists.txt +++ b/plugins/samplemimo/metismiso/CMakeLists.txt @@ -34,7 +34,7 @@ if (NOT SERVER_MODE) metismisogui.h ) set(TARGET_NAME mimometismiso) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -49,7 +49,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/samplemimo/plutosdrmimo/CMakeLists.txt b/plugins/samplemimo/plutosdrmimo/CMakeLists.txt index 7280a9564..63e84b199 100644 --- a/plugins/samplemimo/plutosdrmimo/CMakeLists.txt +++ b/plugins/samplemimo/plutosdrmimo/CMakeLists.txt @@ -35,7 +35,7 @@ if (NOT SERVER_MODE) plutosdrmimogui.h ) set(TARGET_NAME mimoplutosdr) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -54,7 +54,7 @@ if(LIBIIO_EXTERNAL) endif() target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/samplemimo/testmi/CMakeLists.txt b/plugins/samplemimo/testmi/CMakeLists.txt index 76af18619..dddfe84b9 100644 --- a/plugins/samplemimo/testmi/CMakeLists.txt +++ b/plugins/samplemimo/testmi/CMakeLists.txt @@ -31,7 +31,7 @@ if (NOT SERVER_MODE) testsourcegui.h ) set(TARGET_NAME mimotestmi) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -46,7 +46,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/samplemimo/testmosync/CMakeLists.txt b/plugins/samplemimo/testmosync/CMakeLists.txt index 3673019ed..45b9e16ab 100644 --- a/plugins/samplemimo/testmosync/CMakeLists.txt +++ b/plugins/samplemimo/testmosync/CMakeLists.txt @@ -30,7 +30,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME outputtestmosync) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -45,7 +45,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/samplemimo/xtrxmimo/CMakeLists.txt b/plugins/samplemimo/xtrxmimo/CMakeLists.txt index e6cb291be..05a849b14 100644 --- a/plugins/samplemimo/xtrxmimo/CMakeLists.txt +++ b/plugins/samplemimo/xtrxmimo/CMakeLists.txt @@ -35,7 +35,7 @@ if (NOT SERVER_MODE) xtrxmimogui.h ) set(TARGET_NAME mimoxtrx) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -50,7 +50,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/samplesink/audiooutput/CMakeLists.txt b/plugins/samplesink/audiooutput/CMakeLists.txt index 47a49fc2e..a11ca707d 100644 --- a/plugins/samplesink/audiooutput/CMakeLists.txt +++ b/plugins/samplesink/audiooutput/CMakeLists.txt @@ -32,7 +32,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME outputaudio) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -47,7 +47,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/samplesink/audiooutput/audiooutputsettings.h b/plugins/samplesink/audiooutput/audiooutputsettings.h index 7b83b5ef2..5f12559f5 100644 --- a/plugins/samplesink/audiooutput/audiooutputsettings.h +++ b/plugins/samplesink/audiooutput/audiooutputsettings.h @@ -19,7 +19,7 @@ #define _AUDIOOUTPUT_AUDIOOUTPUTSETTINGS_H_ #include -#include +#include "audio/audiodeviceinfo.h" struct AudioOutputSettings { @@ -43,17 +43,13 @@ struct AudioOutputSettings { QString getDebugString(const QStringList& settingsKeys, bool force=false) const; // Append realm to device names, because there may be multiple devices with the same name on Windows - static QString getFullDeviceName(const QAudioDeviceInfo &deviceInfo) + static QString getFullDeviceName(const AudioDeviceInfo &deviceInfo) { -#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) - return deviceInfo.deviceName(); -#else QString realm = deviceInfo.realm(); if (realm != "" && realm != "default" && realm != "alsa") return deviceInfo.deviceName() + " " + realm; else return deviceInfo.deviceName(); -#endif } }; diff --git a/plugins/samplesink/bladerf1output/CMakeLists.txt b/plugins/samplesink/bladerf1output/CMakeLists.txt index 865c0fff0..22a71583a 100644 --- a/plugins/samplesink/bladerf1output/CMakeLists.txt +++ b/plugins/samplesink/bladerf1output/CMakeLists.txt @@ -35,7 +35,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME outputbladerf1) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -54,7 +54,7 @@ if(LIBBLADERF_EXTERNAL) endif() target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/samplesink/bladerf2output/CMakeLists.txt b/plugins/samplesink/bladerf2output/CMakeLists.txt index 9920906d8..39fc937eb 100644 --- a/plugins/samplesink/bladerf2output/CMakeLists.txt +++ b/plugins/samplesink/bladerf2output/CMakeLists.txt @@ -35,7 +35,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME outputbladerf2) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -54,7 +54,7 @@ if(LIBBLADERF_EXTERNAL) endif() target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/samplesink/fileoutput/CMakeLists.txt b/plugins/samplesink/fileoutput/CMakeLists.txt index 39363e49f..030d2b2f0 100644 --- a/plugins/samplesink/fileoutput/CMakeLists.txt +++ b/plugins/samplesink/fileoutput/CMakeLists.txt @@ -32,7 +32,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME outputfileoutput) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -47,7 +47,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/samplesink/hackrfoutput/CMakeLists.txt b/plugins/samplesink/hackrfoutput/CMakeLists.txt index 5c8f57ea4..000be2a97 100644 --- a/plugins/samplesink/hackrfoutput/CMakeLists.txt +++ b/plugins/samplesink/hackrfoutput/CMakeLists.txt @@ -35,7 +35,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME outputhackrf) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -50,7 +50,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/samplesink/limesdroutput/CMakeLists.txt b/plugins/samplesink/limesdroutput/CMakeLists.txt index b28e23b72..321b704ea 100644 --- a/plugins/samplesink/limesdroutput/CMakeLists.txt +++ b/plugins/samplesink/limesdroutput/CMakeLists.txt @@ -35,7 +35,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME outputlimesdr) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -54,7 +54,7 @@ if(LIMESUITE_EXTERNAL) endif() target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/samplesink/localoutput/CMakeLists.txt b/plugins/samplesink/localoutput/CMakeLists.txt index 25395343c..3d16f2f3d 100644 --- a/plugins/samplesink/localoutput/CMakeLists.txt +++ b/plugins/samplesink/localoutput/CMakeLists.txt @@ -31,7 +31,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME outputlocal) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -46,7 +46,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/samplesink/plutosdroutput/CMakeLists.txt b/plugins/samplesink/plutosdroutput/CMakeLists.txt index 8966721ef..4e0e26389 100644 --- a/plugins/samplesink/plutosdroutput/CMakeLists.txt +++ b/plugins/samplesink/plutosdroutput/CMakeLists.txt @@ -35,7 +35,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME outputplutosdr) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -54,7 +54,7 @@ if(LIBIIO_EXTERNAL) endif() target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/samplesink/remoteoutput/CMakeLists.txt b/plugins/samplesink/remoteoutput/CMakeLists.txt index f4163cc05..778a1b5f0 100644 --- a/plugins/samplesink/remoteoutput/CMakeLists.txt +++ b/plugins/samplesink/remoteoutput/CMakeLists.txt @@ -40,7 +40,7 @@ if(NOT SERVER_MODE) remoteoutputgui.h ) set(TARGET_NAME outputremote) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -59,7 +59,7 @@ if(CM256CC_EXTERNAL) endif() target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/samplesink/soapysdroutput/CMakeLists.txt b/plugins/samplesink/soapysdroutput/CMakeLists.txt index 2967aebd8..0fa5833b9 100644 --- a/plugins/samplesink/soapysdroutput/CMakeLists.txt +++ b/plugins/samplesink/soapysdroutput/CMakeLists.txt @@ -35,7 +35,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME outputsoapysdr) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -50,7 +50,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/samplesink/testsink/CMakeLists.txt b/plugins/samplesink/testsink/CMakeLists.txt index 0bc6c0888..d2637127c 100644 --- a/plugins/samplesink/testsink/CMakeLists.txt +++ b/plugins/samplesink/testsink/CMakeLists.txt @@ -30,7 +30,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME outputtestsink) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -45,7 +45,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/samplesink/usrpoutput/CMakeLists.txt b/plugins/samplesink/usrpoutput/CMakeLists.txt index ee4858e6d..d679c5c06 100644 --- a/plugins/samplesink/usrpoutput/CMakeLists.txt +++ b/plugins/samplesink/usrpoutput/CMakeLists.txt @@ -35,7 +35,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME outputusrp) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -54,7 +54,7 @@ if(UHD_EXTERNAL) endif() target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/samplesink/xtrxoutput/CMakeLists.txt b/plugins/samplesink/xtrxoutput/CMakeLists.txt index 8e91847f1..f25f7bfb8 100644 --- a/plugins/samplesink/xtrxoutput/CMakeLists.txt +++ b/plugins/samplesink/xtrxoutput/CMakeLists.txt @@ -34,7 +34,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME outputxtrx) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -49,7 +49,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/samplesource/airspy/CMakeLists.txt b/plugins/samplesource/airspy/CMakeLists.txt index b63ebbe49..24acb5bcd 100644 --- a/plugins/samplesource/airspy/CMakeLists.txt +++ b/plugins/samplesource/airspy/CMakeLists.txt @@ -33,7 +33,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME inputairspy) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -52,7 +52,7 @@ if(LIBAIRSPY_EXTERNAL AND NOT LINUX) endif() target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/samplesource/airspyhf/CMakeLists.txt b/plugins/samplesource/airspyhf/CMakeLists.txt index 13ea9d904..c056e217e 100644 --- a/plugins/samplesource/airspyhf/CMakeLists.txt +++ b/plugins/samplesource/airspyhf/CMakeLists.txt @@ -34,7 +34,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME inputairspyhf) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -53,7 +53,7 @@ if(LIBAIRSPYHF_EXTERNAL) endif() target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/samplesource/audioinput/CMakeLists.txt b/plugins/samplesource/audioinput/CMakeLists.txt index 6931ad621..d1c754f1b 100644 --- a/plugins/samplesource/audioinput/CMakeLists.txt +++ b/plugins/samplesource/audioinput/CMakeLists.txt @@ -32,7 +32,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME inputaudio) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -47,7 +47,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/samplesource/audioinput/audioinput.cpp b/plugins/samplesource/audioinput/audioinput.cpp index 3a79f4183..bebd89454 100644 --- a/plugins/samplesource/audioinput/audioinput.cpp +++ b/plugins/samplesource/audioinput/audioinput.cpp @@ -95,7 +95,7 @@ bool AudioInput::openDevice() bool AudioInput::openAudioDevice(QString deviceName, qint32 sampleRate) { AudioDeviceManager *audioDeviceManager = DSPEngine::instance()->getAudioDeviceManager(); - const QList& audioList = audioDeviceManager->getInputDevices(); + const QList& audioList = audioDeviceManager->getInputDevices(); for (const auto &itAudio : audioList) { diff --git a/plugins/samplesource/audioinput/audioinputgui.cpp b/plugins/samplesource/audioinput/audioinputgui.cpp index 0d662846f..97787d728 100644 --- a/plugins/samplesource/audioinput/audioinputgui.cpp +++ b/plugins/samplesource/audioinput/audioinputgui.cpp @@ -183,7 +183,7 @@ void AudioInputGui::refreshDeviceList() { ui->device->blockSignals(true); AudioDeviceManager *audioDeviceManager = DSPEngine::instance()->getAudioDeviceManager(); - const QList& audioList = audioDeviceManager->getInputDevices(); + const QList& audioList = audioDeviceManager->getInputDevices(); ui->device->clear(); for (const auto &itAudio : audioList) @@ -197,8 +197,8 @@ void AudioInputGui::refreshSampleRates(QString deviceName) { ui->sampleRate->blockSignals(true); ui->sampleRate->clear(); - const auto deviceInfos = QAudioDeviceInfo::availableDevices(QAudio::AudioInput); - for (const QAudioDeviceInfo &deviceInfo : deviceInfos) + const auto deviceInfos = AudioDeviceInfo::availableInputDevices(); + for (const AudioDeviceInfo &deviceInfo : deviceInfos) { if (deviceName == AudioInputSettings::getFullDeviceName(deviceInfo)) { diff --git a/plugins/samplesource/audioinput/audioinputsettings.h b/plugins/samplesource/audioinput/audioinputsettings.h index 2c90e96f9..aecf4484a 100644 --- a/plugins/samplesource/audioinput/audioinputsettings.h +++ b/plugins/samplesource/audioinput/audioinputsettings.h @@ -20,7 +20,7 @@ #define _AUDIOINPUT_AUDIOINPUTSETTINGS_H_ #include -#include +#include "audio/audiodeviceinfo.h" struct AudioInputSettings { @@ -46,17 +46,13 @@ struct AudioInputSettings { bool deserialize(const QByteArray& data); // Append realm to device names, because there may be multiple devices with the same name on Windows - static QString getFullDeviceName(const QAudioDeviceInfo &deviceInfo) + static QString getFullDeviceName(const AudioDeviceInfo &deviceInfo) { -#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) - return deviceInfo.deviceName(); -#else QString realm = deviceInfo.realm(); if (realm != "" && realm != "default" && realm != "alsa") return deviceInfo.deviceName() + " " + realm; else return deviceInfo.deviceName(); -#endif } void applySettings(const QStringList& settingsKeys, const AudioInputSettings& settings); QString getDebugString(const QStringList& settingsKeys, bool force=false) const; diff --git a/plugins/samplesource/bladerf1input/CMakeLists.txt b/plugins/samplesource/bladerf1input/CMakeLists.txt index 26a220dfd..0c41e1944 100644 --- a/plugins/samplesource/bladerf1input/CMakeLists.txt +++ b/plugins/samplesource/bladerf1input/CMakeLists.txt @@ -34,7 +34,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME inputbladerf1) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -53,7 +53,7 @@ if(LIBBLADERF_EXTERNAL) endif() target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/samplesource/bladerf2input/CMakeLists.txt b/plugins/samplesource/bladerf2input/CMakeLists.txt index ff00ba567..4827ac76b 100644 --- a/plugins/samplesource/bladerf2input/CMakeLists.txt +++ b/plugins/samplesource/bladerf2input/CMakeLists.txt @@ -35,7 +35,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME inputbladerf2) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -54,7 +54,7 @@ if(LIBBLADERF_EXTERNAL) endif() target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/samplesource/fcdpro/CMakeLists.txt b/plugins/samplesource/fcdpro/CMakeLists.txt index 8c59e5ab1..4b65abe0d 100644 --- a/plugins/samplesource/fcdpro/CMakeLists.txt +++ b/plugins/samplesource/fcdpro/CMakeLists.txt @@ -35,7 +35,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME inputfcdpro) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -51,7 +51,7 @@ add_library(${TARGET_NAME} SHARED target_link_libraries(${TARGET_NAME} ${HIDAPI_LIBRARIES} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/samplesource/fcdpro/fcdproinput.cpp b/plugins/samplesource/fcdpro/fcdproinput.cpp index 817e4b8af..033107a60 100644 --- a/plugins/samplesource/fcdpro/fcdproinput.cpp +++ b/plugins/samplesource/fcdpro/fcdproinput.cpp @@ -169,7 +169,7 @@ void FCDProInput::closeDevice() bool FCDProInput::openFCDAudio(const char* cardname) { AudioDeviceManager *audioDeviceManager = DSPEngine::instance()->getAudioDeviceManager(); - const QList& audioList = audioDeviceManager->getInputDevices(); + const QList& audioList = audioDeviceManager->getInputDevices(); for (const auto &itAudio : audioList) { diff --git a/plugins/samplesource/fcdproplus/CMakeLists.txt b/plugins/samplesource/fcdproplus/CMakeLists.txt index 90fc9ba0f..83bd24f8a 100644 --- a/plugins/samplesource/fcdproplus/CMakeLists.txt +++ b/plugins/samplesource/fcdproplus/CMakeLists.txt @@ -35,7 +35,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME inputfcdproplus) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -51,7 +51,7 @@ add_library(${TARGET_NAME} SHARED target_link_libraries(${TARGET_NAME} ${HIDAPI_LIBRARIES} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/samplesource/fcdproplus/fcdproplusinput.cpp b/plugins/samplesource/fcdproplus/fcdproplusinput.cpp index a77bb1401..ba3a50804 100644 --- a/plugins/samplesource/fcdproplus/fcdproplusinput.cpp +++ b/plugins/samplesource/fcdproplus/fcdproplusinput.cpp @@ -171,7 +171,7 @@ void FCDProPlusInput::closeDevice() bool FCDProPlusInput::openFCDAudio(const char* cardname) { AudioDeviceManager *audioDeviceManager = DSPEngine::instance()->getAudioDeviceManager(); - const QList& audioList = audioDeviceManager->getInputDevices(); + const QList& audioList = audioDeviceManager->getInputDevices(); for (const auto &itAudio : audioList) { diff --git a/plugins/samplesource/fileinput/CMakeLists.txt b/plugins/samplesource/fileinput/CMakeLists.txt index 1476dcb56..5042b499a 100644 --- a/plugins/samplesource/fileinput/CMakeLists.txt +++ b/plugins/samplesource/fileinput/CMakeLists.txt @@ -31,7 +31,7 @@ if(NOT SERVER_MODE) fileinputgui.h ) set(TARGET_NAME inputfileinput) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -46,7 +46,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/samplesource/hackrfinput/CMakeLists.txt b/plugins/samplesource/hackrfinput/CMakeLists.txt index 8b87d76af..e17a3710d 100644 --- a/plugins/samplesource/hackrfinput/CMakeLists.txt +++ b/plugins/samplesource/hackrfinput/CMakeLists.txt @@ -35,7 +35,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME inputhackrf) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -50,7 +50,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/samplesource/kiwisdr/CMakeLists.txt b/plugins/samplesource/kiwisdr/CMakeLists.txt index 1a9f7ac6a..f6714b79e 100644 --- a/plugins/samplesource/kiwisdr/CMakeLists.txt +++ b/plugins/samplesource/kiwisdr/CMakeLists.txt @@ -33,7 +33,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME inputkiwisdr) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -48,8 +48,8 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core - Qt5::WebSockets + Qt::Core + Qt::WebSockets ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/samplesource/limesdrinput/CMakeLists.txt b/plugins/samplesource/limesdrinput/CMakeLists.txt index c16d75ebe..fcc50b4af 100644 --- a/plugins/samplesource/limesdrinput/CMakeLists.txt +++ b/plugins/samplesource/limesdrinput/CMakeLists.txt @@ -35,7 +35,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME inputlimesdr) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -54,7 +54,7 @@ if(LIMESUITE_EXTERNAL) endif() target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/samplesource/localinput/CMakeLists.txt b/plugins/samplesource/localinput/CMakeLists.txt index ad1271876..a7bd05457 100644 --- a/plugins/samplesource/localinput/CMakeLists.txt +++ b/plugins/samplesource/localinput/CMakeLists.txt @@ -32,7 +32,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME inputlocal) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -47,7 +47,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/samplesource/perseus/CMakeLists.txt b/plugins/samplesource/perseus/CMakeLists.txt index 5a96dad00..d20662f0a 100644 --- a/plugins/samplesource/perseus/CMakeLists.txt +++ b/plugins/samplesource/perseus/CMakeLists.txt @@ -36,7 +36,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME inputperseus) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -55,7 +55,7 @@ if(LIBPERSEUS_EXTERNAL) endif() target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/samplesource/plutosdrinput/CMakeLists.txt b/plugins/samplesource/plutosdrinput/CMakeLists.txt index a7b6a7338..98ed3045b 100644 --- a/plugins/samplesource/plutosdrinput/CMakeLists.txt +++ b/plugins/samplesource/plutosdrinput/CMakeLists.txt @@ -35,7 +35,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME inputplutosdr) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -54,7 +54,7 @@ if(LIBIIO_EXTERNAL) endif() target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/samplesource/remoteinput/CMakeLists.txt b/plugins/samplesource/remoteinput/CMakeLists.txt index d4d1ec32d..b6f50261c 100644 --- a/plugins/samplesource/remoteinput/CMakeLists.txt +++ b/plugins/samplesource/remoteinput/CMakeLists.txt @@ -36,7 +36,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME inputremote) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -55,7 +55,7 @@ if(CM256CC_EXTERNAL) endif() target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/samplesource/remotetcpinput/CMakeLists.txt b/plugins/samplesource/remotetcpinput/CMakeLists.txt index 74e3bdb70..39bd1d6f6 100644 --- a/plugins/samplesource/remotetcpinput/CMakeLists.txt +++ b/plugins/samplesource/remotetcpinput/CMakeLists.txt @@ -32,7 +32,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME inputtcpremote) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -47,7 +47,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/samplesource/rtlsdr/CMakeLists.txt b/plugins/samplesource/rtlsdr/CMakeLists.txt index 1c441083d..1d25aadce 100644 --- a/plugins/samplesource/rtlsdr/CMakeLists.txt +++ b/plugins/samplesource/rtlsdr/CMakeLists.txt @@ -33,7 +33,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME inputrtlsdr) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -48,7 +48,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/samplesource/sdrplay/CMakeLists.txt b/plugins/samplesource/sdrplay/CMakeLists.txt index 09ca4778b..203d42d71 100644 --- a/plugins/samplesource/sdrplay/CMakeLists.txt +++ b/plugins/samplesource/sdrplay/CMakeLists.txt @@ -34,7 +34,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME inputsdrplay) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -53,7 +53,7 @@ if(LIBMIRISDR_EXTERNAL) endif(LIBMIRISDR_EXTERNAL) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/samplesource/sdrplayv3/CMakeLists.txt b/plugins/samplesource/sdrplayv3/CMakeLists.txt index acf2822bb..15a095921 100644 --- a/plugins/samplesource/sdrplayv3/CMakeLists.txt +++ b/plugins/samplesource/sdrplayv3/CMakeLists.txt @@ -33,7 +33,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME inputsdrplayv3) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -48,7 +48,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/samplesource/sigmffileinput/CMakeLists.txt b/plugins/samplesource/sigmffileinput/CMakeLists.txt index 5c4f8a2e2..efab2460b 100644 --- a/plugins/samplesource/sigmffileinput/CMakeLists.txt +++ b/plugins/samplesource/sigmffileinput/CMakeLists.txt @@ -35,7 +35,7 @@ if(NOT SERVER_MODE) recordinfodialog.h ) set(TARGET_NAME inputsigmffileinput) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -50,7 +50,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/samplesource/soapysdrinput/CMakeLists.txt b/plugins/samplesource/soapysdrinput/CMakeLists.txt index bbff360eb..1bd2abe92 100644 --- a/plugins/samplesource/soapysdrinput/CMakeLists.txt +++ b/plugins/samplesource/soapysdrinput/CMakeLists.txt @@ -35,7 +35,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME inputsoapysdr) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -50,7 +50,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/samplesource/testsource/CMakeLists.txt b/plugins/samplesource/testsource/CMakeLists.txt index c3d6b4184..a82fb4562 100644 --- a/plugins/samplesource/testsource/CMakeLists.txt +++ b/plugins/samplesource/testsource/CMakeLists.txt @@ -33,7 +33,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME inputtestsource) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -48,7 +48,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/samplesource/usrpinput/CMakeLists.txt b/plugins/samplesource/usrpinput/CMakeLists.txt index 09d14648f..4a5868b41 100644 --- a/plugins/samplesource/usrpinput/CMakeLists.txt +++ b/plugins/samplesource/usrpinput/CMakeLists.txt @@ -35,7 +35,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME inputusrp) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -54,7 +54,7 @@ if(UHD_EXTERNAL) endif() target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/plugins/samplesource/xtrxinput/CMakeLists.txt b/plugins/samplesource/xtrxinput/CMakeLists.txt index 97a49c3ad..93019d83b 100644 --- a/plugins/samplesource/xtrxinput/CMakeLists.txt +++ b/plugins/samplesource/xtrxinput/CMakeLists.txt @@ -35,7 +35,7 @@ if(NOT SERVER_MODE) ) set(TARGET_NAME inputxtrx) - set(TARGET_LIB "Qt5::Widgets") + set(TARGET_LIB "Qt::Widgets") set(TARGET_LIB_GUI "sdrgui") set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR}) else() @@ -50,7 +50,7 @@ add_library(${TARGET_NAME} SHARED ) target_link_libraries(${TARGET_NAME} - Qt5::Core + Qt::Core ${TARGET_LIB} sdrbase ${TARGET_LIB_GUI} diff --git a/qrtplib/CMakeLists.txt b/qrtplib/CMakeLists.txt index 0c75ee075..97d44826a 100644 --- a/qrtplib/CMakeLists.txt +++ b/qrtplib/CMakeLists.txt @@ -81,8 +81,8 @@ add_library(qrtplib SHARED ) target_link_libraries(qrtplib - Qt5::Core - Qt5::Network + Qt::Core + Qt::Network ) install(TARGETS qrtplib DESTINATION ${INSTALL_LIB_DIR}) diff --git a/sdrbase/CMakeLists.txt b/sdrbase/CMakeLists.txt index bb6f5f21b..d1bcb297e 100644 --- a/sdrbase/CMakeLists.txt +++ b/sdrbase/CMakeLists.txt @@ -55,6 +55,7 @@ set(sdrbase_SOURCES audio/audiocompressor.cpp audio/audiocompressorsnd.cpp + audio/audiodeviceinfo.cpp audio/audiodevicemanager.cpp audio/audiofifo.cpp audio/audiofilter.cpp @@ -237,6 +238,7 @@ set(sdrbase_HEADERS audio/audiocompressor.h audio/audiocompressorsnd.h + audio/audiodeviceinfo.h audio/audiodevicemanager.h audio/audiofifo.h audio/audiofilter.h @@ -486,17 +488,28 @@ target_link_libraries(sdrbase ${sdrbase_SERIALDV_LIB} ${sdrbase_LIMERFE_LIB} ${sdrbase_LIBSIGMF_LIB} - Qt5::Core - Qt5::Multimedia - Qt5::WebSockets + Qt::Core + Qt::Multimedia + Qt::WebSockets httpserver logging qrtplib swagger ) +if (Qt6_FOUND) + target_link_libraries(sdrbase + Qt::Core5Compat + ) +endif() install(TARGETS sdrbase DESTINATION ${INSTALL_LIB_DIR}) +if(WIN32 AND Qt6_FOUND) + # Run deployqt for Core5Compat + include(DeployQt) + windeployqt(sdrbase ${SDRANGEL_BINARY_BIN_DIR} "") +endif() + # Install debug symbols if (WIN32) install(FILES $ CONFIGURATIONS Debug RelWithDebInfo DESTINATION ${INSTALL_LIB_DIR} ) diff --git a/sdrbase/audio/audiodeviceinfo.cpp b/sdrbase/audio/audiodeviceinfo.cpp new file mode 100644 index 000000000..a5f68e2e0 --- /dev/null +++ b/sdrbase/audio/audiodeviceinfo.cpp @@ -0,0 +1,132 @@ +/////////////////////////////////////////////////////////////////////////////////// +// Copyright (C) 2022 Jon Beniston, M7RCE // +// // +// This program is free software; you can redistribute it and/or modify // +// it under the terms of the GNU General Public License as published by // +// the Free Software Foundation as version 3 of the License, or // +// (at your option) any later version. // +// // +// This program is distributed in the hope that it will be useful, // +// but WITHOUT ANY WARRANTY; without even the implied warranty of // +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // +// GNU General Public License V3 for more details. // +// // +// You should have received a copy of the GNU General Public License // +// along with this program. If not, see . // +/////////////////////////////////////////////////////////////////////////////////// + +#include "audiodeviceinfo.h" + +QString AudioDeviceInfo::deviceName() const +{ +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + return m_deviceInfo.description(); +#else + return m_deviceInfo.deviceName(); +#endif +} + +bool AudioDeviceInfo::isFormatSupported(const QAudioFormat &settings) const +{ + return m_deviceInfo.isFormatSupported(settings); +} + +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) +QList AudioDeviceInfo::supportedSampleRates() const +{ + // QAudioDevice is a bit more flexible than QAudioDeviceInfo, in that it supports + // min and max rate, rather than a specific list + // For now, we just list some common rates. + QList sampleRates = {8000, 11025, 22050, 44100, 48000, 96000, 192000}; + QList supportedRates; + for (auto sampleRate : sampleRates) + { + if ((sampleRate <= m_deviceInfo.maximumSampleRate()) && (sampleRate >= m_deviceInfo.minimumSampleRate())) { + supportedRates.append(sampleRate); + } + } + return supportedRates; +} +#else +QList AudioDeviceInfo::supportedSampleRates() const +{ + return m_deviceInfo.supportedSampleRates(); +} +#endif + +QString AudioDeviceInfo::realm() const +{ +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + return ""; // Don't appear to have realms in Qt6 +#else + return m_deviceInfo.realm(); +#endif +} + +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) +QList AudioDeviceInfo::availableInputDevices() +{ + QList devInfos = QMediaDevices::audioInputs(); + QList list; + + for (auto devInfo : devInfos) { + list.append(AudioDeviceInfo(devInfo)); + } + + return list; +} + +QList AudioDeviceInfo::availableOutputDevices() +{ + QList devInfos = QMediaDevices::audioOutputs(); + QList list; + + for (auto devInfo : devInfos) { + list.append(AudioDeviceInfo(devInfo)); + } + + return list; +} +#else +QList AudioDeviceInfo::availableInputDevices() +{ + QList devInfos = QAudioDeviceInfo::availableDevices(QAudio::AudioInput); + QList list; + + for (auto devInfo : devInfos) { + list.append(AudioDeviceInfo(devInfo)); + } + + return list; +} + +QList AudioDeviceInfo::availableOutputDevices() +{ + QList devInfos = QAudioDeviceInfo::availableDevices(QAudio::AudioOutput); + QList list; + + for (auto devInfo : devInfos) { + list.append(AudioDeviceInfo(devInfo)); + } + + return list; +} +#endif + +AudioDeviceInfo AudioDeviceInfo::defaultOutputDevice() +{ +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + return AudioDeviceInfo(QMediaDevices::defaultAudioOutput()); +#else + return AudioDeviceInfo(QAudioDeviceInfo::defaultOutputDevice()); +#endif +} + +AudioDeviceInfo AudioDeviceInfo::defaultInputDevice() +{ +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + return AudioDeviceInfo(QMediaDevices::defaultAudioInput()); +#else + return AudioDeviceInfo(QAudioDeviceInfo::defaultInputDevice()); +#endif +} diff --git a/sdrbase/audio/audiodeviceinfo.h b/sdrbase/audio/audiodeviceinfo.h new file mode 100644 index 000000000..b5df24ec1 --- /dev/null +++ b/sdrbase/audio/audiodeviceinfo.h @@ -0,0 +1,82 @@ +/////////////////////////////////////////////////////////////////////////////////// +// Copyright (C) 2022 Jon Beniston, M7RCE // +// // +// This program is free software; you can redistribute it and/or modify // +// it under the terms of the GNU General Public License as published by // +// the Free Software Foundation as version 3 of the License, or // +// (at your option) any later version. // +// // +// This program is distributed in the hope that it will be useful, // +// but WITHOUT ANY WARRANTY; without even the implied warranty of // +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // +// GNU General Public License V3 for more details. // +// // +// You should have received a copy of the GNU General Public License // +// along with this program. If not, see . // +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef INCLUDE_AUDIODEVICEINFO_H +#define INCLUDE_AUDIODEVICEINFO_H + +#include +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) +#include +#include +#else +#include +#endif + +#include "export.h" + +// Wrapper around QT6's QAudioDevice and and QT5's QAudioDeviceInfo +class SDRBASE_API AudioDeviceInfo { + +public: + +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + AudioDeviceInfo() : + m_deviceInfo() + { + } + + AudioDeviceInfo(QAudioDevice deviceInfo) : + m_deviceInfo(deviceInfo) + { + } + + QAudioDevice deviceInfo() { return m_deviceInfo; } +#else + AudioDeviceInfo() : + m_deviceInfo() + { + } + + AudioDeviceInfo(QAudioDeviceInfo deviceInfo) : + m_deviceInfo(deviceInfo) + { + } + + QAudioDeviceInfo deviceInfo() { return m_deviceInfo; } +#endif + + QString deviceName() const; + QString realm() const; + bool isFormatSupported(const QAudioFormat &settings) const; + QList supportedSampleRates() const; + + static QList availableInputDevices(); + static QList availableOutputDevices(); + static AudioDeviceInfo defaultInputDevice(); + static AudioDeviceInfo defaultOutputDevice(); + +private: + +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + QAudioDevice m_deviceInfo; +#else + QAudioDeviceInfo m_deviceInfo; +#endif + +}; + +#endif // INCLUDE_AUDIODEVICEINFO_H diff --git a/sdrbase/audio/audiodevicemanager.cpp b/sdrbase/audio/audiodevicemanager.cpp index d8101274c..382b756ec 100644 --- a/sdrbase/audio/audiodevicemanager.cpp +++ b/sdrbase/audio/audiodevicemanager.cpp @@ -79,14 +79,15 @@ QDataStream& operator>>(QDataStream& ds, AudioDeviceManager::OutputDeviceInfo& i AudioDeviceManager::AudioDeviceManager() { qDebug("AudioDeviceManager::AudioDeviceManager: scan input devices"); - m_inputDevicesInfo = QAudioDeviceInfo::availableDevices(QAudio::AudioInput); + m_inputDevicesInfo = AudioDeviceInfo::availableInputDevices(); for (int i = 0; i < m_inputDevicesInfo.size(); i++) { qDebug("AudioDeviceManager::AudioDeviceManager: input device #%d: %s", i, qPrintable(m_inputDevicesInfo[i].deviceName())); } qDebug("AudioDeviceManager::AudioDeviceManager: scan output devices"); - m_outputDevicesInfo = QAudioDeviceInfo::availableDevices(QAudio::AudioOutput); + + m_outputDevicesInfo = AudioDeviceInfo::availableOutputDevices(); for (int i = 0; i < m_outputDevicesInfo.size(); i++) { qDebug("AudioDeviceManager::AudioDeviceManager: output device #%d: %s", i, qPrintable(m_outputDevicesInfo[i].deviceName())); @@ -737,7 +738,7 @@ void AudioDeviceManager::inputInfosCleanup() { QSet deviceNames; deviceNames.insert(m_defaultDeviceName); - QList::const_iterator itd = m_inputDevicesInfo.begin(); + QList::const_iterator itd = m_inputDevicesInfo.begin(); for (; itd != m_inputDevicesInfo.end(); ++itd) { @@ -765,7 +766,7 @@ void AudioDeviceManager::outputInfosCleanup() { QSet deviceNames; deviceNames.insert(m_defaultDeviceName); - QList::const_iterator itd = m_outputDevicesInfo.begin(); + QList::const_iterator itd = m_outputDevicesInfo.begin(); for (; itd != m_outputDevicesInfo.end(); ++itd) { diff --git a/sdrbase/audio/audiodevicemanager.h b/sdrbase/audio/audiodevicemanager.h index 2966d6f41..6f260deee 100644 --- a/sdrbase/audio/audiodevicemanager.h +++ b/sdrbase/audio/audiodevicemanager.h @@ -22,10 +22,10 @@ #include #include #include -#include #include "audio/audioinputdevice.h" #include "audio/audiooutputdevice.h" +#include "audio/audiodeviceinfo.h" #include "export.h" class QDataStream; @@ -97,8 +97,8 @@ public: AudioDeviceManager(); ~AudioDeviceManager(); - const QList& getInputDevices() const { return m_inputDevicesInfo; } - const QList& getOutputDevices() const { return m_outputDevicesInfo; } + const QList& getInputDevices() const { return m_inputDevicesInfo; } + const QList& getOutputDevices() const { return m_outputDevicesInfo; } bool getOutputDeviceName(int outputDeviceIndex, QString &deviceName) const; bool getInputDeviceName(int inputDeviceIndex, QString &deviceName) const; @@ -129,8 +129,8 @@ public: static const QString m_defaultDeviceName; private: - QList m_inputDevicesInfo; - QList m_outputDevicesInfo; + QList m_inputDevicesInfo; + QList m_outputDevicesInfo; QMap m_audioSinkFifos; //< audio sink FIFO to audio output device index-1 map QMap m_audioFifoToSinkMessageQueues; //!< audio sink FIFO to attached sink message queue diff --git a/sdrbase/audio/audioinputdevice.cpp b/sdrbase/audio/audioinputdevice.cpp index 2fcc91e10..a1ccb0d70 100644 --- a/sdrbase/audio/audioinputdevice.cpp +++ b/sdrbase/audio/audioinputdevice.cpp @@ -16,10 +16,15 @@ /////////////////////////////////////////////////////////////////////////////////// #include +#include #include -#include +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) +#include +#else #include +#endif #include "audio/audioinputdevice.h" +#include "audio/audiodeviceinfo.h" #include "audio/audiofifo.h" AudioInputDevice::AudioInputDevice() : @@ -50,16 +55,16 @@ bool AudioInputDevice::start(int device, int rate) if (m_audioUsageCount == 0) { QMutexLocker mutexLocker(&m_mutex); - QAudioDeviceInfo devInfo; + AudioDeviceInfo devInfo; if (device < 0) { - devInfo = QAudioDeviceInfo::defaultInputDevice(); + devInfo = AudioDeviceInfo::defaultInputDevice(); qWarning("AudioInputDevice::start: using default device %s", qPrintable(devInfo.defaultInputDevice().deviceName())); } else { - QList devicesInfo = QAudioDeviceInfo::availableDevices(QAudio::AudioInput); + QList devicesInfo = AudioDeviceInfo::availableInputDevices(); if (device < devicesInfo.size()) { @@ -68,7 +73,7 @@ bool AudioInputDevice::start(int device, int rate) } else { - devInfo = QAudioDeviceInfo::defaultInputDevice(); + devInfo = AudioDeviceInfo::defaultInputDevice(); qWarning("AudioInputDevice::start: audio device #%d does not exist. Using default device %s", device, qPrintable(devInfo.deviceName())); } } @@ -77,29 +82,49 @@ bool AudioInputDevice::start(int device, int rate) m_audioFormat.setSampleRate(rate); m_audioFormat.setChannelCount(2); +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + m_audioFormat.setSampleFormat(QAudioFormat::Int16); +#else m_audioFormat.setSampleSize(16); m_audioFormat.setCodec("audio/pcm"); m_audioFormat.setByteOrder(QAudioFormat::LittleEndian); m_audioFormat.setSampleType(QAudioFormat::SignedInt); // Unknown, SignedInt, UnSignedInt, Float +#endif if (!devInfo.isFormatSupported(m_audioFormat)) { - m_audioFormat = devInfo.nearestFormat(m_audioFormat); +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + qWarning("AudioInputDevice::start: %d Hz S16_LE audio format not supported."); +#else + m_audioFormat = devInfo.deviceInfo().nearestFormat(m_audioFormat); qWarning("AudioInputDevice::start: %d Hz S16_LE audio format not supported. Nearest is sampleRate: %d channelCount: %d sampleSize: %d sampleType: %d", rate, m_audioFormat.sampleRate(), m_audioFormat.channelCount(), m_audioFormat.sampleSize(), (int) m_audioFormat.sampleType()); +#endif } else { qInfo("AudioInputDevice::start: audio format OK"); } - if (m_audioFormat.sampleSize() != 16) +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + if (m_audioFormat.sampleFormat() != QAudioFormat::Int16) { - qWarning("AudioInputDevice::start: Audio device '%s' failed", qPrintable(devInfo.defaultInputDevice().deviceName())); + qWarning("AudioInputDevice::start: Audio device '%s' failed", qPrintable(devInfo.deviceName())); return false; } +#else + if (m_audioFormat.sampleSize() != 16) + { + qWarning("AudioInputDevice::start: Audio device '%s' failed", qPrintable(devInfo.deviceName())); + return false; + } +#endif - m_audioInput = new QAudioInput(devInfo, m_audioFormat); +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + m_audioInput = new QAudioSource(devInfo.deviceInfo(), m_audioFormat); +#else + m_audioInput = new QAudioInput(devInfo.deviceInfo(), m_audioFormat); +#endif m_audioInput->setVolume(m_volume); QIODevice::open(QIODevice::ReadWrite); @@ -167,6 +192,8 @@ qint64 AudioInputDevice::writeData(const char *data, qint64 len) // QMutexLocker mutexLocker(&m_mutex); //#endif +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) +#else if ((m_audioFormat.sampleSize() != 16) || (m_audioFormat.sampleType() != QAudioFormat::SignedInt) || (m_audioFormat.byteOrder() != QAudioFormat::LittleEndian)) @@ -174,6 +201,7 @@ qint64 AudioInputDevice::writeData(const char *data, qint64 len) qCritical("AudioInputDevice::writeData: invalid format not S16LE"); return 0; } +#endif if (m_audioFormat.channelCount() != 2) { qCritical("AudioInputDevice::writeData: invalid format not stereo"); diff --git a/sdrbase/audio/audioinputdevice.h b/sdrbase/audio/audioinputdevice.h index 0973ac51b..8f3214a39 100644 --- a/sdrbase/audio/audioinputdevice.h +++ b/sdrbase/audio/audioinputdevice.h @@ -25,7 +25,11 @@ #include #include "export.h" +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) +class QAudioSource; +#else class QAudioInput; +#endif class AudioFifo; class AudioOutputPipe; @@ -48,7 +52,11 @@ public: private: QRecursiveMutex m_mutex; +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + QAudioSource* m_audioInput; +#else QAudioInput* m_audioInput; +#endif uint m_audioUsageCount; bool m_onExit; float m_volume; diff --git a/sdrbase/audio/audiooutputdevice.cpp b/sdrbase/audio/audiooutputdevice.cpp index 4c445e6eb..32d32c840 100644 --- a/sdrbase/audio/audiooutputdevice.cpp +++ b/sdrbase/audio/audiooutputdevice.cpp @@ -18,9 +18,13 @@ #include #include -#include +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) +#include +#else #include +#endif #include "audiooutputdevice.h" +#include "audiodeviceinfo.h" #include "audiofifo.h" #include "audionetsink.h" #include "dsp/wavfilerecord.h" @@ -59,20 +63,19 @@ AudioOutputDevice::~AudioOutputDevice() bool AudioOutputDevice::start(int device, int rate) { - // if (m_audioUsageCount == 0) // { QMutexLocker mutexLocker(&m_mutex); - QAudioDeviceInfo devInfo; + AudioDeviceInfo devInfo; if (device < 0) { - devInfo = QAudioDeviceInfo::defaultOutputDevice(); + devInfo = AudioDeviceInfo::defaultOutputDevice(); qWarning("AudioOutputDevice::start: using system default device %s", qPrintable(devInfo.defaultOutputDevice().deviceName())); } else { - QList devicesInfo = QAudioDeviceInfo::availableDevices(QAudio::AudioOutput); + QList devicesInfo = AudioDeviceInfo::availableOutputDevices(); if (device < devicesInfo.size()) { @@ -81,23 +84,34 @@ bool AudioOutputDevice::start(int device, int rate) } else { - devInfo = QAudioDeviceInfo::defaultOutputDevice(); + devInfo = AudioDeviceInfo::defaultOutputDevice(); qWarning("AudioOutputDevice::start: audio device #%d does not exist. Using system default device %s", device, qPrintable(devInfo.defaultOutputDevice().deviceName())); } } //QAudioDeviceInfo devInfo(QAudioDeviceInfo::defaultOutputDevice()); +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + // Start with a valid format + m_audioFormat = devInfo.deviceInfo().preferredFormat(); +#endif m_audioFormat.setSampleRate(rate); m_audioFormat.setChannelCount(2); +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + m_audioFormat.setSampleFormat(QAudioFormat::Int16); +#else m_audioFormat.setSampleSize(16); m_audioFormat.setCodec("audio/pcm"); m_audioFormat.setByteOrder(QAudioFormat::LittleEndian); m_audioFormat.setSampleType(QAudioFormat::SignedInt); +#endif if (!devInfo.isFormatSupported(m_audioFormat)) { - m_audioFormat = devInfo.nearestFormat(m_audioFormat); +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + qWarning("AudioOutputDevice::start: format %d Hz 2xS16LE audio/pcm not supported.", rate); +#else + m_audioFormat = devInfo.deviceInfo().nearestFormat(m_audioFormat); std::ostringstream os; os << " sampleRate: " << m_audioFormat.sampleRate() << " channelCount: " << m_audioFormat.channelCount() @@ -106,19 +120,32 @@ bool AudioOutputDevice::start(int device, int rate) << " byteOrder: " << (m_audioFormat.byteOrder() == QAudioFormat::BigEndian ? "BE" : "LE") << " sampleType: " << (int) m_audioFormat.sampleType(); qWarning("AudioOutputDevice::start: format %d Hz 2xS16LE audio/pcm not supported. Using: %s", rate, os.str().c_str()); +#endif } else { qInfo("AudioOutputDevice::start: audio format OK"); } - if (m_audioFormat.sampleSize() != 16) +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + if (m_audioFormat.sampleFormat() != QAudioFormat::Int16) { - qWarning("AudioOutputDevice::start: Audio device '%s' failed", qPrintable(devInfo.defaultOutputDevice().deviceName())); + qWarning("AudioOutputDevice::start: Audio device '%s' failed", qPrintable(devInfo.deviceName())); return false; } +#else + if (m_audioFormat.sampleSize() != 16) + { + qWarning("AudioOutputDevice::start: Audio device '%s' failed", qPrintable(devInfo.deviceName())); + return false; + } +#endif - m_audioOutput = new QAudioOutput(devInfo, m_audioFormat); +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + m_audioOutput = new QAudioSink(devInfo.deviceInfo(), m_audioFormat); +#else + m_audioOutput = new QAudioOutput(devInfo.deviceInfo(), m_audioFormat); +#endif m_audioNetSink = new AudioNetSink(0, m_audioFormat.sampleRate(), false); m_wavFileRecord = new WavFileRecord(m_audioFormat.sampleRate()); m_audioOutput->setVolume(m_volume); @@ -129,7 +156,7 @@ bool AudioOutputDevice::start(int device, int rate) m_audioOutput->start(this); if (m_audioOutput->state() != QAudio::ActiveState) { - qWarning("AudioOutputDevice::start: cannot start"); + qWarning() << "AudioOutputDevice::start: cannot start - " << m_audioOutput->error(); } // } // @@ -295,8 +322,6 @@ void AudioOutputDevice::setRecordSilenceTime(int recordSilenceTime) qint64 AudioOutputDevice::readData(char* data, qint64 maxLen) { - //qDebug("AudioOutputDevice::readData: %lld", maxLen); - // Study this mutex on OSX, for now deadlocks possible // Removed as it may indeed cause lockups and is in fact useless. //#ifndef __APPLE__ @@ -475,3 +500,25 @@ void AudioOutputDevice::setVolume(float volume) m_audioOutput->setVolume(m_volume); } } + +// Qt6 requires bytesAvailable to be implemented. Not needed for Qt5. +qint64 AudioOutputDevice::bytesAvailable() const +{ + qint64 available = 0; + for (std::list::const_iterator it = m_audioFifos.begin(); it != m_audioFifos.end(); ++it) + { + qint64 fill = (*it)->fill(); + if (available == 0) { + available = fill; + } else { + available = std::min(fill, available); + } + } + // If we return 0 from this twice in a row, audio will stop. + // So we always return a value, and if we don't have enough data in the FIFOs + // when readData is called, that will output silence + if (available == 0) { + available = 2048; // Is there a better value to use? + } + return available * 2 * 2; // 2 Channels of 16-bit data +} diff --git a/sdrbase/audio/audiooutputdevice.h b/sdrbase/audio/audiooutputdevice.h index 411a00e2b..32e7be13d 100644 --- a/sdrbase/audio/audiooutputdevice.h +++ b/sdrbase/audio/audiooutputdevice.h @@ -27,7 +27,11 @@ #include #include "export.h" +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) +class QAudioSink; +#else class QAudioOutput; +#endif class AudioFifo; class AudioOutputPipe; class AudioNetSink; @@ -79,7 +83,11 @@ public: private: QRecursiveMutex m_mutex; +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + QAudioSink* m_audioOutput; +#else QAudioOutput* m_audioOutput; +#endif AudioNetSink* m_audioNetSink; WavFileRecord* m_wavFileRecord; bool m_copyAudioToUdp; @@ -102,6 +110,7 @@ private: //virtual bool open(OpenMode mode); virtual qint64 readData(char* data, qint64 maxLen); virtual qint64 writeData(const char* data, qint64 len); + virtual qint64 bytesAvailable() const override; void writeSampleToFile(qint16 lSample, qint16 rSample); friend class AudioOutputPipe; diff --git a/sdrbase/commands/command.cpp b/sdrbase/commands/command.cpp index 5036e33a7..ba25ba1a8 100644 --- a/sdrbase/commands/command.cpp +++ b/sdrbase/commands/command.cpp @@ -150,7 +150,7 @@ QString Command::getKeyLabel() const else if (m_keyModifiers != Qt::NoModifier) { QString altGrStr = m_keyModifiers & Qt::GroupSwitchModifier ? "Gr " : ""; - int maskedModifiers = (m_keyModifiers & 0x3FFFFFFF) + ((m_keyModifiers & 0x40000000)>>3); + int maskedModifiers = ((int) m_keyModifiers & 0x3FFFFFFF) + (((int) m_keyModifiers & 0x40000000)>>3); return altGrStr + QKeySequence(maskedModifiers, m_key).toString(); } else diff --git a/sdrbase/device/deviceuserargs.cpp b/sdrbase/device/deviceuserargs.cpp index e8730b72f..9ba02011b 100644 --- a/sdrbase/device/deviceuserargs.cpp +++ b/sdrbase/device/deviceuserargs.cpp @@ -16,6 +16,7 @@ /////////////////////////////////////////////////////////////////////////////////// #include +#include #include "util/simpleserializer.h" #include "deviceuserargs.h" diff --git a/sdrbase/dsp/glscopesettings.h b/sdrbase/dsp/glscopesettings.h index 7fbcce431..647821f58 100644 --- a/sdrbase/dsp/glscopesettings.h +++ b/sdrbase/dsp/glscopesettings.h @@ -66,7 +66,11 @@ public: void setColor(QColor color) { m_traceColor = color; +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + float r,g,b,a; +#else qreal r,g,b,a; +#endif m_traceColor.getRgbF(&r, &g, &b, &a); m_traceColorR = r; m_traceColorG = g; @@ -119,7 +123,11 @@ public: void setColor(QColor color) { m_triggerColor = color; +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + float r,g,b,a; +#else qreal r,g,b,a; +#endif m_triggerColor.getRgbF(&r, &g, &b, &a); m_triggerColorR = r; m_triggerColorG = g; diff --git a/sdrbase/dsp/spectrumsettings.cpp b/sdrbase/dsp/spectrumsettings.cpp index e908aaa1a..122981c8c 100644 --- a/sdrbase/dsp/spectrumsettings.cpp +++ b/sdrbase/dsp/spectrumsettings.cpp @@ -144,17 +144,8 @@ QByteArray SpectrumSettings::serialize() const s.writeBlob(111+i, m_waterfallMarkers[i].serialize()); } - QByteArray dataAnnotation; - QDataStream *stream = new QDataStream(&dataAnnotation, QIODevice::WriteOnly); - (*stream) << m_annoationMarkers; - delete stream; - s.writeBlob(40, dataAnnotation); - - QByteArray dataCalibration; - stream = new QDataStream(&dataCalibration, QIODevice::WriteOnly); - (*stream) << m_calibrationPoints; - delete stream; - s.writeBlob(41, dataCalibration); + s.writeList(40, m_annoationMarkers); + s.writeList(41, m_calibrationPoints); return s.final(); } @@ -275,15 +266,8 @@ bool SpectrumSettings::deserialize(const QByteArray& data) m_waterfallMarkers.back().deserialize(bytetmp); } - d.readBlob(40, &bytetmp); - QDataStream *stream = new QDataStream(bytetmp); - (*stream) >> m_annoationMarkers; - delete stream; - - d.readBlob(41, &bytetmp); - stream = new QDataStream(bytetmp); - (*stream) >> m_calibrationPoints; - delete stream; + d.readList(40, &m_annoationMarkers); + d.readList(41, &m_calibrationPoints); return true; } diff --git a/sdrbase/mainparser.cpp b/sdrbase/mainparser.cpp index fa96f6033..6ab22f2ce 100644 --- a/sdrbase/mainparser.cpp +++ b/sdrbase/mainparser.cpp @@ -17,7 +17,7 @@ /////////////////////////////////////////////////////////////////////////////////// #include -#include +#include #include #include "mainparser.h" @@ -72,11 +72,11 @@ void MainParser::parse(const QCoreApplication& app) if (!serverAddress.isEmpty()) { QString ipRange = "(?:[0-1]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])"; - QRegExp ipRegex ("^" + ipRange - + "\\." + ipRange - + "\\." + ipRange - + "\\." + ipRange + "$"); - QRegExpValidator ipValidator(ipRegex); + QRegularExpression ipRegex ("^" + ipRange + + "\\." + ipRange + + "\\." + ipRange + + "\\." + ipRange + "$"); + QRegularExpressionValidator ipValidator(ipRegex); if (ipValidator.validate(serverAddress, pos) == QValidator::Acceptable) { m_serverAddress = serverAddress; diff --git a/sdrbase/settings/rollupstate.cpp b/sdrbase/settings/rollupstate.cpp index 0c9584471..1c811d68b 100644 --- a/sdrbase/settings/rollupstate.cpp +++ b/sdrbase/settings/rollupstate.cpp @@ -17,6 +17,8 @@ /////////////////////////////////////////////////////////////////////////////////// #include +#include + #include "SWGRollupState.h" #include "rollupstate.h" diff --git a/sdrbase/settings/serializable.h b/sdrbase/settings/serializable.h index 84d1420c8..d5358487e 100644 --- a/sdrbase/settings/serializable.h +++ b/sdrbase/settings/serializable.h @@ -22,7 +22,8 @@ namespace SWGSDRangel { class SWGObject; } -class QStringList; +#include + class Serializable { public: diff --git a/sdrbase/util/ais.cpp b/sdrbase/util/ais.cpp index 461116181..5ce502314 100644 --- a/sdrbase/util/ais.cpp +++ b/sdrbase/util/ais.cpp @@ -256,7 +256,7 @@ QString AISMessage::getString(const QByteArray ba, int byteIdx, int bitsLeft, in if (c < 32) { c |= 0x40; } - s.append(c); + s.append(QChar(c)); } // Remove leading/trailing spaces s = s.trimmed(); diff --git a/sdrbase/util/aprs.cpp b/sdrbase/util/aprs.cpp index e4b1effec..d1191733d 100644 --- a/sdrbase/util/aprs.cpp +++ b/sdrbase/util/aprs.cpp @@ -308,7 +308,7 @@ bool APRSPacket::parseTimeMDHM(QString& info, int& idx) } // Position ambigutiy can be specified by using spaces instead of digits in lats and longs -bool APRSPacket::isLatLongChar(QCharRef c) +bool APRSPacket::isLatLongChar(const QChar c) { return (c.isDigit() || c == ' '); } diff --git a/sdrbase/util/aprs.h b/sdrbase/util/aprs.h index 5a20810ef..b2b34a551 100644 --- a/sdrbase/util/aprs.h +++ b/sdrbase/util/aprs.h @@ -461,7 +461,7 @@ private: int charToInt(QString &s, int idx); bool parseTime(QString& info, int& idx); bool parseTimeMDHM(QString& info, int& idx); - bool isLatLongChar(QCharRef c); + bool isLatLongChar(const QChar c); bool parsePosition(QString& info, int& idx); bool parseDataExension(QString& info, int& idx); bool parseComment(QString& info, int& idx); diff --git a/sdrbase/util/morse.cpp b/sdrbase/util/morse.cpp index e7b4ebaf1..97d4f4509 100644 --- a/sdrbase/util/morse.cpp +++ b/sdrbase/util/morse.cpp @@ -197,7 +197,7 @@ QString Morse::toString(QString &morse) { int c = Morse::toASCII(groups[i]); if ((c != -1) && (groups[i] != "")) - string.append(c); + string.append(QChar(c)); } return string; } diff --git a/sdrbase/util/openaip.h b/sdrbase/util/openaip.h index 058f6e029..1d4d372d1 100644 --- a/sdrbase/util/openaip.h +++ b/sdrbase/util/openaip.h @@ -130,7 +130,7 @@ struct SDRBASE_API Airspace { { if (xmlReader.readNextStartElement()) { - if (xmlReader.name() == "ASP") + if (xmlReader.name() == QLatin1String("ASP")) { Airspace *airspace = new Airspace(); @@ -264,9 +264,9 @@ struct SDRBASE_API NavAid { { if (xmlReader.readNextStartElement()) { - if (xmlReader.name() == "NAVAID") + if (xmlReader.name() == QLatin1String("NAVAID")) { - QStringRef typeRef = xmlReader.attributes().value("TYPE"); + QStringView typeRef = xmlReader.attributes().value("TYPE"); if ((typeRef == QLatin1String("NDB")) || (typeRef == QLatin1String("DME")) || (typeRef == QLatin1String("VOR")) diff --git a/sdrbase/util/peakfinder.cpp b/sdrbase/util/peakfinder.cpp index a2c0f8a56..91ddcf44c 100644 --- a/sdrbase/util/peakfinder.cpp +++ b/sdrbase/util/peakfinder.cpp @@ -18,6 +18,8 @@ // along with this program. If not, see . // /////////////////////////////////////////////////////////////////////////////////// +#include + #include "peakfinder.h" PeakFinder::PeakFinder() : diff --git a/sdrbase/util/visa.cpp b/sdrbase/util/visa.cpp index 8699c6179..19f0adc21 100644 --- a/sdrbase/util/visa.cpp +++ b/sdrbase/util/visa.cpp @@ -257,7 +257,7 @@ QList VISA::instruments(QRegularExpression *filter) void *VISA::libraryOpen(const char *filename) { HMODULE module; - module = LoadLibrary ((LPCSTR)filename); + module = LoadLibraryA ((LPCSTR)filename); return module; } diff --git a/sdrbase/webapi/webapiadapter.cpp b/sdrbase/webapi/webapiadapter.cpp index d5960cf89..df865087c 100644 --- a/sdrbase/webapi/webapiadapter.cpp +++ b/sdrbase/webapi/webapiadapter.cpp @@ -24,6 +24,7 @@ #include "maincore.h" #include "loggerwithfile.h" +#include "audio/audiodeviceinfo.h" #include "device/deviceapi.h" #include "device/deviceset.h" #include "device/deviceenumerator.h" @@ -448,8 +449,8 @@ int WebAPIAdapter::instanceAudioGet( { (void) error; DSPEngine *dspEngine = DSPEngine::instance(); - const QList& audioInputDevices = dspEngine->getAudioDeviceManager()->getInputDevices(); - const QList& audioOutputDevices = dspEngine->getAudioDeviceManager()->getOutputDevices(); + const QList& audioInputDevices = dspEngine->getAudioDeviceManager()->getInputDevices(); + const QList& audioOutputDevices = dspEngine->getAudioDeviceManager()->getOutputDevices(); int nbInputDevices = audioInputDevices.size(); int nbOutputDevices = audioOutputDevices.size(); @@ -482,7 +483,7 @@ int WebAPIAdapter::instanceAudioGet( *inputDevices->back()->getName() = audioInputDevices.at(i).deviceName(); inputDevices->back()->setIndex(i); inputDevices->back()->setSampleRate(inputDeviceInfo.sampleRate); - inputDevices->back()->setIsSystemDefault(audioInputDevices.at(i).deviceName() == QAudioDeviceInfo::defaultInputDevice().deviceName() ? 1 : 0); + inputDevices->back()->setIsSystemDefault(audioInputDevices.at(i).deviceName() == AudioDeviceInfo::defaultInputDevice().deviceName() ? 1 : 0); inputDevices->back()->setDefaultUnregistered(found ? 0 : 1); inputDevices->back()->setVolume(inputDeviceInfo.volume); } @@ -517,7 +518,7 @@ int WebAPIAdapter::instanceAudioGet( *outputDevices->back()->getName() = audioOutputDevices.at(i).deviceName(); outputDevices->back()->setIndex(i); outputDevices->back()->setSampleRate(outputDeviceInfo.sampleRate); - outputDevices->back()->setIsSystemDefault(audioOutputDevices.at(i).deviceName() == QAudioDeviceInfo::defaultOutputDevice().deviceName() ? 1 : 0); + outputDevices->back()->setIsSystemDefault(audioOutputDevices.at(i).deviceName() == AudioDeviceInfo::defaultOutputDevice().deviceName() ? 1 : 0); outputDevices->back()->setDefaultUnregistered(found ? 0 : 1); outputDevices->back()->setCopyToUdp(outputDeviceInfo.copyToUDP ? 1 : 0); outputDevices->back()->setUdpUsesRtp(outputDeviceInfo.udpUseRTP ? 1 : 0); diff --git a/sdrbench/CMakeLists.txt b/sdrbench/CMakeLists.txt index ffc9c9258..eded1a2c2 100644 --- a/sdrbench/CMakeLists.txt +++ b/sdrbench/CMakeLists.txt @@ -22,8 +22,8 @@ include_directories( ) target_link_libraries(sdrbench - Qt5::Core - Qt5::Gui + Qt::Core + Qt::Gui sdrbase logging ) diff --git a/sdrbench/parserbench.cpp b/sdrbench/parserbench.cpp index a03fa749e..122c235f9 100644 --- a/sdrbench/parserbench.cpp +++ b/sdrbench/parserbench.cpp @@ -17,7 +17,7 @@ /////////////////////////////////////////////////////////////////////////////////// #include -#include +#include #include #include "parserbench.h" @@ -70,8 +70,8 @@ void ParserBench::parse(const QCoreApplication& app) QString test = m_parser.value(m_testOption); QString testStr = "([a-z0-9]+)"; - QRegExp ipRegex ("^" + testStr + "$"); - QRegExpValidator ipValidator(ipRegex); + QRegularExpression ipRegex ("^" + testStr + "$"); + QRegularExpressionValidator ipValidator(ipRegex); if (ipValidator.validate(test, pos) == QValidator::Acceptable) { m_testStr = test; diff --git a/sdrgui/CMakeLists.txt b/sdrgui/CMakeLists.txt index 70442beb8..f72f87701 100644 --- a/sdrgui/CMakeLists.txt +++ b/sdrgui/CMakeLists.txt @@ -168,6 +168,7 @@ set(sdrgui_HEADERS gui/physicalunit.h gui/pluginsdialog.h gui/presetitem.h + gui/qtcompatibility.h gui/rollupcontents.h gui/rollupwidget.h gui/samplingdevicedialog.h @@ -259,7 +260,7 @@ set(sdrgui_FORMS soapygui/arginfogui.ui ) -qt5_wrap_ui(sdrgui_FORMS_HEADERS ${sdrgui_FORMS}) +qt_wrap_ui(sdrgui_FORMS_HEADERS ${sdrgui_FORMS}) include_directories( ${CMAKE_SOURCE_DIR}/exports @@ -277,18 +278,29 @@ add_library(sdrgui SHARED ) target_link_libraries(sdrgui - Qt5::Core - Qt5::Widgets - Qt5::OpenGL - Qt5::Multimedia + Qt::Core + Qt::Widgets + Qt::OpenGL + Qt::Multimedia ${OPENGL_LIBRARIES} ${sdrgui_LIMERFE_LIB} sdrbase logging ) +if (Qt6_FOUND) + target_link_libraries(sdrbase + Qt::OpenGLWidgets + ) +endif() install(TARGETS sdrgui DESTINATION ${INSTALL_LIB_DIR}) +if(WIN32 AND Qt6_FOUND) + # Run deployqt for OpenGLWidgets + include(DeployQt) + windeployqt(sdrgui ${SDRANGEL_BINARY_BIN_DIR} "") +endif() + # Install debug symbols if (WIN32) install(FILES $ CONFIGURATIONS Debug RelWithDebInfo DESTINATION ${INSTALL_LIB_DIR} ) diff --git a/sdrgui/channel/channelgui.h b/sdrgui/channel/channelgui.h index aaecd6428..1e482d36a 100644 --- a/sdrgui/channel/channelgui.h +++ b/sdrgui/channel/channelgui.h @@ -21,6 +21,7 @@ #include #include +#include "gui/qtcompatibility.h" #include "gui/framelesswindowresizer.h" #include "export.h" diff --git a/sdrgui/gui/audiodialog.cpp b/sdrgui/gui/audiodialog.cpp index 7b8cadd4e..b379aead3 100644 --- a/sdrgui/gui/audiodialog.cpp +++ b/sdrgui/gui/audiodialog.cpp @@ -37,16 +37,16 @@ AudioDialogX::AudioDialogX(AudioDeviceManager* audioDeviceManager, QWidget* pare // out panel AudioDeviceManager::OutputDeviceInfo outDeviceInfo; - QAudioDeviceInfo defaultOutputDeviceInfo = QAudioDeviceInfo::defaultOutputDevice(); + AudioDeviceInfo defaultOutputDeviceInfo = AudioDeviceInfo::defaultOutputDevice(); treeItem = new QTreeWidgetItem(ui->audioOutTree); treeItem->setText(1, AudioDeviceManager::m_defaultDeviceName); bool found = m_audioDeviceManager->getOutputDeviceInfo(AudioDeviceManager::m_defaultDeviceName, outDeviceInfo); treeItem->setText(0, found ? "__" : "_D"); ui->audioOutTree->setCurrentItem(treeItem); - const QList& outputDevices = m_audioDeviceManager->getOutputDevices(); + const QList& outputDevices = m_audioDeviceManager->getOutputDevices(); - for(QList::const_iterator it = outputDevices.begin(); it != outputDevices.end(); ++it) + for(QList::const_iterator it = outputDevices.begin(); it != outputDevices.end(); ++it) { treeItem = new QTreeWidgetItem(ui->audioOutTree); treeItem->setText(1, it->deviceName()); @@ -65,16 +65,16 @@ AudioDialogX::AudioDialogX(AudioDeviceManager* audioDeviceManager, QWidget* pare // in panel AudioDeviceManager::InputDeviceInfo inDeviceInfo; - QAudioDeviceInfo defaultInputDeviceInfo = QAudioDeviceInfo::defaultInputDevice(); + AudioDeviceInfo defaultInputDeviceInfo = AudioDeviceInfo::defaultInputDevice(); treeItem = new QTreeWidgetItem(ui->audioInTree); treeItem->setText(1, AudioDeviceManager::m_defaultDeviceName); found = m_audioDeviceManager->getInputDeviceInfo(AudioDeviceManager::m_defaultDeviceName, inDeviceInfo); treeItem->setText(0, found ? "__" : "_D"); ui->audioInTree->setCurrentItem(treeItem); - const QList& inputDevices = m_audioDeviceManager->getInputDevices(); + const QList& inputDevices = m_audioDeviceManager->getInputDevices(); - for(QList::const_iterator it = inputDevices.begin(); it != inputDevices.end(); ++it) + for(QList::const_iterator it = inputDevices.begin(); it != inputDevices.end(); ++it) { treeItem = new QTreeWidgetItem(ui->audioInTree); treeItem->setText(1, it->deviceName()); diff --git a/sdrgui/gui/audioselectdialog.cpp b/sdrgui/gui/audioselectdialog.cpp index f33a5c89c..a01e7b381 100644 --- a/sdrgui/gui/audioselectdialog.cpp +++ b/sdrgui/gui/audioselectdialog.cpp @@ -33,7 +33,6 @@ AudioSelectDialog::AudioSelectDialog(const AudioDeviceManager* audioDeviceManage // panel - QAudioDeviceInfo defaultDeviceInfo = input ? QAudioDeviceInfo::defaultInputDevice() : QAudioDeviceInfo::defaultOutputDevice(); defaultItem = new QTreeWidgetItem(ui->audioTree); defaultItem->setText(1, AudioDeviceManager::m_defaultDeviceName); bool deviceFound = getDeviceInfos(input, AudioDeviceManager::m_defaultDeviceName, systemDefault, sampleRate); @@ -41,9 +40,9 @@ AudioSelectDialog::AudioSelectDialog(const AudioDeviceManager* audioDeviceManage defaultItem->setText(2, tr("%1").arg(sampleRate)); defaultItem->setTextAlignment(2, Qt::AlignRight); - QList devices = input ? m_audioDeviceManager->getInputDevices() : m_audioDeviceManager->getOutputDevices(); + QList devices = input ? m_audioDeviceManager->getInputDevices() : m_audioDeviceManager->getOutputDevices(); - for(QList::const_iterator it = devices.begin(); it != devices.end(); ++it) + for(QList::const_iterator it = devices.begin(); it != devices.end(); ++it) { treeItem = new QTreeWidgetItem(ui->audioTree); treeItem->setText(1, it->deviceName()); @@ -113,7 +112,7 @@ bool AudioSelectDialog::getDeviceInfos(bool input, const QString& deviceName, bo { AudioDeviceManager::InputDeviceInfo inDeviceInfo; found = m_audioDeviceManager->getInputDeviceInfo(deviceName, inDeviceInfo); - systemDefault = deviceName == QAudioDeviceInfo::defaultInputDevice().deviceName(); + systemDefault = deviceName == AudioDeviceInfo::defaultInputDevice().deviceName(); if (found) { sampleRate = inDeviceInfo.sampleRate; @@ -125,7 +124,7 @@ bool AudioSelectDialog::getDeviceInfos(bool input, const QString& deviceName, bo { AudioDeviceManager::OutputDeviceInfo outDeviceInfo; found = m_audioDeviceManager->getOutputDeviceInfo(deviceName, outDeviceInfo); - systemDefault = deviceName == QAudioDeviceInfo::defaultOutputDevice().deviceName(); + systemDefault = deviceName == AudioDeviceInfo::defaultOutputDevice().deviceName(); if (found) { sampleRate = outDeviceInfo.sampleRate; diff --git a/sdrgui/gui/channeladddialog.h b/sdrgui/gui/channeladddialog.h index f0a8fefaa..0d5b5b1cb 100644 --- a/sdrgui/gui/channeladddialog.h +++ b/sdrgui/gui/channeladddialog.h @@ -20,11 +20,11 @@ #define SDRGUI_GUI_CHANNELADDDIALOG_H_ #include +#include #include #include "export.h" -class QStringList; class QAbstractButton; namespace Ui { diff --git a/sdrgui/gui/cwkeyergui.cpp b/sdrgui/gui/cwkeyergui.cpp index fa89aa94e..2d5f9d920 100644 --- a/sdrgui/gui/cwkeyergui.cpp +++ b/sdrgui/gui/cwkeyergui.cpp @@ -344,7 +344,7 @@ void CWKeyerGUI::setKeyLabel(QLabel *label, Qt::Key key, Qt::KeyboardModifiers k else if (keyModifiers != Qt::NoModifier) { QString altGrStr = keyModifiers & Qt::GroupSwitchModifier ? "Gr " : ""; - int maskedModifiers = (keyModifiers & 0x3FFFFFFF) + ((keyModifiers & 0x40000000)>>3); + int maskedModifiers = ((int) keyModifiers & 0x3FFFFFFF) + (((int) keyModifiers & 0x40000000)>>3); label->setText(altGrStr + QKeySequence(maskedModifiers, key).toString()); } else diff --git a/sdrgui/gui/editcommanddialog.cpp b/sdrgui/gui/editcommanddialog.cpp index 14fe7eef3..5d4ff4c83 100644 --- a/sdrgui/gui/editcommanddialog.cpp +++ b/sdrgui/gui/editcommanddialog.cpp @@ -204,7 +204,7 @@ void EditCommandDialog::setKeyLabel() else if (m_keyModifiers != Qt::NoModifier) { QString altGrStr = m_keyModifiers & Qt::GroupSwitchModifier ? "Gr " : ""; - int maskedModifiers = (m_keyModifiers & 0x3FFFFFFF) + ((m_keyModifiers & 0x40000000)>>3); + int maskedModifiers = ((int) m_keyModifiers & 0x3FFFFFFF) + (((int) m_keyModifiers & 0x40000000)>>3); ui->keyLabel->setText(altGrStr + QKeySequence(maskedModifiers, m_key).toString()); } else diff --git a/sdrgui/gui/featureadddialog.h b/sdrgui/gui/featureadddialog.h index c2270b3ef..f999b5b21 100644 --- a/sdrgui/gui/featureadddialog.h +++ b/sdrgui/gui/featureadddialog.h @@ -20,11 +20,11 @@ #define SDRGUI_GUI_FEATUREADDDIALOG_H_ #include +#include #include #include "export.h" -class QStringList; class QAbstractButton; namespace Ui { diff --git a/sdrgui/gui/glspectrumgui.cpp b/sdrgui/gui/glspectrumgui.cpp index d14ee6923..4b655bfd9 100644 --- a/sdrgui/gui/glspectrumgui.cpp +++ b/sdrgui/gui/glspectrumgui.cpp @@ -23,7 +23,6 @@ #include #include #include -#include #include #include "gui/glspectrumgui.h" @@ -728,7 +727,7 @@ void GLSpectrumGUI::on_calibration_toggled(bool checked) void GLSpectrumGUI::on_gotoMarker_currentIndexChanged(int index) { - if (index == 0) { + if (index <= 0) { return; } int i = 1; diff --git a/sdrgui/gui/glspectrumview.cpp b/sdrgui/gui/glspectrumview.cpp index 6381eb105..5532a3a28 100644 --- a/sdrgui/gui/glspectrumview.cpp +++ b/sdrgui/gui/glspectrumview.cpp @@ -4452,7 +4452,7 @@ bool GLSpectrumView::pointInHistogram(const QPointF &point) const return (p.x() >= 0) && (p.x() <= 1) && (p.y() >= 0) && (p.y() <= 1); } -void GLSpectrumView::enterEvent(QEvent* event) +void GLSpectrumView::enterEvent(EnterEventType* event) { m_mouseInside = true; update(); @@ -4463,7 +4463,7 @@ void GLSpectrumView::leaveEvent(QEvent* event) { m_mouseInside = false; update(); - QOpenGLWidget::enterEvent(event); + QOpenGLWidget::leaveEvent(event); } void GLSpectrumView::tick() diff --git a/sdrgui/gui/glspectrumview.h b/sdrgui/gui/glspectrumview.h index b14c4fa93..74101b6a9 100644 --- a/sdrgui/gui/glspectrumview.h +++ b/sdrgui/gui/glspectrumview.h @@ -30,6 +30,7 @@ #include #include #include +#include "gui/qtcompatibility.h" #include "gui/scaleengine.h" #include "gui/glshadersimple.h" #include "gui/glshadertextured.h" @@ -465,7 +466,7 @@ private: bool pointInWaterfallOrSpectrogram(const QPointF &point) const; bool pointInHistogram(const QPointF &point) const; - void enterEvent(QEvent* event); + void enterEvent(EnterEventType* event); void leaveEvent(QEvent* event); static QString displayFull(int64_t value); diff --git a/sdrgui/gui/qtcompatibility.h b/sdrgui/gui/qtcompatibility.h new file mode 100644 index 000000000..c6db2bff8 --- /dev/null +++ b/sdrgui/gui/qtcompatibility.h @@ -0,0 +1,30 @@ +/////////////////////////////////////////////////////////////////////////////////// +// Copyright (C) 2022 Jon Beniston, M7RCE // +// // +// This program is free software; you can redistribute it and/or modify // +// it under the terms of the GNU General Public License as published by // +// the Free Software Foundation as version 3 of the License, or // +// (at your option) any later version. // +// // +// This program is distributed in the hope that it will be useful, // +// but WITHOUT ANY WARRANTY; without even the implied warranty of // +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // +// GNU General Public License V3 for more details. // +// // +// You should have received a copy of the GNU General Public License // +// along with this program. If not, see . // +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef SDRGUI_GUI_QTCOMPATIBILITY_H +#define SDRGUI_GUI_QTCOMPATIBILITY_H + +// Widget::enterEvent parameters have different types in QT5 and QT6 +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) +#include +typedef QEnterEvent EnterEventType; +#else +#include +typedef QEvent EnterEventType; +#endif + +#endif diff --git a/sdrgui/gui/scaleengine.cpp b/sdrgui/gui/scaleengine.cpp index 68783e20e..5bc755ac4 100644 --- a/sdrgui/gui/scaleengine.cpp +++ b/sdrgui/gui/scaleengine.cpp @@ -17,6 +17,7 @@ /////////////////////////////////////////////////////////////////////////////////// #include +#include #include #include #include "gui/scaleengine.h" diff --git a/sdrgui/gui/spectrummarkersdialog.cpp b/sdrgui/gui/spectrummarkersdialog.cpp index b75c36a7e..dd0f2c324 100644 --- a/sdrgui/gui/spectrummarkersdialog.cpp +++ b/sdrgui/gui/spectrummarkersdialog.cpp @@ -841,14 +841,14 @@ void SpectrumMarkersDialog::on_showSelect_currentIndexChanged(int index) void SpectrumMarkersDialog::updateHistogramMarkersDisplay() { - m_histogramMarkerIndex = std::max(m_histogramMarkerIndex, m_histogramMarkers.size() - 1); + m_histogramMarkerIndex = std::max(m_histogramMarkerIndex, (int)m_histogramMarkers.size() - 1); ui->marker->setMaximum(m_histogramMarkers.size() - 1); displayHistogramMarker(); } void SpectrumMarkersDialog::updateWaterfallMarkersDisplay() { - m_waterfallMarkerIndex = std::max(m_waterfallMarkerIndex, m_waterfallMarkers.size() - 1); + m_waterfallMarkerIndex = std::max(m_waterfallMarkerIndex, (int)m_waterfallMarkers.size() - 1); ui->wMarker->setMaximum(m_waterfallMarkers.size() - 1); displayWaterfallMarker(); } diff --git a/sdrgui/gui/valuedial.cpp b/sdrgui/gui/valuedial.cpp index 169398fea..9222baa80 100644 --- a/sdrgui/gui/valuedial.cpp +++ b/sdrgui/gui/valuedial.cpp @@ -353,7 +353,7 @@ void ValueDial::mouseMoveEvent(QMouseEvent *event) int i; i = (event->x() - 1) / m_digitWidth; - if (m_text[i] == m_groupSeparator) { + if ((i >= m_text.size()) || (m_text[i] == m_groupSeparator)) { i = -1; } diff --git a/sdrgui/gui/valuedial.h b/sdrgui/gui/valuedial.h index e6a1e919f..2a467e362 100644 --- a/sdrgui/gui/valuedial.h +++ b/sdrgui/gui/valuedial.h @@ -57,7 +57,11 @@ private: int m_animationState; QTimer m_animationTimer; QTimer m_blinkTimer; +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + QString m_groupSeparator; +#else QChar m_groupSeparator; +#endif ColorMapper m_colorMapper; diff --git a/sdrgui/gui/valuedialz.cpp b/sdrgui/gui/valuedialz.cpp index 7dc13da76..948bfe611 100644 --- a/sdrgui/gui/valuedialz.cpp +++ b/sdrgui/gui/valuedialz.cpp @@ -399,7 +399,7 @@ void ValueDialZ::mouseMoveEvent(QMouseEvent* event) i = (event->x() - 1) / m_digitWidth; - if ((m_text[i] == m_groupSeparator) || (m_text[i] == m_decSeparator)) { + if ((i >= m_text.size()) || (m_text[i] == m_groupSeparator) || (m_text[i] == m_decSeparator)) { i = -1; } diff --git a/sdrgui/gui/valuedialz.h b/sdrgui/gui/valuedialz.h index 68ce6ba7f..ad3ca6135 100644 --- a/sdrgui/gui/valuedialz.h +++ b/sdrgui/gui/valuedialz.h @@ -62,8 +62,13 @@ private: int m_animationState; QTimer m_animationTimer; QTimer m_blinkTimer; +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + QString m_groupSeparator; + QString m_decSeparator; +#else QChar m_groupSeparator; QChar m_decSeparator; +#endif ColorMapper m_colorMapper; diff --git a/sdrgui/gui/workspace.h b/sdrgui/gui/workspace.h index a79eeff03..ab4d05b6b 100644 --- a/sdrgui/gui/workspace.h +++ b/sdrgui/gui/workspace.h @@ -20,6 +20,7 @@ #define SDRGUI_GUI_WORKSPACE_H_ #include +#include #include "export.h" #include "featureadddialog.h" @@ -28,7 +29,6 @@ class QHBoxLayout; class QLabel; class QPushButton; -class QStringList; class QMdiArea; class QMdiSubWindow; class QFrame; diff --git a/sdrsrv/CMakeLists.txt b/sdrsrv/CMakeLists.txt index 6d196cac4..6eb6ec485 100644 --- a/sdrsrv/CMakeLists.txt +++ b/sdrsrv/CMakeLists.txt @@ -27,8 +27,8 @@ add_library(sdrsrv SHARED ) target_link_libraries(sdrsrv - Qt5::Core - Qt5::Multimedia + Qt::Core + Qt::Multimedia sdrbase logging ) diff --git a/swagger/CMakeLists.txt b/swagger/CMakeLists.txt index c40c0993a..ef643ed01 100644 --- a/swagger/CMakeLists.txt +++ b/swagger/CMakeLists.txt @@ -22,8 +22,8 @@ if (NOT MSVC) endif() target_link_libraries(swagger - Qt5::Core - Qt5::Network + Qt::Core + Qt::Network ) install(TARGETS swagger DESTINATION ${INSTALL_LIB_DIR})