diff --git a/CMakeLists.txt b/CMakeLists.txt index 06a5e838d6..12081ec726 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -588,6 +588,7 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON) # See: https://doc-snapshots.qt.io/qt6-dev/cmake-qt5-and-qt6-compatibility.html if(ENABLE_QT6) # Qt6 doesn't currently support Location + add_definitions(-DENABLE_QT6) find_package(Qt6 COMPONENTS Core diff --git a/plugins/channelrx/demodft8/ft8demodsettingsdialog.h b/plugins/channelrx/demodft8/ft8demodsettingsdialog.h index da1f968d0f..d6f8907c1b 100644 --- a/plugins/channelrx/demodft8/ft8demodsettingsdialog.h +++ b/plugins/channelrx/demodft8/ft8demodsettingsdialog.h @@ -19,9 +19,12 @@ #define PLUGINS_CHANNELRX_DEMODFT8_FT8DEMODSETTINGSDIALOG_H_ #include "ui_ft8demodsettingsdialog.h" - -class FT8DemodSettings; +#if defined(ENABLE_QT6) +#include +#else class QStringList; +#endif +class FT8DemodSettings; class QTableWidgetItem; class FT8DemodSettingsDialog : public QDialog { diff --git a/plugins/channelrx/heatmap/heatmapgui.cpp b/plugins/channelrx/heatmap/heatmapgui.cpp index c045010bd4..a9e48ece28 100644 --- a/plugins/channelrx/heatmap/heatmapgui.cpp +++ b/plugins/channelrx/heatmap/heatmapgui.cpp @@ -218,7 +218,7 @@ void HeatMapGUI::on_sampleRate_valueChanged(int value) { m_settings.m_sampleRate = (int)std::pow(10.0f, (float)value); ui->sampleRateText->setText(m_sampleRateTexts[value-1]); - ui->averagePeriod->setMinimum(std::max(1, m_averagePeriodTexts.size() - value)); + ui->averagePeriod->setMinimum(std::max((long long){1}, m_averagePeriodTexts.size() - value)); m_scopeVis->setLiveRate(m_settings.m_sampleRate); applySettings(); } @@ -696,7 +696,7 @@ void HeatMapGUI::displaySettings() value = (int)std::log10(m_settings.m_sampleRate); ui->sampleRate->setValue(value); ui->sampleRateText->setText(m_sampleRateTexts[value-1]); - ui->averagePeriod->setMinimum(std::max(1, m_averagePeriodTexts.size() - value)); + ui->averagePeriod->setMinimum(std::max((long long){1}, m_averagePeriodTexts.size() - value)); ui->txPosition->setChecked(m_settings.m_txPosValid); displayTXPosition(m_settings.m_txPosValid); diff --git a/sdrbase/maincore.cpp b/sdrbase/maincore.cpp index 43f73ec611..8c689e80d3 100644 --- a/sdrbase/maincore.cpp +++ b/sdrbase/maincore.cpp @@ -358,7 +358,9 @@ void MainCore::initPosition() if (m_positionSource) { connect(m_positionSource, &QGeoPositionInfoSource::positionUpdated, this, &MainCore::positionUpdated); + #if !defined(ENABLE_QT6) connect(m_positionSource, &QGeoPositionInfoSource::updateTimeout, this, &MainCore::positionUpdateTimeout); + #endif connect(m_positionSource, qOverload(&QGeoPositionInfoSource::error), this, &MainCore::positionError); m_position = m_positionSource->lastKnownPosition(); m_positionSource->setUpdateInterval(1000); @@ -398,6 +400,12 @@ void MainCore::positionUpdateTimeout() void MainCore::positionError(QGeoPositionInfoSource::Error positioningError) { + #if defined(ENABLE_QT6) + if (positioningError == 4){ + positionUpdateTimeout(); + return; + } + #endif qWarning() << "MainCore::positionError: " << positioningError; } diff --git a/sdrgui/gui/dialogpositioner.cpp b/sdrgui/gui/dialogpositioner.cpp index 143cc41f8c..4dab3c6d09 100644 --- a/sdrgui/gui/dialogpositioner.cpp +++ b/sdrgui/gui/dialogpositioner.cpp @@ -29,10 +29,12 @@ DialogPositioner::DialogPositioner(QWidget *dialog, bool center) : m_center(center) { connect(dialog->screen(), &QScreen::orientationChanged, this, &DialogPositioner::orientationChanged); + #if !defined(ENABLE_QT6) dialog->screen()->setOrientationUpdateMask(Qt::PortraitOrientation | Qt::LandscapeOrientation | Qt::InvertedPortraitOrientation | Qt::InvertedLandscapeOrientation); + #endif if (m_center) { DialogPositioner::centerDialog(m_dialog); } else { diff --git a/sdrgui/mainwindow.cpp b/sdrgui/mainwindow.cpp index 16c187d944..87f462709a 100644 --- a/sdrgui/mainwindow.cpp +++ b/sdrgui/mainwindow.cpp @@ -174,10 +174,12 @@ MainWindow::MainWindow(qtwebapp::LoggerWithFile *logger, const MainParser& parse connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleMessages()), Qt::QueuedConnection); connect(screen(), &QScreen::orientationChanged, this, &MainWindow::orientationChanged); + #if !defined(ENABLE_QT6) screen()->setOrientationUpdateMask(Qt::PortraitOrientation | Qt::LandscapeOrientation | Qt::InvertedPortraitOrientation | Qt::InvertedLandscapeOrientation); + #endif connect(&m_statusTimer, SIGNAL(timeout()), this, SLOT(updateStatus())); m_statusTimer.start(1000);