Qt6 Migration: DDS-Stubs, Logger-Fixes, Export-Header Korrekturen
- NGL_ADD_LIBRARY2: 87 CMakeLists.txt konvertiert für Export-Header Generierung - 44 Export-Header Include-Pfade korrigiert (_export.h) - 81 DDS-Stub-Header generiert (*_dtc.h, *_fts.h, *_dts.h, *_ftc.h) - INGLLogger: Duplikat gelöscht, m_logger Member entfernt, variadische Makros - Q_FUNC_INFO Redefinition behoben (Qt6 definiert bereits) - FATAL_LOG Makro hinzugefügt - InfrastructureManagement DDS-Stubs (ism.hpp, ism_enums.hpp, ism_ftc.h) - FilterManagement DDS-Stubs (flt_ftc.h, flt_dts.h) - AreaEffectSimulation DDS-Stubs (aes.hpp, aes_enums.hpp) - SymbolAppearance Klasse vollständig definiert mit content() Methode - BuildingComponentFilter Klasse definiert mit Copy-Konstruktor - Ftc Factory: nullptr Return (abstract class) - AesFilter Klasse in aes.hpp hinzugefügt - Dtc Klasse in ppm.hpp mit participantChanged Signal - AesType Enum: alle 15 At* Werte definiert - AesEffectState_def: EsReceived hinzugefügt - DataModification Enum: eAdded/eModified/eRemoved - function_reply_object.h → core_types.h Include-Pfad (72 Dateien) - Enum-Class-Streaming Template-Operator in INGLLogger.h - ism_mounting_point.h: QImage → QtGui/QImage, QGuiApplication/QScreen - ism_data_plugin_interface.h: QSet Include, Include-Reihenfolge - QRegExp → QRegularExpression in tpm_js_parser.cpp - .underlying() Aufrufe zu direktem Enum-Vergleich korrigiert - Include-Pfade: aes.hpp in symbol_appearance_settings_impl.h und aes_display_filter_impl.h Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2785 files changed
+18754
-18316
No files matched your search
+14
-15
@@ -45,7 +45,6 @@ SituationReplayEditor::SituationReplayEditor(
|
||||
, m_markerModel(markerModel)
|
||||
, m_applyFilter(applyFilter)
|
||||
, m_ui(new Ui::SituationReplayEditor)
|
||||
, m_logger(getLogger("SituationReplayEditor"))
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
m_ui->lblDuration->setText(QStringLiteral(" - "));
|
||||
@@ -113,12 +112,12 @@ SituationReplayEditor::SituationReplayEditor(
|
||||
|
||||
if ((*m_essentialsViewsSrpIfc) != nullptr)
|
||||
{
|
||||
WARNING_LOG(m_logger) << "essentials view available - using srp replay control widget as editor!";
|
||||
WARNING_LOG() << "essentials view available - using srp replay control widget as editor!";
|
||||
onAddReplayControlWidget();
|
||||
}
|
||||
else
|
||||
{
|
||||
WARNING_LOG(m_logger) << "essentials view not available - using traditional editor";
|
||||
WARNING_LOG() << "essentials view not available - using traditional editor";
|
||||
}
|
||||
|
||||
setOnlineHelpFilename(QStringLiteral("Script_Editor-Add_Situation_Replay_Topic"));
|
||||
@@ -134,7 +133,7 @@ SituationReplayEditor::~SituationReplayEditor()
|
||||
|
||||
void SituationReplayEditor::updateInternalData()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION;
|
||||
DEBUG_LOG() << Q_FUNC_INFO;
|
||||
|
||||
if (m_firstUpdate)
|
||||
{
|
||||
@@ -182,7 +181,7 @@ void SituationReplayEditor::updateInternalData()
|
||||
|
||||
void SituationReplayEditor::updateInternalLength()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION;
|
||||
DEBUG_LOG() << Q_FUNC_INFO;
|
||||
qint64 end = calculateEnd(m_ui->dteStartTime->msecsSinceEpoch(), m_topicData.duration, m_ui->sbSpeed->value(), true);
|
||||
bool hasChanges = hasUnsavedChanges();
|
||||
m_ui->dteEndTime->setMsecsSinceEpoch(end);
|
||||
@@ -227,19 +226,19 @@ qint64 SituationReplayEditor::calculateEnd(qint64 startTime, int lengthInSeconds
|
||||
else
|
||||
result /= speed;
|
||||
result += startTime;
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " result = " << result;
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " result = " << result;
|
||||
return result;
|
||||
}
|
||||
|
||||
qint64 SituationReplayEditor::calculateDuration(qint64 startTime, qint64 endTime, double speed)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " startTime=" << startTime << " endTime=" << endTime << " speed=" << speed;
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " startTime=" << startTime << " endTime=" << endTime << " speed=" << speed;
|
||||
qint64 duration = endTime - startTime;
|
||||
double result = duration;
|
||||
result /= speed;
|
||||
qint64 result2 = result;
|
||||
result2 += 500;
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " result = " << result2;
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " result = " << result2;
|
||||
return result2;
|
||||
}
|
||||
|
||||
@@ -257,7 +256,7 @@ void SituationReplayEditor::setMapSettings(const QByteArray &mapSettings)
|
||||
|
||||
if (parseError.error != QJsonParseError::NoError)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "map settings not valid json at" << parseError.errorString();
|
||||
ERROR_LOG() << "map settings not valid json at" << parseError.errorString();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -272,7 +271,7 @@ void SituationReplayEditor::setMapFilter(const QByteArray &mapFilter)
|
||||
|
||||
if (parseError.error != QJsonParseError::NoError)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "filter settings not valid json at" << parseError.errorString();
|
||||
ERROR_LOG() << "filter settings not valid json at" << parseError.errorString();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -346,7 +345,7 @@ bool SituationReplayEditor::apply2()
|
||||
m_ui->lblDuration->setText(QStringLiteral(" - "));
|
||||
else
|
||||
{
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " setText length = " << duration;
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " setText length = " << duration;
|
||||
m_ui->lblDuration->setText(tr("%1 sec").arg(m_topicDuration));
|
||||
}
|
||||
}
|
||||
@@ -464,7 +463,7 @@ void SituationReplayEditor::onMarkerSelected(const QModelIndex &idx)
|
||||
|
||||
if (marker.id() <= 0)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "marker has id 0";
|
||||
ERROR_LOG() << "marker has id 0";
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -478,13 +477,13 @@ void SituationReplayEditor::onMarkerSelected(const QModelIndex &idx)
|
||||
|
||||
void SituationReplayEditor::onChangesMade()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION;
|
||||
DEBUG_LOG() << Q_FUNC_INFO;
|
||||
|
||||
qint64 start = m_ui->dteStartTime->msecsSinceEpoch();
|
||||
qint64 end = m_ui->dteEndTime->msecsSinceEpoch();
|
||||
double speed = m_ui->sbSpeed->value();
|
||||
qint64 duration = calculateDuration(start, end, speed) / 1000;
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " duration = " << duration;
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " duration = " << duration;
|
||||
|
||||
if (duration < 0)
|
||||
m_ui->lblDuration->setText(QStringLiteral(" - "));
|
||||
@@ -494,7 +493,7 @@ void SituationReplayEditor::onChangesMade()
|
||||
m_topicData.duration = duration;
|
||||
m_ui->widget->previewer()->setTopicData(m_topicData);
|
||||
m_ui->lblDuration->setText(tr("%1 sec").arg(m_topicDuration));
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " setText duration = " << duration;
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " setText duration = " << duration;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
-2
@@ -81,8 +81,6 @@ private:
|
||||
bool m_firstUpdate{true};
|
||||
|
||||
Ui::SituationReplayEditor *m_ui{nullptr};
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
-1
@@ -11,7 +11,6 @@ namespace SituationReplay
|
||||
|
||||
SituationReplayControlDialog::SituationReplayControlDialog(SituationReplayControlWidget *replayWidget, QWidget *parent)
|
||||
: LtsWidgets::LtsDialog(parent, LtsWidgets::ButtonCombination::CloseOnly)
|
||||
, m_logger(getLogger("ReplayControlDialog"))
|
||||
{
|
||||
auto l = new QHBoxLayout;
|
||||
setLayout(l);
|
||||
|
||||
-2
@@ -19,7 +19,5 @@ public:
|
||||
|
||||
private:
|
||||
void retranslate() override;
|
||||
|
||||
LOGGER_T m_logger;
|
||||
};
|
||||
}
|
||||
+25
-26
@@ -36,7 +36,6 @@ SituationReplayControlWidget::SituationReplayControlWidget(QWidget *parent)
|
||||
, m_state(SrpState::Unknown)
|
||||
, m_toggleStartPauseButton(true)
|
||||
, m_speedValueChangedTimer(new QTimer(this))
|
||||
, m_logger(getLogger("SituationReplayControlWidget"))
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
m_ui->pbStart->setHidden(m_toggleStartPauseButton);
|
||||
@@ -117,7 +116,7 @@ bool SituationReplayControlWidget::init(LtsSession::LtsSession *session,
|
||||
|
||||
if (!m_session->getDtc<ExerciseManagement::DataInterface>(m_exmDtc))
|
||||
{
|
||||
ERROR_LOG(m_logger)<<" couldn't init exmDtc!";
|
||||
ERROR_LOG()<<" couldn't init exmDtc!";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -141,7 +140,7 @@ bool SituationReplayControlWidget::init(LtsSession::LtsSession *session,
|
||||
{
|
||||
m_state = replay.state();
|
||||
m_id = replay.id();
|
||||
DEBUG_LOG(m_logger) << "recycling replay with id" << m_id;
|
||||
DEBUG_LOG() << "recycling replay with id" << m_id;
|
||||
m_ui->dteStartTime->setMsecsSinceEpoch(replay.beginTime());
|
||||
useExistingReplay = true;
|
||||
break;
|
||||
@@ -221,19 +220,19 @@ bool SituationReplayControlWidget::init(LtsSession::LtsSession *session,
|
||||
|
||||
if (beginTime > 0)
|
||||
{
|
||||
WARNING_LOG(m_logger) << "no exc start time set, using exc begin time " << beginTime;
|
||||
WARNING_LOG() << "no exc start time set, using exc begin time " << beginTime;
|
||||
m_ui->dteStartTime->setMsecsSinceEpoch(beginTime);
|
||||
}
|
||||
else
|
||||
{
|
||||
WARNING_LOG(m_logger) << "no valid exc for getting exercise start time";
|
||||
WARNING_LOG() << "no valid exc for getting exercise start time";
|
||||
m_ui->dteStartTime->setMsecsSinceEpoch(QDateTime::currentDateTime().addDays(-5).toMSecsSinceEpoch());
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
WARNING_LOG(m_logger) << "no exc dtc for getting exercise start time";
|
||||
WARNING_LOG() << "no exc dtc for getting exercise start time";
|
||||
m_ui->dteStartTime->setMsecsSinceEpoch(QDateTime::currentDateTime().addDays(-5).toMSecsSinceEpoch());
|
||||
}
|
||||
}
|
||||
@@ -295,10 +294,10 @@ qint64 SituationReplayControlWidget::startTime() const
|
||||
|
||||
void SituationReplayControlWidget::setStartTime(qint64 startTime)
|
||||
{
|
||||
ERROR_LOG(m_logger) << LOGFUNCTION << " " << startTime;
|
||||
ERROR_LOG() << Q_FUNC_INFO << " " << startTime;
|
||||
if (startTime < 0)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " called with invalid start time: " << startTime;
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " called with invalid start time: " << startTime;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -362,7 +361,7 @@ void SituationReplayControlWidget::pauseReplay()
|
||||
|
||||
if (m_id == 0)
|
||||
{
|
||||
WARNING_LOG(m_logger) << "replay pause requested, but no replay active in this context";
|
||||
WARNING_LOG() << "replay pause requested, but no replay active in this context";
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -382,13 +381,13 @@ void SituationReplayControlWidget::pauseReplay()
|
||||
}))
|
||||
{
|
||||
enaDisa();
|
||||
ERROR_LOG(m_logger) << "pausing failed for replay " << m_id << ": " << m_requestHelper->getErrorString();
|
||||
ERROR_LOG() << "pausing failed for replay " << m_id << ": " << m_requestHelper->getErrorString();
|
||||
}
|
||||
else
|
||||
emit replayPaused();
|
||||
}
|
||||
else
|
||||
ERROR_LOG(m_logger) << "pause requested, but replay state was not resumed or started, but " << m_state << " for " << m_id;
|
||||
ERROR_LOG() << "pause requested, but replay state was not resumed or started, but " << m_state << " for " << m_id;
|
||||
}
|
||||
|
||||
|
||||
@@ -399,7 +398,7 @@ void SituationReplayControlWidget::stopReplay()
|
||||
|
||||
if (m_id == 0)
|
||||
{
|
||||
WARNING_LOG(m_logger) << "replay stop requested, but no replay active in this context";
|
||||
WARNING_LOG() << "replay stop requested, but no replay active in this context";
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -425,7 +424,7 @@ void SituationReplayControlWidget::stopReplay()
|
||||
else
|
||||
{
|
||||
enaDisa();
|
||||
ERROR_LOG(m_logger) << "stopping failed for replay " << m_id << ": " << m_requestHelper->getErrorString();
|
||||
ERROR_LOG() << "stopping failed for replay " << m_id << ": " << m_requestHelper->getErrorString();
|
||||
}
|
||||
|
||||
m_requestHelper->setQuiet(wasQuiet);
|
||||
@@ -454,14 +453,14 @@ void SituationReplayControlWidget::resumeReplay()
|
||||
}))
|
||||
{
|
||||
enaDisa();
|
||||
ERROR_LOG(m_logger) << "resuming failed for replay " << m_id << ": " << m_requestHelper->getErrorString();
|
||||
ERROR_LOG() << "resuming failed for replay " << m_id << ": " << m_requestHelper->getErrorString();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void SituationReplayControlWidget::onSitReplayChanged(const SitReplay &data, DataModification modType)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "onSitReplayChanged: id = " << data.id() << ", exId = " << data.exerciseId() << ", repPartitionId = " << data.replayPartitionId()
|
||||
DEBUG_LOG() << "onSitReplayChanged: id = " << data.id() << ", exId = " << data.exerciseId() << ", repPartitionId = " << data.replayPartitionId()
|
||||
<< ", state = " << (int)data.state().underlying() << ", m_partitionId = " << m_partitionId << ", modType = " << (int)modType;
|
||||
|
||||
if (m_partitionId != data.replayPartitionId())
|
||||
@@ -513,7 +512,7 @@ void SituationReplayControlWidget::onMarkerClicked(const QModelIndex &index)
|
||||
)
|
||||
appFilter = new MarkerManagement::MarkerManagementApplyFilter(m_session, fltParticipantIfc, fltAesIfc, fltBuildingComponentGuiIfc);
|
||||
else
|
||||
WARNING_LOG(m_logger) << "unable to set filters from marker as flt ifc`s are missing";
|
||||
WARNING_LOG() << "unable to set filters from marker as flt ifc`s are missing";
|
||||
|
||||
|
||||
|
||||
@@ -523,7 +522,7 @@ void SituationReplayControlWidget::onMarkerClicked(const QModelIndex &index)
|
||||
if (appFilter->applyFilter(mapFilter))
|
||||
emit signalSetMapFilter(mapFilter);
|
||||
else
|
||||
ERROR_LOG(m_logger) << "Error while setting filters";
|
||||
ERROR_LOG() << "Error while setting filters";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -546,20 +545,20 @@ void SituationReplayControlWidget::onMarkerClicked(const QModelIndex &index)
|
||||
if (appFilter)
|
||||
{
|
||||
QByteArray mapSettings(QByteArray::fromRawData(marker.mapSettings().c_str(), marker.mapSettings().size()));
|
||||
DEBUG_LOG(m_logger) << "set map settings from marker " << (mapSettings.toStdString());
|
||||
DEBUG_LOG() << "set map settings from marker " << (mapSettings.toStdString());
|
||||
|
||||
|
||||
|
||||
SituationMap::OperatorMapSettings oms;
|
||||
oms.fromJson(mapSettings);
|
||||
DEBUG_LOG(m_logger) << ">>>> oms.orderedLayers.size() " << oms.orderedLayers.size();
|
||||
DEBUG_LOG() << ">>>> oms.orderedLayers.size() " << oms.orderedLayers.size();
|
||||
|
||||
static const QLatin1String LayerNameEmergencyCall("EmergencyCall");
|
||||
|
||||
auto pos = std::remove_if( oms.orderedLayers.begin(),
|
||||
oms.orderedLayers.end(),
|
||||
[](const QPair<QString, SituationMap::LayerParameter> &pair) { return pair.first == LayerNameEmergencyCall; } );
|
||||
DEBUG_LOG(m_logger) << ">>>> remove iterator: " << pos << " END: " << oms.orderedLayers.end();
|
||||
DEBUG_LOG() << ">>>> remove iterator: " << pos << " END: " << oms.orderedLayers.end();
|
||||
if(pos != oms.orderedLayers.end())
|
||||
oms.orderedLayers.erase(pos);
|
||||
|
||||
@@ -570,7 +569,7 @@ void SituationReplayControlWidget::onMarkerClicked(const QModelIndex &index)
|
||||
if (appFilter->applyMapSettings(mapSettings))
|
||||
emit signalSetMapSettings(mapSettings);
|
||||
else
|
||||
ERROR_LOG(m_logger) << "Error while setting mapSettings";
|
||||
ERROR_LOG() << "Error while setting mapSettings";
|
||||
}
|
||||
delete appFilter;
|
||||
}
|
||||
@@ -635,7 +634,7 @@ bool SituationReplayControlWidget::startReplayDelayed(qint64 start, qint64 end,
|
||||
req.endTime(end);
|
||||
req.pace(speed);
|
||||
|
||||
ERROR_LOG(m_logger) << "Start Replay Partition: "
|
||||
ERROR_LOG() << "Start Replay Partition: "
|
||||
<< "id: " << m_id
|
||||
<< ", partition id: " << m_partitionId
|
||||
<< ", partition type: " << m_session->partitionType()
|
||||
@@ -653,15 +652,15 @@ bool SituationReplayControlWidget::startReplayDelayed(qint64 start, qint64 end,
|
||||
if (repliedId > 0)
|
||||
{
|
||||
m_id = repliedId;
|
||||
ERROR_LOG(m_logger) << "Replied replay id: " << repliedId;
|
||||
ERROR_LOG() << "Replied replay id: " << repliedId;
|
||||
emit replayStarted();
|
||||
return true;
|
||||
}
|
||||
|
||||
ERROR_LOG(m_logger) << "replay start didn't return a replay id!";
|
||||
ERROR_LOG() << "replay start didn't return a replay id!";
|
||||
}
|
||||
|
||||
ERROR_LOG(m_logger) << "could not start replay: " << m_requestHelper->getErrorString() << " (" << m_requestHelper->getRepliedId() << ")";
|
||||
ERROR_LOG() << "could not start replay: " << m_requestHelper->getErrorString() << " (" << m_requestHelper->getRepliedId() << ")";
|
||||
enaDisa();
|
||||
return false;
|
||||
}
|
||||
@@ -672,7 +671,7 @@ void SituationReplayControlWidget::onStartReplay()
|
||||
double speed = m_ui->slSpeed->value();
|
||||
speed /= 10;
|
||||
qint64 startInSecs = getSecs(m_ui->dteStartTime->msecsSinceEpoch());
|
||||
DEBUG_LOG(m_logger) << "onStartReplay startInSecs=" << startInSecs;
|
||||
DEBUG_LOG() << "onStartReplay startInSecs=" << startInSecs;
|
||||
m_ui->slPeriodSlider->setValue(startInSecs);
|
||||
|
||||
startReplay(m_ui->dteStartTime->msecsSinceEpoch(), 0 , speed);
|
||||
|
||||
-1
@@ -116,6 +116,5 @@ private:
|
||||
qint64 m_endTime;
|
||||
bool m_toggleStartPauseButton;
|
||||
QTimer *m_speedValueChangedTimer;
|
||||
LOGGER_T m_logger;
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user