From ea6134acea5913ec630e98cf231a90e256e6ae69 Mon Sep 17 00:00:00 2001 From: Dan Paulat Date: Mon, 5 Jun 2023 21:53:24 -0500 Subject: [PATCH 1/3] emit keyword is incompatible with oneTBB --- scwx-qt/scwx-qt.cmake | 6 ++++ scwx-qt/source/scwx/qt/main/main_window.cpp | 2 +- .../scwx/qt/manager/radar_product_manager.cpp | 19 +++++++------ .../scwx/qt/manager/text_event_manager.cpp | 2 +- .../scwx/qt/manager/timeline_manager.cpp | 28 +++++++++---------- .../source/scwx/qt/manager/update_manager.cpp | 2 +- scwx-qt/source/scwx/qt/map/alert_layer.cpp | 4 +-- scwx-qt/source/scwx/qt/map/map_widget.cpp | 20 ++++++------- scwx-qt/source/scwx/qt/model/alert_model.cpp | 4 +-- .../source/scwx/qt/model/radar_site_model.cpp | 2 +- scwx-qt/source/scwx/qt/model/tree_model.cpp | 2 +- scwx-qt/source/scwx/qt/ui/alert_dialog.cpp | 2 +- .../source/scwx/qt/ui/alert_dock_widget.cpp | 8 +++--- .../scwx/qt/ui/animation_dock_widget.cpp | 26 +++++++++-------- .../scwx/qt/ui/level2_products_widget.cpp | 2 +- .../scwx/qt/ui/level2_settings_widget.cpp | 2 +- .../scwx/qt/ui/level3_products_widget.cpp | 4 +-- .../source/scwx/qt/ui/radar_site_dialog.cpp | 2 +- scwx-qt/source/scwx/qt/ui/settings_dialog.cpp | 4 +-- .../scwx/qt/view/level2_product_view.cpp | 4 +-- .../scwx/qt/view/level3_product_view.cpp | 2 +- .../scwx/qt/view/level3_radial_view.cpp | 2 +- .../scwx/qt/view/level3_raster_view.cpp | 2 +- .../scwx/qt/view/radar_product_view.cpp | 2 +- 24 files changed, 81 insertions(+), 72 deletions(-) diff --git a/scwx-qt/scwx-qt.cmake b/scwx-qt/scwx-qt.cmake index 5558b857..013f107e 100644 --- a/scwx-qt/scwx-qt.cmake +++ b/scwx-qt/scwx-qt.cmake @@ -371,6 +371,12 @@ if (WIN32) target_compile_definitions(supercell-wx PUBLIC WIN32_LEAN_AND_MEAN) endif() +if (NOT MSVC) + # Qt emit keyword is incompatible with TBB + target_compile_definitions(scwx-qt PRIVATE QT_NO_EMIT) + target_compile_definitions(supercell-wx PRIVATE QT_NO_EMIT) +endif() + target_include_directories(scwx-qt PUBLIC ${scwx-qt_SOURCE_DIR}/source ${FTGL_INCLUDE_DIR} ${IMGUI_INCLUDE_DIRS} diff --git a/scwx-qt/source/scwx/qt/main/main_window.cpp b/scwx-qt/source/scwx/qt/main/main_window.cpp index 8b14dc85..3e126487 100644 --- a/scwx-qt/source/scwx/qt/main/main_window.cpp +++ b/scwx-qt/source/scwx/qt/main/main_window.cpp @@ -611,7 +611,7 @@ void MainWindowImpl::ConnectMapSignals() { if (mapWidget == activeMap_) { - emit mainWindow_->ActiveMapMoved(latitude, longitude); + Q_EMIT mainWindow_->ActiveMapMoved(latitude, longitude); } }, Qt::QueuedConnection); diff --git a/scwx-qt/source/scwx/qt/manager/radar_product_manager.cpp b/scwx-qt/source/scwx/qt/manager/radar_product_manager.cpp index c6a1e007..1d3d1126 100644 --- a/scwx-qt/source/scwx/qt/manager/radar_product_manager.cpp +++ b/scwx-qt/source/scwx/qt/manager/radar_product_manager.cpp @@ -631,9 +631,10 @@ void RadarProductManagerImpl::RefreshData( if (newObjects > 0) { - emit providerManager->NewDataAvailable(providerManager->group_, - providerManager->product_, - latestTime); + Q_EMIT providerManager->NewDataAvailable( + providerManager->group_, + providerManager->product_, + latestTime); } } else if (providerManager->refreshEnabled_) @@ -904,7 +905,7 @@ void RadarProductManager::LoadFile( else if (request != nullptr) { request->set_radar_product_record(existingRecord); - emit request->RequestComplete(request); + Q_EMIT request->RequestComplete(request); } } @@ -940,7 +941,7 @@ void RadarProductManagerImpl::LoadNexradFile( if (request != nullptr) { request->set_radar_product_record(record); - emit request->RequestComplete(request); + Q_EMIT request->RequestComplete(request); } }); } @@ -1044,7 +1045,7 @@ RadarProductManagerImpl::GetLevel2ProductRecord( { if (request->radar_product_record() != nullptr) { - emit self_->DataReloaded(request->radar_product_record()); + Q_EMIT self_->DataReloaded(request->radar_product_record()); } }); @@ -1109,7 +1110,7 @@ RadarProductManagerImpl::GetLevel3ProductRecord( { if (request->radar_product_record() != nullptr) { - emit self_->DataReloaded(request->radar_product_record()); + Q_EMIT self_->DataReloaded(request->radar_product_record()); } }); @@ -1345,7 +1346,7 @@ void RadarProductManager::UpdateAvailableProducts() } } - emit Level3ProductsChanged(); + Q_EMIT Level3ProductsChanged(); }); } @@ -1378,7 +1379,7 @@ RadarProductManager::Instance(const std::string& radarSite) if (instanceCreated) { - emit RadarProductManagerNotifier::Instance().RadarProductManagerCreated( + Q_EMIT RadarProductManagerNotifier::Instance().RadarProductManagerCreated( radarSite); } diff --git a/scwx-qt/source/scwx/qt/manager/text_event_manager.cpp b/scwx-qt/source/scwx/qt/manager/text_event_manager.cpp index 805c9c8e..6bc8119c 100644 --- a/scwx-qt/source/scwx/qt/manager/text_event_manager.cpp +++ b/scwx-qt/source/scwx/qt/manager/text_event_manager.cpp @@ -184,7 +184,7 @@ void TextEventManager::Impl::HandleMessage( if (updated) { - emit self_->AlertUpdated(key, messageIndex); + Q_EMIT self_->AlertUpdated(key, messageIndex); } } diff --git a/scwx-qt/source/scwx/qt/manager/timeline_manager.cpp b/scwx-qt/source/scwx/qt/manager/timeline_manager.cpp index fd2413cd..77225c6f 100644 --- a/scwx-qt/source/scwx/qt/manager/timeline_manager.cpp +++ b/scwx-qt/source/scwx/qt/manager/timeline_manager.cpp @@ -226,7 +226,7 @@ void TimelineManager::Impl::Pause() if (animationState_ != types::AnimationState::Pause) { animationState_ = types::AnimationState::Pause; - emit self_->AnimationStateUpdated(animationState_); + Q_EMIT self_->AnimationStateUpdated(animationState_); } } @@ -276,7 +276,7 @@ void TimelineManager::Impl::Play() if (animationState_ != types::AnimationState::Play) { animationState_ = types::AnimationState::Play; - emit self_->AnimationStateUpdated(animationState_); + Q_EMIT self_->AnimationStateUpdated(animationState_); } { @@ -366,9 +366,9 @@ void TimelineManager::Impl::SelectTime( logger_->debug("Time updated: Live"); - emit self_->LiveStateUpdated(true); - emit self_->VolumeTimeUpdated(selectedTime); - emit self_->SelectedTimeUpdated(selectedTime); + Q_EMIT self_->LiveStateUpdated(true); + Q_EMIT self_->VolumeTimeUpdated(selectedTime); + Q_EMIT self_->SelectedTimeUpdated(selectedTime); return; } @@ -393,7 +393,7 @@ void TimelineManager::Impl::SelectTime( util::GetBoundedElementPointer(volumeTimes, selectedTime); // The timeline is no longer live - emit self_->LiveStateUpdated(false); + Q_EMIT self_->LiveStateUpdated(false); if (elementPtr != nullptr) { @@ -409,7 +409,7 @@ void TimelineManager::Impl::SelectTime( logger_->debug("Volume time updated: {}", scwx::util::TimeString(adjustedTime_)); - emit self_->VolumeTimeUpdated(adjustedTime_); + Q_EMIT self_->VolumeTimeUpdated(adjustedTime_); } } else @@ -423,7 +423,7 @@ void TimelineManager::Impl::SelectTime( scwx::util::TimeString(selectedTime)); selectedTime_ = selectedTime; - emit self_->SelectedTimeUpdated(selectedTime); + Q_EMIT self_->SelectedTimeUpdated(selectedTime); previousRadarSite_ = radarSite_; }); @@ -492,9 +492,9 @@ void TimelineManager::Impl::Step(Direction direction) logger_->debug("Volume time updated: {}", scwx::util::TimeString(adjustedTime_)); - emit self_->LiveStateUpdated(false); - emit self_->VolumeTimeUpdated(adjustedTime_); - emit self_->SelectedTimeUpdated(adjustedTime_); + Q_EMIT self_->LiveStateUpdated(false); + Q_EMIT self_->VolumeTimeUpdated(adjustedTime_); + Q_EMIT self_->SelectedTimeUpdated(adjustedTime_); } } else @@ -509,9 +509,9 @@ void TimelineManager::Impl::Step(Direction direction) logger_->debug("Volume time updated: {}", scwx::util::TimeString(adjustedTime_)); - emit self_->LiveStateUpdated(false); - emit self_->VolumeTimeUpdated(adjustedTime_); - emit self_->SelectedTimeUpdated(adjustedTime_); + Q_EMIT self_->LiveStateUpdated(false); + Q_EMIT self_->VolumeTimeUpdated(adjustedTime_); + Q_EMIT self_->SelectedTimeUpdated(adjustedTime_); } } }); diff --git a/scwx-qt/source/scwx/qt/manager/update_manager.cpp b/scwx-qt/source/scwx/qt/manager/update_manager.cpp index f6eba5ef..213354ec 100644 --- a/scwx-qt/source/scwx/qt/manager/update_manager.cpp +++ b/scwx-qt/source/scwx/qt/manager/update_manager.cpp @@ -121,7 +121,7 @@ bool UpdateManager::CheckForUpdates(const std::string& currentVersion) p->latestRelease_ = *latestRelease; p->latestVersion_ = latestVersion; newRelease = true; - emit UpdateAvailable(latestVersion, *latestRelease); + Q_EMIT UpdateAvailable(latestVersion, *latestRelease); } } diff --git a/scwx-qt/source/scwx/qt/map/alert_layer.cpp b/scwx-qt/source/scwx/qt/map/alert_layer.cpp index ba71da8e..02740b02 100644 --- a/scwx-qt/source/scwx/qt/map/alert_layer.cpp +++ b/scwx-qt/source/scwx/qt/map/alert_layer.cpp @@ -278,7 +278,7 @@ void AlertLayerHandler::HandleAlert(const types::TextEventKey& key, for (auto& alert : alertsUpdated) { // Emit signal for each updated alert type - emit AlertsUpdated(alert.first, alert.second); + Q_EMIT AlertsUpdated(alert.first, alert.second); } } @@ -326,7 +326,7 @@ void AlertLayerHandler::UpdateAlerts() for (auto& alert : alertsUpdated) { // Emit signal for each updated alert type - emit AlertsUpdated(alert.first, alert.second); + Q_EMIT AlertsUpdated(alert.first, alert.second); } using namespace std::chrono; diff --git a/scwx-qt/source/scwx/qt/map/map_widget.cpp b/scwx-qt/source/scwx/qt/map/map_widget.cpp index c3aeebc7..a91b9c7d 100644 --- a/scwx-qt/source/scwx/qt/map/map_widget.cpp +++ b/scwx-qt/source/scwx/qt/map/map_widget.cpp @@ -493,7 +493,7 @@ void MapWidget::SelectRadarSite(std::shared_ptr radarSite, // TODO: Disable refresh from old site - emit RadarSiteUpdated(radarSite); + Q_EMIT RadarSiteUpdated(radarSite); } } @@ -629,7 +629,7 @@ void MapWidget::changeStyle() p->currentStyleIndex_ = 0; } - emit MapStyleChanged(p->currentStyle_->name_); + Q_EMIT MapStyleChanged(p->currentStyle_->name_); } void MapWidget::AddLayers() @@ -820,11 +820,11 @@ void MapWidget::initializeGL() p->map_->setCoordinateZoom({radarSite->latitude(), radarSite->longitude()}, 7); p->UpdateStoredMapParameters(); - emit MapParametersChanged(p->prevLatitude_, - p->prevLongitude_, - p->prevZoom_, - p->prevBearing_, - p->prevPitch_); + Q_EMIT MapParametersChanged(p->prevLatitude_, + p->prevLongitude_, + p->prevZoom_, + p->prevBearing_, + p->prevPitch_); // Update style changeStyle(); @@ -881,7 +881,7 @@ void MapWidgetImpl::RadarProductManagerConnect() connect(radarProductManager_.get(), &manager::RadarProductManager::Level3ProductsChanged, this, - [this]() { emit widget_->Level3ProductsChanged(); }); + [this]() { Q_EMIT widget_->Level3ProductsChanged(); }); connect( radarProductManager_.get(), @@ -1007,7 +1007,7 @@ void MapWidgetImpl::RadarProductViewConnect() radarProductView->range(), {radarSite->latitude(), radarSite->longitude()}); widget_->update(); - emit widget_->RadarSweepUpdated(); + Q_EMIT widget_->RadarSweepUpdated(); }, Qt::QueuedConnection); } @@ -1055,7 +1055,7 @@ void MapWidgetImpl::Update() if (UpdateStoredMapParameters()) { - emit widget_->MapParametersChanged( + Q_EMIT widget_->MapParametersChanged( prevLatitude_, prevLongitude_, prevZoom_, prevBearing_, prevPitch_); } } diff --git a/scwx-qt/source/scwx/qt/model/alert_model.cpp b/scwx-qt/source/scwx/qt/model/alert_model.cpp index 793d67b4..4cadff42 100644 --- a/scwx-qt/source/scwx/qt/model/alert_model.cpp +++ b/scwx-qt/source/scwx/qt/model/alert_model.cpp @@ -321,7 +321,7 @@ void AlertModel::HandleAlert(const types::TextEventKey& alertKey, QModelIndex topLeft = createIndex(row, kFirstColumn); QModelIndex bottomRight = createIndex(row, kLastColumn); - emit dataChanged(topLeft, bottomRight); + Q_EMIT dataChanged(topLeft, bottomRight); } } @@ -352,7 +352,7 @@ void AlertModel::HandleMapUpdate(double latitude, double longitude) QModelIndex bottomRight = createIndex(rowCount() - 1, static_cast(Column::Distance)); - emit dataChanged(topLeft, bottomRight); + Q_EMIT dataChanged(topLeft, bottomRight); } AlertModelImpl::AlertModelImpl() : diff --git a/scwx-qt/source/scwx/qt/model/radar_site_model.cpp b/scwx-qt/source/scwx/qt/model/radar_site_model.cpp index 1993c75a..ffca3638 100644 --- a/scwx-qt/source/scwx/qt/model/radar_site_model.cpp +++ b/scwx-qt/source/scwx/qt/model/radar_site_model.cpp @@ -178,7 +178,7 @@ void RadarSiteModel::HandleMapUpdate(double latitude, double longitude) QModelIndex topLeft = createIndex(0, kColumnDistance); QModelIndex bottomRight = createIndex(rowCount() - 1, kColumnDistance); - emit dataChanged(topLeft, bottomRight); + Q_EMIT dataChanged(topLeft, bottomRight); } RadarSiteModelImpl::RadarSiteModelImpl() : diff --git a/scwx-qt/source/scwx/qt/model/tree_model.cpp b/scwx-qt/source/scwx/qt/model/tree_model.cpp index af8998ad..fd2fedd0 100644 --- a/scwx-qt/source/scwx/qt/model/tree_model.cpp +++ b/scwx-qt/source/scwx/qt/model/tree_model.cpp @@ -178,7 +178,7 @@ bool TreeModel::setData(const QModelIndex& index, if (result) { - emit dataChanged(index, index); + Q_EMIT dataChanged(index, index); } return result; diff --git a/scwx-qt/source/scwx/qt/ui/alert_dialog.cpp b/scwx-qt/source/scwx/qt/ui/alert_dialog.cpp index 394ca314..76aa284a 100644 --- a/scwx-qt/source/scwx/qt/ui/alert_dialog.cpp +++ b/scwx-qt/source/scwx/qt/ui/alert_dialog.cpp @@ -87,7 +87,7 @@ void AlertDialogImpl::ConnectSignals() this, [this]() { - emit self_->MoveMap(centroid_.latitude_, centroid_.longitude_); + Q_EMIT self_->MoveMap(centroid_.latitude_, centroid_.longitude_); self_->close(); }); } diff --git a/scwx-qt/source/scwx/qt/ui/alert_dock_widget.cpp b/scwx-qt/source/scwx/qt/ui/alert_dock_widget.cpp index f8da6d6e..5efca78a 100644 --- a/scwx-qt/source/scwx/qt/ui/alert_dock_widget.cpp +++ b/scwx-qt/source/scwx/qt/ui/alert_dock_widget.cpp @@ -184,8 +184,8 @@ void AlertDockWidgetImpl::ConnectSignals() { case types::AlertAction::Go: // Move map - emit self_->MoveMap(selectedAlertCentroid_.latitude_, - selectedAlertCentroid_.longitude_); + Q_EMIT self_->MoveMap(selectedAlertCentroid_.latitude_, + selectedAlertCentroid_.longitude_); break; case types::AlertAction::View: @@ -214,8 +214,8 @@ void AlertDockWidgetImpl::ConnectSignals() this, [this]() { - emit self_->MoveMap(selectedAlertCentroid_.latitude_, - selectedAlertCentroid_.longitude_); + Q_EMIT self_->MoveMap(selectedAlertCentroid_.latitude_, + selectedAlertCentroid_.longitude_); }); connect( alertDialog_, &AlertDialog::MoveMap, self_, &AlertDockWidget::MoveMap); diff --git a/scwx-qt/source/scwx/qt/ui/animation_dock_widget.cpp b/scwx-qt/source/scwx/qt/ui/animation_dock_widget.cpp index f503c8bf..4714b2e3 100644 --- a/scwx-qt/source/scwx/qt/ui/animation_dock_widget.cpp +++ b/scwx-qt/source/scwx/qt/ui/animation_dock_widget.cpp @@ -108,7 +108,7 @@ void AnimationDockWidgetImpl::ConnectSignals() { if (checked) { - emit self_->ViewTypeChanged(types::MapTime::Live); + Q_EMIT self_->ViewTypeChanged(types::MapTime::Live); } }); QObject::connect(self_->ui->archiveViewRadioButton, @@ -118,7 +118,8 @@ void AnimationDockWidgetImpl::ConnectSignals() { if (checked) { - emit self_->ViewTypeChanged(types::MapTime::Archive); + Q_EMIT self_->ViewTypeChanged( + types::MapTime::Archive); } }); @@ -132,7 +133,7 @@ void AnimationDockWidgetImpl::ConnectSignals() if (date.isValid()) { selectedDate_ = util::SysDays(date); - emit self_->DateTimeChanged(selectedDate_ + selectedTime_); + Q_EMIT self_->DateTimeChanged(selectedDate_ + selectedTime_); } }); QObject::connect( @@ -145,7 +146,7 @@ void AnimationDockWidgetImpl::ConnectSignals() { selectedTime_ = std::chrono::seconds(time.msecsSinceStartOfDay() / 1000); - emit self_->DateTimeChanged(selectedDate_ + selectedTime_); + Q_EMIT self_->DateTimeChanged(selectedDate_ + selectedTime_); } }); @@ -153,34 +154,35 @@ void AnimationDockWidgetImpl::ConnectSignals() QObject::connect(self_->ui->loopTimeSpinBox, &QSpinBox::valueChanged, self_, - [this](int i) - { emit self_->LoopTimeChanged(std::chrono::minutes(i)); }); + [this](int i) { + Q_EMIT self_->LoopTimeChanged(std::chrono::minutes(i)); + }); QObject::connect(self_->ui->loopSpeedSpinBox, &QDoubleSpinBox::valueChanged, self_, - [this](double d) { emit self_->LoopSpeedChanged(d); }); + [this](double d) { Q_EMIT self_->LoopSpeedChanged(d); }); // Animation controls QObject::connect(self_->ui->beginButton, &QAbstractButton::clicked, self_, - [this]() { emit self_->AnimationStepBeginSelected(); }); + [this]() { Q_EMIT self_->AnimationStepBeginSelected(); }); QObject::connect(self_->ui->stepBackButton, &QAbstractButton::clicked, self_, - [this]() { emit self_->AnimationStepBackSelected(); }); + [this]() { Q_EMIT self_->AnimationStepBackSelected(); }); QObject::connect(self_->ui->playButton, &QAbstractButton::clicked, self_, - [this]() { emit self_->AnimationPlaySelected(); }); + [this]() { Q_EMIT self_->AnimationPlaySelected(); }); QObject::connect(self_->ui->stepNextButton, &QAbstractButton::clicked, self_, - [this]() { emit self_->AnimationStepNextSelected(); }); + [this]() { Q_EMIT self_->AnimationStepNextSelected(); }); QObject::connect(self_->ui->endButton, &QAbstractButton::clicked, self_, - [this]() { emit self_->AnimationStepEndSelected(); }); + [this]() { Q_EMIT self_->AnimationStepEndSelected(); }); } void AnimationDockWidget::UpdateAnimationState(types::AnimationState state) diff --git a/scwx-qt/source/scwx/qt/ui/level2_products_widget.cpp b/scwx-qt/source/scwx/qt/ui/level2_products_widget.cpp index 163c3907..e0677941 100644 --- a/scwx-qt/source/scwx/qt/ui/level2_products_widget.cpp +++ b/scwx-qt/source/scwx/qt/ui/level2_products_widget.cpp @@ -96,7 +96,7 @@ void Level2ProductsWidgetImpl::SelectProduct(common::Level2Product product) { UpdateProductSelection(product); - emit self_->RadarProductSelected( + Q_EMIT self_->RadarProductSelected( common::RadarProductGroup::Level2, common::GetLevel2Name(product), 0); } diff --git a/scwx-qt/source/scwx/qt/ui/level2_settings_widget.cpp b/scwx-qt/source/scwx/qt/ui/level2_settings_widget.cpp index 9129995d..f33586f8 100644 --- a/scwx-qt/source/scwx/qt/ui/level2_settings_widget.cpp +++ b/scwx-qt/source/scwx/qt/ui/level2_settings_widget.cpp @@ -126,7 +126,7 @@ void Level2SettingsWidgetImpl::SelectElevation(float elevation) { self_->UpdateElevationSelection(elevation); - emit self_->ElevationSelected(elevation); + Q_EMIT self_->ElevationSelected(elevation); } void Level2SettingsWidget::UpdateElevationSelection(float elevation) diff --git a/scwx-qt/source/scwx/qt/ui/level3_products_widget.cpp b/scwx-qt/source/scwx/qt/ui/level3_products_widget.cpp index 82219b9a..40ba6c56 100644 --- a/scwx-qt/source/scwx/qt/ui/level3_products_widget.cpp +++ b/scwx-qt/source/scwx/qt/ui/level3_products_widget.cpp @@ -87,7 +87,7 @@ public: self_->UpdateProductSelection( common::RadarProductGroup::Level3, awipsProductName); - emit self_->RadarProductSelected( + Q_EMIT self_->RadarProductSelected( common::RadarProductGroup::Level3, awipsProductName, 0); }); } @@ -164,7 +164,7 @@ void Level3ProductsWidgetImpl::SelectProductCategory( { UpdateCategorySelection(category); - emit self_->RadarProductSelected( + Q_EMIT self_->RadarProductSelected( common::RadarProductGroup::Level3, common::GetLevel3CategoryDefaultProduct(category), 0); diff --git a/scwx-qt/source/scwx/qt/ui/radar_site_dialog.cpp b/scwx-qt/source/scwx/qt/ui/radar_site_dialog.cpp index 44f1e9fc..c7275b06 100644 --- a/scwx-qt/source/scwx/qt/ui/radar_site_dialog.cpp +++ b/scwx-qt/source/scwx/qt/ui/radar_site_dialog.cpp @@ -72,7 +72,7 @@ RadarSiteDialog::RadarSiteDialog(QWidget* parent) : connect(ui->radarSiteView, &QTreeView::doubleClicked, this, - [this]() { emit accept(); }); + [this]() { Q_EMIT accept(); }); connect( ui->radarSiteView->selectionModel(), &QItemSelectionModel::selectionChanged, diff --git a/scwx-qt/source/scwx/qt/ui/settings_dialog.cpp b/scwx-qt/source/scwx/qt/ui/settings_dialog.cpp index 27b49c22..ee962794 100644 --- a/scwx-qt/source/scwx/qt/ui/settings_dialog.cpp +++ b/scwx-qt/source/scwx/qt/ui/settings_dialog.cpp @@ -494,7 +494,7 @@ void SettingsDialogImpl::SetupPalettesColorTablesTab() lineEdit->setText(path); // setText does not emit the textEdited signal - emit lineEdit->textEdited(path); + Q_EMIT lineEdit->textEdited(path); }); dialog->open(); @@ -707,7 +707,7 @@ void SettingsDialogImpl::ShowColorDialog(QLineEdit* lineEdit, QFrame* frame) lineEdit->setText(colorName); // setText does not emit the textEdited signal - emit lineEdit->textEdited(colorName); + Q_EMIT lineEdit->textEdited(colorName); }); dialog->open(); diff --git a/scwx-qt/source/scwx/qt/view/level2_product_view.cpp b/scwx-qt/source/scwx/qt/view/level2_product_view.cpp index 9abfd829..dfc86f13 100644 --- a/scwx-qt/source/scwx/qt/view/level2_product_view.cpp +++ b/scwx-qt/source/scwx/qt/view/level2_product_view.cpp @@ -391,7 +391,7 @@ void Level2ProductView::UpdateColorTable() p->savedOffset_ = offset; p->savedScale_ = scale; - emit ColorTableUpdated(); + Q_EMIT ColorTableUpdated(); } void Level2ProductView::ComputeSweep() @@ -689,7 +689,7 @@ void Level2ProductView::ComputeSweep() UpdateColorTable(); - emit SweepComputed(); + Q_EMIT SweepComputed(); } void Level2ProductViewImpl::ComputeCoordinates( diff --git a/scwx-qt/source/scwx/qt/view/level3_product_view.cpp b/scwx-qt/source/scwx/qt/view/level3_product_view.cpp index 5924ce35..6bd8e740 100644 --- a/scwx-qt/source/scwx/qt/view/level3_product_view.cpp +++ b/scwx-qt/source/scwx/qt/view/level3_product_view.cpp @@ -305,7 +305,7 @@ void Level3ProductView::UpdateColorTable() p->savedOffset_ = offset; p->savedScale_ = scale; - emit ColorTableUpdated(); + Q_EMIT ColorTableUpdated(); } } // namespace view diff --git a/scwx-qt/source/scwx/qt/view/level3_radial_view.cpp b/scwx-qt/source/scwx/qt/view/level3_radial_view.cpp index d60c76ad..ad87c7c4 100644 --- a/scwx-qt/source/scwx/qt/view/level3_radial_view.cpp +++ b/scwx-qt/source/scwx/qt/view/level3_radial_view.cpp @@ -406,7 +406,7 @@ void Level3RadialView::ComputeSweep() UpdateColorTable(); - emit SweepComputed(); + Q_EMIT SweepComputed(); } void Level3RadialViewImpl::ComputeCoordinates( diff --git a/scwx-qt/source/scwx/qt/view/level3_raster_view.cpp b/scwx-qt/source/scwx/qt/view/level3_raster_view.cpp index f5d36185..e3347689 100644 --- a/scwx-qt/source/scwx/qt/view/level3_raster_view.cpp +++ b/scwx-qt/source/scwx/qt/view/level3_raster_view.cpp @@ -335,7 +335,7 @@ void Level3RasterView::ComputeSweep() UpdateColorTable(); - emit SweepComputed(); + Q_EMIT SweepComputed(); } std::shared_ptr Level3RasterView::Create( diff --git a/scwx-qt/source/scwx/qt/view/radar_product_view.cpp b/scwx-qt/source/scwx/qt/view/radar_product_view.cpp index 2f4c6f23..634efed3 100644 --- a/scwx-qt/source/scwx/qt/view/radar_product_view.cpp +++ b/scwx-qt/source/scwx/qt/view/radar_product_view.cpp @@ -155,7 +155,7 @@ void RadarProductView::ComputeSweep() { logger_->debug("ComputeSweep()"); - emit SweepComputed(); + Q_EMIT SweepComputed(); } } // namespace view From a21377ce6c1ca34f45fce487514847dc2efc6e8c Mon Sep 17 00:00:00 2001 From: Dan Paulat Date: Mon, 5 Jun 2023 22:11:36 -0500 Subject: [PATCH 2/3] Add oneTBB to Linux build for PSTL --- conanfile.py | 33 +++++++++++++++++++++++++++++++++ conanfile.txt | 30 ------------------------------ wxdata/wxdata.cmake | 7 ++++++- 3 files changed, 39 insertions(+), 31 deletions(-) create mode 100644 conanfile.py delete mode 100644 conanfile.txt diff --git a/conanfile.py b/conanfile.py new file mode 100644 index 00000000..c6fe1dc1 --- /dev/null +++ b/conanfile.py @@ -0,0 +1,33 @@ +from conans import ConanFile + +class SupercellWxConan(ConanFile): + settings = ("os", "compiler", "build_type", "arch") + requires = ("boost/1.81.0", + "cpr/1.9.3", + "freetype/2.12.1", + "geographiclib/1.52", + "glew/2.2.0", + "glm/cci.20220420", + "gtest/cci.20210126", + "libcurl/7.86.0", + "libxml2/2.10.3", + "openssl/3.1.0", + "spdlog/1.11.0", + "sqlite3/3.40.1", + "vulkan-loader/1.3.236.0", + "zlib/1.2.13") + generators = ("cmake", + "cmake_find_package", + "cmake_paths") + default_options = {"libiconv:shared" : True, + "openssl:no_module": True, + "openssl:shared" : True} + + def requirements(self): + if self.settings.os == "Linux": + self.requires("onetbb/2021.9.0") + + def imports(self): + self.copy("*.dll", dst="bin", src="bin") + self.copy("*.dylib", dst="bin", src="lib") + self.copy("license*", dst="licenses", src=".", folder=True, ignore_case=True) diff --git a/conanfile.txt b/conanfile.txt deleted file mode 100644 index 95e79404..00000000 --- a/conanfile.txt +++ /dev/null @@ -1,30 +0,0 @@ -[requires] -boost/1.81.0 -cpr/1.9.3 -freetype/2.12.1 -geographiclib/1.52 -glew/2.2.0 -glm/cci.20220420 -gtest/cci.20210126 -libcurl/7.86.0 -libxml2/2.10.3 -openssl/3.1.0 -spdlog/1.11.0 -sqlite3/3.40.1 -vulkan-loader/1.3.236.0 -zlib/1.2.13 - -[generators] -cmake -cmake_find_package -cmake_paths - -[options] -libiconv:shared=True -openssl:no_module=True -openssl:shared=True - -[imports] -bin, *.dll -> ./bin -lib, *.dylib -> ./bin -., license* -> ./licenses @ folder=True, ignore_case=True diff --git a/wxdata/wxdata.cmake b/wxdata/wxdata.cmake index e2ee86f9..a61a1c8f 100644 --- a/wxdata/wxdata.cmake +++ b/wxdata/wxdata.cmake @@ -7,6 +7,10 @@ find_package(cpr) find_package(LibXml2) find_package(spdlog) +if (NOT MSVC) + find_package(TBB) +endif() + set(HDR_AWIPS include/scwx/awips/coded_location.hpp include/scwx/awips/coded_time_motion_location.hpp include/scwx/awips/message.hpp @@ -252,7 +256,8 @@ if (WIN32) endif() if (NOT MSVC) - target_link_libraries(wxdata PUBLIC date::date-tz) + target_link_libraries(wxdata PUBLIC date::date-tz + TBB::tbb) endif() set_target_properties(wxdata PROPERTIES CXX_STANDARD 20 From c29f335d9a311d44bc57846dc663aaf02de459df Mon Sep 17 00:00:00 2001 From: Dan Paulat Date: Mon, 5 Jun 2023 22:22:35 -0500 Subject: [PATCH 3/3] Save separate debug symbols on Linux --- .github/workflows/ci.yml | 27 +++++++++++++++++++++++++++ external/mapbox-gl-native.cmake | 3 +++ scwx-qt/scwx-qt.cmake | 3 +++ wxdata/wxdata.cmake | 2 ++ 4 files changed, 35 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3429ce50..55e18b1d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -125,6 +125,24 @@ jobs: -DCMAKE_BUILD_TYPE="${{ matrix.build_type }}" ` -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/supercell-wx" ninja supercell-wx wxtest + + - name: Separate Debug Symbols (Linux) + if: matrix.os == 'ubuntu-22.04' + shell: bash + run: | + cd build/ + cd bin/ + objcopy --only-keep-debug supercell-wx supercell-wx.debug + objcopy --strip-debug --strip-unneeded supercell-wx + cd .. + cd lib/ + objcopy --only-keep-debug libQMapLibreGL.so libQMapLibreGL.so.debug + objcopy --strip-debug --strip-unneeded libQMapLibreGL.so + + - name: Install Supercell Wx + shell: pwsh + run: | + cd build cmake --install . --component supercell-wx - name: Collect Artifacts @@ -162,6 +180,15 @@ jobs: name: supercell-wx-${{ matrix.artifact_suffix }} path: ${{ github.workspace }}/supercell-wx-${{ matrix.artifact_suffix }}.tar.gz + - name: Upload Debug Artifacts (Linux) + if: matrix.os == 'ubuntu-22.04' + uses: actions/upload-artifact@v3 + with: + name: supercell-wx-debug-${{ matrix.artifact_suffix }} + path: | + ${{ github.workspace }}/build/bin/*.debug + ${{ github.workspace }}/build/lib/*.debug + - name: Test Supercell Wx working-directory: ${{ github.workspace }}/build run: ctest -C ${{ matrix.build_type }} --exclude-regex mbgl-test-runner diff --git a/external/mapbox-gl-native.cmake b/external/mapbox-gl-native.cmake index 819dad6c..bbb169ce 100644 --- a/external/mapbox-gl-native.cmake +++ b/external/mapbox-gl-native.cmake @@ -17,6 +17,9 @@ if (MSVC) target_link_options(qmaplibregl PRIVATE "$<$:/DEBUG>") target_link_options(qmaplibregl PRIVATE "$<$:/OPT:REF>") target_link_options(qmaplibregl PRIVATE "$<$:/OPT:ICF>") +else() + target_compile_options(mbgl-core PRIVATE "$<$:-g>") + target_compile_options(qmaplibregl PRIVATE "$<$:-g>") endif() set(MBGL_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/mapbox-gl-native/include diff --git a/scwx-qt/scwx-qt.cmake b/scwx-qt/scwx-qt.cmake index 013f107e..4b32eeb3 100644 --- a/scwx-qt/scwx-qt.cmake +++ b/scwx-qt/scwx-qt.cmake @@ -401,6 +401,9 @@ if (MSVC) target_link_options(supercell-wx PRIVATE "$<$:/DEBUG>") target_link_options(supercell-wx PRIVATE "$<$:/OPT:REF>") target_link_options(supercell-wx PRIVATE "$<$:/OPT:ICF>") +else() + target_compile_options(scwx-qt PRIVATE "$<$:-g>") + target_compile_options(supercell-wx PRIVATE "$<$:-g>") endif() target_link_libraries(scwx-qt PUBLIC Qt${QT_VERSION_MAJOR}::Widgets diff --git a/wxdata/wxdata.cmake b/wxdata/wxdata.cmake index a61a1c8f..b6c4fb1c 100644 --- a/wxdata/wxdata.cmake +++ b/wxdata/wxdata.cmake @@ -240,6 +240,8 @@ target_compile_options(wxdata PRIVATE if (MSVC) # Produce PDB file for debug target_compile_options(wxdata PRIVATE "$<$:/Zi>") +else() + target_compile_options(wxdata PRIVATE "$<$:-g>") endif() target_link_libraries(wxdata PUBLIC aws-cpp-sdk-core