Merge pull request 'fix Warning' (#3) from bugfix/fix-warning-issue into feature/qt6-migration-projects-app-tools-viewer-validation
Reviewed-on: #3
This commit was merged in pull request #3.
This commit is contained in:
commit
d8ec9e8d74
316 files changed
+1246
-929
No files matched your search
@@ -119,13 +119,9 @@ include_directories(${CMAKE_SOURCE_DIR}/include/SituationReplay)
|
||||
# like the services above. There is no include/Evaluations stub tree, so only the build dir
|
||||
# is added (same shape as FileManagement above, which has no stub tree either).
|
||||
include_directories(${CMAKE_BINARY_DIR}/Lts/Services/Evaluations)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/include/Buildings)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/Lts/Proxies/GuezNasat)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/Lts/DDS)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/Lts/DDS/QosProfile)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/include/DDS)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/include/DDS/Generic)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/include/TrainingAreaBaseOC)
|
||||
# Generated DDS headers (BUILD_RTI=ON)
|
||||
include_directories(${CMAKE_BINARY_DIR}/Lts)
|
||||
# <Core/core.hpp> consumers (LtsCoordinate, AES/CES, HLA proxies) resolve the
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
*/
|
||||
|
||||
#include "aar_application.h"
|
||||
#include <utility>
|
||||
#include "ui_aarApp.h"
|
||||
#include "databases_model.h"
|
||||
|
||||
@@ -44,7 +45,7 @@ AarApplication::AarApplication(QWidget *parent)
|
||||
|
||||
const QList<QScreen*> &screenList = QGuiApplication::screens();
|
||||
m_widgets.reserve(screenList.size());
|
||||
for (QScreen *s : qAsConst(screenList))
|
||||
for (QScreen *s : std::as_const(screenList))
|
||||
{
|
||||
QWidget *w = new QWidget(); // no parent
|
||||
w->setWindowFlags(Qt::Dialog | Qt::FramelessWindowHint);
|
||||
@@ -86,7 +87,7 @@ AarApplication::~AarApplication()
|
||||
delete m_databasesModel;
|
||||
delete m_progressDialog;
|
||||
|
||||
for (QSqlDatabase db : qAsConst(m_dbMap))
|
||||
for (QSqlDatabase db : std::as_const(m_dbMap))
|
||||
db.close();
|
||||
|
||||
m_dbPostgres.close();
|
||||
|
||||
@@ -46,8 +46,7 @@ int main(int argc, char *argv[])
|
||||
QCoreApplication::setApplicationName(QLatin1String("AarApplication"));
|
||||
QCoreApplication::setOrganizationName(QLatin1String("RME"));
|
||||
|
||||
if (!bHeadless)
|
||||
app->setAttribute(Qt::AA_UseHighDpiPixmaps);
|
||||
// Qt::AA_UseHighDpiPixmaps: no-op since Qt6 (high-DPI pixmaps are always enabled)
|
||||
|
||||
|
||||
NGL::LoggerHandler *lh = dynamic_cast<NGL::LoggerHandler*>(app.data());
|
||||
|
||||
@@ -449,9 +449,8 @@ QHash<QString, QUrl> ThpViewer::getCombinedPlaybackDetails(const QUrl &url) cons
|
||||
QDomDocument doc(QStringLiteral("RSS"));
|
||||
if (!file.open(QIODevice::ReadOnly))
|
||||
return hash;
|
||||
QString errorStr;
|
||||
int errorLine, errorColumn;
|
||||
if (!doc.setContent(&file, true, &errorStr, &errorLine, &errorColumn))
|
||||
const auto parseResult = doc.setContent(&file, QDomDocument::ParseOption::UseNamespaceProcessing);
|
||||
if (!parseResult)
|
||||
{
|
||||
file.close();
|
||||
return hash;
|
||||
|
||||
+2
-1
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "thp_situation_widget.h"
|
||||
#include <utility>
|
||||
#include "ui_thp_situation_building_base.h"
|
||||
|
||||
#include "thp_situation_filter_aes.h"
|
||||
@@ -384,7 +385,7 @@ bool SituationWidget::restoreOperatorMapSettingsOverlays(const SituationMap::Ope
|
||||
// So we have to do it here:
|
||||
const QList<int> &orderedOverlayIds = oms.orderedOverlays;
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " restore OverlayIds...";
|
||||
for (auto overlayId : qAsConst(orderedOverlayIds))
|
||||
for (auto overlayId : std::as_const(orderedOverlayIds))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " applyNewOverlay , overlayId=" << overlayId;
|
||||
applyNewOverlay(overlayId);
|
||||
|
||||
@@ -83,15 +83,12 @@ bool XmlReader::readServiceFile(const QString& svcFile, const QString& idlServic
|
||||
INFO_LOG(m_logger) << "SvcFile: " << svcFile;
|
||||
|
||||
QDomDocument doc;
|
||||
QString errorMsg;
|
||||
int errorLine = 0;
|
||||
int errorColumn = 0;
|
||||
auto parseResult = doc.setContent(&f, &errorMsg, &errorLine, &errorColumn);
|
||||
const auto parseResult = doc.setContent(&f);
|
||||
if (!parseResult)
|
||||
{
|
||||
m_errorString = QLatin1String("Error parsing service file '") + svcFile + QLatin1String("' at line ") +
|
||||
QString::number(errorLine) + QLatin1Char(':') +
|
||||
QString::number(errorColumn);
|
||||
QString::number(int(parseResult.errorLine)) + QLatin1Char(':') +
|
||||
QString::number(int(parseResult.errorColumn));
|
||||
ERROR_LOG(m_logger) << m_errorString;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ std::shared_ptr<Dtc> Dtc::create(const std::shared_ptr<DDSConnector::DdsConnecto
|
||||
auto ret = std::make_shared<DtcImpl>(ddsConnector);
|
||||
{% endif %}
|
||||
s_availableConnectors.insert(std::make_pair(ddsConnector.get(), ret));
|
||||
return std::move(ret); // c++11 defect
|
||||
return ret; // moved implicitly (C++17; explicit std::move on a local triggers -Wredundant-move)
|
||||
}
|
||||
|
||||
// DtcImpl
|
||||
|
||||
@@ -46,7 +46,7 @@ Q_DECL_EXPORT std::shared_ptr<Ftc> Ftc::create(const std::shared_ptr<DDSConnecto
|
||||
|
||||
auto ret = std::make_shared<FtcImpl>(ddsConnector);
|
||||
s_availableConnectors.insert(std::make_pair(ddsConnector.get(), ret));
|
||||
return std::move(ret); // c++11 defect
|
||||
return ret; // moved implicitly (C++17; explicit std::move on a local triggers -Wredundant-move)
|
||||
}
|
||||
|
||||
// FtcImpl
|
||||
|
||||
@@ -113,7 +113,7 @@ AppDescriptionVector LtsAppDescriptor::getAppDescriptionVector(const QByteArray&
|
||||
int column = 0;
|
||||
QChar x = QLatin1Char('\n');
|
||||
|
||||
for (int i = 0; i < jsonDocument.count(); i++)
|
||||
for (int i = 0; i < jsonDocument.size(); i++)
|
||||
{
|
||||
if (i == parseError.offset)
|
||||
break;
|
||||
|
||||
@@ -78,8 +78,8 @@ class LtsElevationManager::Private
|
||||
|
||||
LtsElevationManager::LtsElevationManager()
|
||||
: QObject(nullptr)
|
||||
, m_logger(getLogger("LtsElevationManager"))
|
||||
, d(new Private)
|
||||
, m_logger(getLogger("LtsElevationManager"))
|
||||
{
|
||||
++s_counter;
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START, s_counter=" << s_counter << " this=" << this;
|
||||
|
||||
@@ -20,15 +20,13 @@ QVector<Licence> readLicences(const QByteArray& unencryptedXmlData)
|
||||
QVector<Licence> licenceVec;
|
||||
|
||||
QDomDocument xmlDoc;
|
||||
QString errorMsg;
|
||||
int errorLine = 0;
|
||||
int errorColumn = 0;
|
||||
|
||||
if (!xmlDoc.setContent(unencryptedXmlData, &errorMsg, &errorLine, &errorColumn))
|
||||
const auto parseResult = xmlDoc.setContent(unencryptedXmlData);
|
||||
if (!parseResult)
|
||||
{
|
||||
ERROR_LOG(getLogger()) << "Error reading xml data, "
|
||||
<< "error in line " << errorLine << ", column " << errorColumn
|
||||
<< ", message: " << errorMsg;
|
||||
<< "error in line " << int(parseResult.errorLine) << ", column " << int(parseResult.errorColumn)
|
||||
<< ", message: " << parseResult.errorMessage;
|
||||
return licenceVec;
|
||||
}
|
||||
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
*/
|
||||
|
||||
#include "lts_plugin_loader.h"
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
|
||||
#include <NGLLogger/NGLLoggerBootstrap.h>
|
||||
#include <LtsAppDescriptor/lts_app_descriptor.h>
|
||||
@@ -56,7 +58,7 @@ LtsPluginLoader::~LtsPluginLoader()
|
||||
|
||||
void LtsPluginLoader::unloadAllPlugins()
|
||||
{
|
||||
for (auto &pi : qAsConst(m_loadedPlugins))
|
||||
for (auto &pi : std::as_const(m_loadedPlugins))
|
||||
{
|
||||
QPluginLoader *pluginLoader = pi.pluginLoader;
|
||||
|
||||
@@ -280,7 +282,7 @@ bool LtsPluginLoader::loadPlugins(PluginType requestedPluginType,
|
||||
// continue;
|
||||
// }
|
||||
|
||||
QScopedPointer<QPluginLoader> pluginLoader(new QPluginLoader);
|
||||
std::unique_ptr<QPluginLoader> pluginLoader(new QPluginLoader);
|
||||
pluginLoader->setFileName(absoluteFilePath);
|
||||
|
||||
const QJsonObject jObj = pluginLoader->metaData();
|
||||
@@ -433,7 +435,7 @@ bool LtsPluginLoader::loadPlugins(PluginType requestedPluginType,
|
||||
pi.fileName = filename;
|
||||
pi.fullFileName = absoluteFilePath;
|
||||
pi.plugin = plugin;
|
||||
pi.pluginLoader = pluginLoader.data();
|
||||
pi.pluginLoader = pluginLoader.get();
|
||||
|
||||
if (loadPlugin && !loadPlugin(pi)) // does the dev want this plugin? if no, unload it! TODO: really unload? or still cache it??
|
||||
{
|
||||
@@ -442,7 +444,7 @@ bool LtsPluginLoader::loadPlugins(PluginType requestedPluginType,
|
||||
pluginLoader->unload();
|
||||
continue; // next plugin
|
||||
}
|
||||
pi.pluginLoader = pluginLoader.take();
|
||||
pi.pluginLoader = pluginLoader.release();
|
||||
|
||||
// the dev decided to use that plugin, so cache it
|
||||
m_loadedPlugins.insert(PluginKey(requestedPluginType, pluginName), pi);
|
||||
|
||||
@@ -58,7 +58,7 @@ void DragHandler::dragLeaveEvent(QDragLeaveEvent* event)
|
||||
|
||||
void DragHandler::dropEvent(QDropEvent* event)
|
||||
{
|
||||
int dropPos = event->pos().x();
|
||||
int dropPos = event->position().toPoint().x();
|
||||
int dropTime = m_tcw->m_tools->getTime(dropPos, m_tcw->m_isFilter) - m_tcw->m_dragOffsetTime;
|
||||
|
||||
for (const auto& tcw : std::as_const(m_tcwCorresponding))
|
||||
@@ -80,7 +80,7 @@ void DragHandler::dropEvent(QDropEvent* event)
|
||||
|
||||
void DragHandler::dragMoveEvent(QDragMoveEvent* event)
|
||||
{
|
||||
int pos = event->pos().x();
|
||||
int pos = event->position().toPoint().x();
|
||||
|
||||
if (m_tcw->dragMove(pos))
|
||||
event->acceptProposedAction();
|
||||
@@ -101,7 +101,7 @@ void DragHandler::mouseMoveEvent(QMouseEvent* event)
|
||||
if (event->buttons() != Qt::LeftButton)
|
||||
return;
|
||||
|
||||
QPoint cursorPos = m_tcw->mapFromGlobal(event->globalPos());
|
||||
QPoint cursorPos = m_tcw->mapFromGlobal(event->globalPosition().toPoint());
|
||||
|
||||
if (!m_tcw->m_mainSelected || ((cursorPos - m_dragStartPos).manhattanLength() < QApplication::startDragDistance() &&
|
||||
(m_dragStartPos - cursorPos).manhattanLength() < QApplication::startDragDistance()))
|
||||
|
||||
@@ -37,7 +37,7 @@ void TrackHeader::mousePressEvent(QMouseEvent* event)
|
||||
return;
|
||||
if (!m_indicatorLock)
|
||||
{
|
||||
setIndicatorTime(m_tools->getTime(event->localPos().x()));
|
||||
setIndicatorTime(m_tools->getTime(event->position().toPoint().x()));
|
||||
emit signalHeaderIndicatorTimeUserChanged(m_indicatorTime);
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -19,7 +19,7 @@ void ResizeHandler::mousePressEvent(QMouseEvent* event)
|
||||
if (event->buttons() != Qt::LeftButton || !m_possible)
|
||||
return;
|
||||
|
||||
TrackEntry* te = m_trackContentWidget->getTrackEntryOnPos(event->globalPos());
|
||||
TrackEntry* te = m_trackContentWidget->getTrackEntryOnPos(event->globalPosition().toPoint());
|
||||
|
||||
if (te == nullptr)
|
||||
return;
|
||||
@@ -101,7 +101,7 @@ bool ResizeHandler::isCollision(int newLength) const
|
||||
|
||||
bool ResizeHandler::mouseMoveEvent(QMouseEvent* event)
|
||||
{
|
||||
QPoint pos = m_trackContentWidget->mapFromGlobal(event->globalPos());
|
||||
QPoint pos = m_trackContentWidget->mapFromGlobal(event->globalPosition().toPoint());
|
||||
int posX = pos.x();
|
||||
int cursorTime = m_trackContentWidget->m_tools->getTime(posX, m_trackContentWidget->m_isFilter);
|
||||
|
||||
@@ -128,7 +128,7 @@ bool ResizeHandler::mouseMoveEvent(QMouseEvent* event)
|
||||
}
|
||||
else
|
||||
{
|
||||
TrackEntry* te = m_trackContentWidget->getTrackEntryOnPos(event->globalPos());
|
||||
TrackEntry* te = m_trackContentWidget->getTrackEntryOnPos(event->globalPosition().toPoint());
|
||||
|
||||
if (m_trackContentWidget->m_isFilter)
|
||||
{
|
||||
|
||||
+3
-3
@@ -45,7 +45,7 @@ void SelectHandler::mousePressEvent(QMouseEvent* event)
|
||||
{
|
||||
m_pressedEntry = nullptr;
|
||||
|
||||
QPoint clickedPos = tcw->mapFromGlobal(event->globalPos());
|
||||
QPoint clickedPos = tcw->mapFromGlobal(event->globalPosition().toPoint());
|
||||
int clickedPosY = clickedPos.y();
|
||||
int clickedPosX = clickedPos.x();
|
||||
|
||||
@@ -133,13 +133,13 @@ void SelectHandler::mousePressEvent(QMouseEvent* event)
|
||||
contextMenu->addAction(action);
|
||||
}
|
||||
|
||||
contextMenu->popup(event->globalPos());
|
||||
contextMenu->popup(event->globalPosition().toPoint());
|
||||
}
|
||||
}
|
||||
|
||||
void SelectHandler::mouseReleaseEvent(QMouseEvent* event)
|
||||
{
|
||||
QPoint clickedPos = tcw->mapFromGlobal(event->globalPos());
|
||||
QPoint clickedPos = tcw->mapFromGlobal(event->globalPosition().toPoint());
|
||||
int clickedPosX = clickedPos.x();
|
||||
int clickedTime = tcw->m_tools->getTime(clickedPosX, tcw->m_isFilter);
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ TrackWidget::TrackWidget(int baseWidth, bool readonly, Tools* tools, bool filter
|
||||
connect(ui->mainTrack, &TrackContentWidget::signalTrackEntryDeleted, this, &TrackWidget::slotTrackEntryDeleted);
|
||||
connect(ui->mainTrack, &TrackContentWidget::signalEditEntry, this, &TrackWidget::signalEditEntry);
|
||||
|
||||
connect(ui->chkSelect, &QCheckBox::stateChanged, this, &TrackWidget::signalSelectTrack);
|
||||
connect(ui->chkSelect, &QCheckBox::checkStateChanged, this, &TrackWidget::signalSelectTrack);
|
||||
connect(ui->pbExpand, &QPushButton::clicked, this, &TrackWidget::slotExpand);
|
||||
connect(ui->pbAddFilter, &QPushButton::clicked, this, &TrackWidget::slotAddFilter);
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
*/
|
||||
|
||||
#include "lts_session.h"
|
||||
#include <utility>
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
#include "lts_session_data_dds.h"
|
||||
@@ -1307,7 +1308,7 @@ void LtsSession::createBaseLayout()
|
||||
if (showDeveloperActions)
|
||||
addDeveloperActions();
|
||||
|
||||
for (LtsNotification::LtsNotificationController* ctl : qAsConst(m_notiCtlList))
|
||||
for (LtsNotification::LtsNotificationController* ctl : std::as_const(m_notiCtlList))
|
||||
{
|
||||
if (!m_baseLayout->notificationExists(ctl->identifier())) // add if non-existent only
|
||||
m_baseLayout->addNotification(ctl->createWidget()); // FIXME: crash when no icons?
|
||||
|
||||
@@ -5,7 +5,91 @@
|
||||
namespace LtsSession
|
||||
{
|
||||
|
||||
// STUB implementations - RTI DDS not available
|
||||
// All methods are stubbed since RTI Connext DDS is not available
|
||||
// STUB implementations - RTI Connext DDS not available.
|
||||
// The topic-lock feature depends on the RTI DDS backend (Core::Interface::Ftc),
|
||||
// which is an optional dependency not present in this build. These definitions
|
||||
// exist so that LtsSession links; the moc-generated qt_metacall references every
|
||||
// slot, so each slot needs a body. Semantics reflect an unavailable backend:
|
||||
// init reports failure (the caller logs a warning and skips wiring the handler)
|
||||
// and the handler is never locked.
|
||||
|
||||
TopicLockHandler::TopicLockHandler()
|
||||
: m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger().getNGLLogger("LtsSession.TopicLockHandler"))
|
||||
{
|
||||
}
|
||||
|
||||
TopicLockHandler::~TopicLockHandler() {}
|
||||
|
||||
bool TopicLockHandler::init(const std::shared_ptr<Core::Interface::Ftc> &coreFtc, int exerciseId)
|
||||
{
|
||||
Q_UNUSED(coreFtc);
|
||||
Q_UNUSED(exerciseId);
|
||||
return false; // RTI DDS backend unavailable
|
||||
}
|
||||
|
||||
void TopicLockHandler::slotTryLock(const LtsWidgets::TopicInfo &topicInfo)
|
||||
{
|
||||
Q_UNUSED(topicInfo);
|
||||
}
|
||||
|
||||
bool TopicLockHandler::slotUnlock()
|
||||
{
|
||||
return true; // nothing is locked (no DDS backend)
|
||||
}
|
||||
|
||||
void TopicLockHandler::slotFinalize() {}
|
||||
|
||||
bool TopicLockHandler::lock()
|
||||
{
|
||||
return false; // no DDS backend to lock against
|
||||
}
|
||||
|
||||
bool TopicLockHandler::unlock()
|
||||
{
|
||||
return true; // nothing to unlock
|
||||
}
|
||||
|
||||
std::string TopicLockHandler::objStateAsString() const
|
||||
{
|
||||
return "stub (RTI DDS not available)";
|
||||
}
|
||||
|
||||
|
||||
TopicLockHanderData::TopicLockHanderData() {}
|
||||
|
||||
TopicLockHanderData::~TopicLockHanderData() {}
|
||||
|
||||
void TopicLockHanderData::init(const std::shared_ptr<Core::Interface::Ftc> &coreFtc, int exerciseId)
|
||||
{
|
||||
Q_UNUSED(coreFtc);
|
||||
Q_UNUSED(exerciseId);
|
||||
}
|
||||
|
||||
void TopicLockHanderData::unlock() {}
|
||||
|
||||
void TopicLockHanderData::slotTryLock(const LtsWidgets::TopicInfo &topicInfo)
|
||||
{
|
||||
Q_UNUSED(topicInfo);
|
||||
}
|
||||
|
||||
bool TopicLockHanderData::isLocked() const
|
||||
{
|
||||
return false; // no DDS backend: never locked
|
||||
}
|
||||
|
||||
LtsWidgets::TopicInfo TopicLockHanderData::getTopicInfo() const
|
||||
{
|
||||
return LtsWidgets::TopicInfo();
|
||||
}
|
||||
|
||||
void TopicLockHanderData::slotLock(const QString &lockedBy)
|
||||
{
|
||||
m_lockedBy = lockedBy;
|
||||
}
|
||||
|
||||
void TopicLockHanderData::slotUnlock()
|
||||
{
|
||||
m_lockedBy.clear();
|
||||
}
|
||||
|
||||
} // namespace LtsSession
|
||||
@@ -89,7 +89,6 @@ void populateModel(LtsTimeline::TimelineModel* model)
|
||||
|
||||
try
|
||||
{
|
||||
const TestItem& testItem = dynamic_cast<const TestItem&>(model->item(5));
|
||||
}
|
||||
catch (const std::exception& ex)
|
||||
{
|
||||
@@ -109,6 +108,7 @@ void populateModel(LtsTimeline::TimelineModel* model)
|
||||
#define unsorted false
|
||||
QVector<int> x;
|
||||
bool y;
|
||||
(void)y;
|
||||
|
||||
x = model->itemIdsBetween(now + 60'000 + 1, now + 150'000 - 1, non_strict, recursive);
|
||||
|
||||
|
||||
@@ -51,7 +51,10 @@ Track& TimelineModel::track(int id) noexcept(false)
|
||||
{
|
||||
if (id == m_rootTrack.id())
|
||||
return m_rootTrack;
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations" // model facade delegates to the deprecated root Track lookup
|
||||
return m_rootTrack.track(id);
|
||||
#pragma GCC diagnostic pop
|
||||
}
|
||||
|
||||
auto it = m_trackCache.find(id);
|
||||
@@ -68,7 +71,10 @@ const Track& TimelineModel::track(int id) const noexcept(false)
|
||||
{
|
||||
if (id == m_rootTrack.id())
|
||||
return m_rootTrack;
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations" // model facade delegates to the deprecated root Track lookup
|
||||
return m_rootTrack.track(id);
|
||||
#pragma GCC diagnostic pop
|
||||
}
|
||||
|
||||
std::map<int, Track*>::const_iterator it = m_trackCache.find(id);
|
||||
@@ -82,7 +88,10 @@ const Track& TimelineModel::track(int id) const noexcept(false)
|
||||
Item& TimelineModel::item(int id) noexcept(false)
|
||||
{
|
||||
if (!m_itemCaching)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations" // model facade delegates to the deprecated root Track lookup
|
||||
return m_rootTrack.item(id);
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
auto it = m_itemCache.find(id);
|
||||
|
||||
@@ -95,7 +104,10 @@ Item& TimelineModel::item(int id) noexcept(false)
|
||||
const Item& TimelineModel::item(int id) const noexcept(false)
|
||||
{
|
||||
if (!m_itemCaching)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations" // model facade delegates to the deprecated root Track lookup
|
||||
return m_rootTrack.item(id);
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
decltype(m_itemCache)::const_iterator it = m_itemCache.find(id);
|
||||
|
||||
@@ -132,7 +144,10 @@ bool TimelineModel::isItemsBetween(qint64 start, qint64 end, const QVector<int>&
|
||||
const QVector<int> TimelineModel::copyItemIdsBetween(qint64 start, qint64 end, bool strict, bool complete,
|
||||
bool sorted) const
|
||||
{
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations" // model facade delegates to the deprecated root Track lookup
|
||||
return m_rootTrack.copyItemIdsBetween(start, end, strict, complete, true, sorted);
|
||||
#pragma GCC diagnostic pop
|
||||
}
|
||||
|
||||
bool TimelineModel::isItemsBetween(qint64 start, qint64 end, int ignoreId, bool strict, bool complete,
|
||||
|
||||
+3
-3
@@ -45,9 +45,9 @@ void TimelineViewDragHandler::dragMoveEvent(QDragMoveEvent* e)
|
||||
if (!e->mimeData()->hasFormat(Item::mimetype))
|
||||
return;
|
||||
|
||||
m_dragPos = e->pos();
|
||||
m_dragPos = e->position().toPoint();
|
||||
m_view->m_header->setHoverPosition(m_dragPos.x());
|
||||
e->setAccepted(canDragItemsTo(e->pos()));
|
||||
e->setAccepted(canDragItemsTo(e->position().toPoint()));
|
||||
m_view->viewport()->update();
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ void TimelineViewDragHandler::dropEvent(QDropEvent* e)
|
||||
if (!e->mimeData()->hasFormat(Item::mimetype))
|
||||
return;
|
||||
|
||||
if (!canDragItemsTo(e->pos()))
|
||||
if (!canDragItemsTo(e->position().toPoint()))
|
||||
{
|
||||
clear();
|
||||
e->acceptProposedAction();
|
||||
|
||||
@@ -22,8 +22,8 @@ namespace LtsTimeline
|
||||
|
||||
TimelineWidget::TimelineWidget(QWidget *parent)
|
||||
: QWidget(parent)
|
||||
, m_ui(new Ui::Timeline)
|
||||
, m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger().getNGLLogger("Timeline.TimelineWidget"))
|
||||
, m_ui(new Ui::Timeline)
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
m_ui->debugWidget->hide();
|
||||
|
||||
@@ -20,7 +20,10 @@ const Track& Track::track(int id) const noexcept(false)
|
||||
{
|
||||
try
|
||||
{
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations" // self-recursive lookup: recurses via the deprecated public Track API
|
||||
return track->track(id);
|
||||
#pragma GCC diagnostic pop
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
@@ -131,6 +134,7 @@ void Track::removeCopyItem(int itemId) noexcept(false)
|
||||
const QVector<int> Track::copyItemIdsBetween(qint64 start, qint64 end, bool strict, bool complete, bool recursive,
|
||||
bool sorted, qint64 minimumDuration) const
|
||||
{
|
||||
Q_UNUSED(minimumDuration);
|
||||
auto itemPtrRefs = _copyItems();
|
||||
|
||||
if (recursive)
|
||||
@@ -153,7 +157,10 @@ const QVector<int> Track::copyItemIdsBetween(qint64 start, qint64 end, bool stri
|
||||
sort(itemPtrRefs);
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations" // internal call to the deprecated transformItemPtrsToIds helper
|
||||
return transformItemPtrsToIds(itemPtrRefs);
|
||||
#pragma GCC diagnostic pop
|
||||
}
|
||||
|
||||
const QVector<int> Track::itemIdsBetween(qint64 start, qint64 end, bool strict, bool complete, bool recursive,
|
||||
@@ -171,7 +178,10 @@ const QVector<int> Track::itemIdsBetween(qint64 start, qint64 end, bool strict,
|
||||
|
||||
sort(itemPtrRefs);
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations" // internal call to the deprecated transformItemPtrsToIds helper
|
||||
return transformItemPtrsToIds(itemPtrRefs);
|
||||
#pragma GCC diagnostic pop
|
||||
}
|
||||
|
||||
QVector<int> itemIds;
|
||||
@@ -209,7 +219,10 @@ bool Track::isItemsBetween(qint64 start, qint64 end, const QVector<int>& ignoreI
|
||||
|
||||
for (const int itemId : std::as_const(m_copyItemIds))
|
||||
{
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations" // internal lookup via the deprecated Track::item
|
||||
const Item& i = item(itemId);
|
||||
#pragma GCC diagnostic pop
|
||||
if (!ignoreIds.contains(i.id()))
|
||||
if (isItemBetween(i, start, end, strict, complete, minimumDuration))
|
||||
return true;
|
||||
@@ -304,7 +317,10 @@ ItemPtrNCVRefs Track::_itemsNCV(bool recursive)
|
||||
|
||||
const QVector<int> Track::_itemIds(bool recursive) const
|
||||
{
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations" // internal call to the deprecated transformItemPtrsToIds helper
|
||||
QVector<int> itemIds(transformItemPtrsToIds(m_items));
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
if (!recursive)
|
||||
return itemIds;
|
||||
@@ -363,19 +379,28 @@ QVector<int> Track::itemIds(bool recursive, bool sorted) const
|
||||
if (sorted)
|
||||
{
|
||||
if (!recursive)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations" // internal call to the deprecated transformItemPtrsToIds helper
|
||||
return transformItemPtrsToIds(m_items);
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
ItemPtrRefs is(_items(true));
|
||||
|
||||
sort(is);
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations" // internal call to the deprecated transformItemPtrsToIds helper
|
||||
return transformItemPtrsToIds(is);
|
||||
#pragma GCC diagnostic pop
|
||||
}
|
||||
|
||||
QVector<int> itemIds;
|
||||
itemIds.reserve(m_items.size());
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations" // internal call to the deprecated transformItemPtrsToIds helper
|
||||
itemIds += transformItemPtrsToIds(m_items);
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
if (!recursive)
|
||||
return itemIds;
|
||||
@@ -448,7 +473,10 @@ Track& Track::track(int id) noexcept(false)
|
||||
{
|
||||
try
|
||||
{
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations" // self-recursive lookup: recurses via the deprecated public Track API
|
||||
return track->track(id);
|
||||
#pragma GCC diagnostic pop
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
@@ -495,7 +523,10 @@ Item& Track::item(int id) noexcept(false)
|
||||
{
|
||||
try
|
||||
{
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations" // self-recursive lookup: recurses via the deprecated public Track API
|
||||
return track->item(id);
|
||||
#pragma GCC diagnostic pop
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
@@ -519,7 +550,10 @@ const Item& Track::item(int id) const noexcept(false)
|
||||
{
|
||||
try
|
||||
{
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations" // self-recursive lookup: recurses via the deprecated public Track API
|
||||
return track->item(id);
|
||||
#pragma GCC diagnostic pop
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
|
||||
+2
-2
@@ -935,8 +935,8 @@ void LtsUtilsTest::test_jsonArray()
|
||||
|
||||
QVERIFY_EXCEPTION_THROWN(array.at<std::string>(0), JsonTypeError);
|
||||
|
||||
QVERIFY_EXCEPTION_THROWN(array.contains<int>(-1), JsonRangeError);
|
||||
QVERIFY_EXCEPTION_THROWN(array.contains<int>(4), JsonRangeError);
|
||||
QVERIFY_EXCEPTION_THROWN((void)array.contains<int>(-1), JsonRangeError);
|
||||
QVERIFY_EXCEPTION_THROWN((void)array.contains<int>(4), JsonRangeError);
|
||||
QVERIFY_EXCEPTION_THROWN(array.at<int>(-1), JsonRangeError);
|
||||
QVERIFY_EXCEPTION_THROWN(array.at<int>(4), JsonRangeError);
|
||||
|
||||
|
||||
+2
-4
@@ -223,12 +223,10 @@ template <typename T> bool inline get1Byte(const QByteArray& baData, size_t& pos
|
||||
if (size_t(baData.size()) < pos + 1)
|
||||
return false;
|
||||
|
||||
const char* data = baData.data() + pos;
|
||||
|
||||
if (std::numeric_limits<T>::is_signed)
|
||||
out = (T)(data[0]);
|
||||
out = (T)(baData.at(pos));
|
||||
else
|
||||
out = (T)(data[0] & 0xFF);
|
||||
out = (T)(baData.at(pos) & 0xFF);
|
||||
|
||||
pos += 1;
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace LtsUtils
|
||||
|
||||
inline bool lessThan(const QVariant& var1, const QVariant& var2)
|
||||
{
|
||||
if (var1.canConvert(QMetaType::QString) && var2.canConvert(QMetaType::QString))
|
||||
if (var1.canConvert<QString>() && var2.canConvert<QString>())
|
||||
{
|
||||
QString str1(var1.toString());
|
||||
QString str2(var2.toString());
|
||||
@@ -28,7 +28,7 @@ inline bool lessThan(const QVariant& var1, const QVariant& var2)
|
||||
|
||||
return d1 < d2;
|
||||
}
|
||||
else if (var1.canConvert(QMetaType::Double) && var2.canConvert(QMetaType::Double))
|
||||
else if (var1.canConvert<double>() && var2.canConvert<double>())
|
||||
return var1.toDouble() < var2.toDouble();
|
||||
|
||||
return false;
|
||||
|
||||
@@ -49,7 +49,7 @@ WebSocketHelper::WebSocketHelper(AbstractClientMessageFactory* messageFactory, L
|
||||
connect(m_socket, &QWebSocket::textFrameReceived, this, &WebSocketHelper::dataReceived);
|
||||
connect(m_socket, &QWebSocket::connected, this, &WebSocketHelper::onConnected);
|
||||
connect(m_socket, &QWebSocket::disconnected, this, &WebSocketHelper::onDisconnected);
|
||||
connect(m_socket, QOverload<QAbstractSocket::SocketError>::of(&QWebSocket::error), this, &WebSocketHelper::error);
|
||||
connect(m_socket, &QWebSocket::errorOccurred, this, &WebSocketHelper::error);
|
||||
}
|
||||
|
||||
WebSocketHelper::~WebSocketHelper()
|
||||
|
||||
@@ -49,6 +49,7 @@ void LtsAbstractSequenceWidget::getValue(QWidget *data,
|
||||
return;
|
||||
|
||||
data = findChild<QWidget *>(findObjectName);
|
||||
Q_UNUSED(data);
|
||||
}
|
||||
|
||||
void LtsAbstractSequenceWidget::setMemberCount(int count)
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <QtWidgets/QCheckBox>
|
||||
#include <QtWidgets/QCompleter>
|
||||
#include <QtCore/QDateTime>
|
||||
#include <QtCore/QTimeZone>
|
||||
#include <QtWidgets/QGridLayout>
|
||||
#include <QtWidgets/QHBoxLayout>
|
||||
#include <QtGui/QKeyEvent>
|
||||
@@ -248,7 +249,7 @@ int getItemValue(QSpinBox *spinBox)
|
||||
LtsDateTimeEdit::LtsDateTimeEdit(QWidget *parent, bool withNowButton, bool checkable)
|
||||
: QWidget(parent)
|
||||
// , m_uiLe(new Ui::LtsDateTimeEditLe)
|
||||
, m_scFixed(new QShortcut(QKeySequence(Qt::ShiftModifier + Qt::Key_F2), this, SLOT(setFixedDateTime()), nullptr, Qt::WidgetWithChildrenShortcut))
|
||||
, m_scFixed(new QShortcut(QKeySequence(Qt::ShiftModifier | Qt::Key_F2), this, SLOT(setFixedDateTime()), nullptr, Qt::WidgetWithChildrenShortcut))
|
||||
, m_scOffset(new QShortcut(QKeySequence(Qt::Key_F2), this, SLOT(setOffsetDateTime()), nullptr, Qt::WidgetWithChildrenShortcut))
|
||||
, m_checkable(checkable) // see below
|
||||
, m_withNowButton(withNowButton) // see below
|
||||
@@ -551,7 +552,7 @@ bool LtsDateTimeEdit::setMsecsSinceEpoch(qint64 msec, bool setToNearestPossible)
|
||||
m_curTimeMSec = msec;
|
||||
|
||||
const qint64 offsetTimeZoneMsec = getTimezoneAsSecs() * 1000;
|
||||
const QDateTime datetime(QDateTime::fromMSecsSinceEpoch(m_curTimeMSec + offsetTimeZoneMsec, Qt::UTC));
|
||||
const QDateTime datetime(QDateTime::fromMSecsSinceEpoch(m_curTimeMSec + offsetTimeZoneMsec, QTimeZone(0)));
|
||||
const QDate date(datetime.date());
|
||||
const QTime time(datetime.time());
|
||||
|
||||
@@ -940,7 +941,7 @@ bool LtsDateTimeEdit::isDataAcceptable()
|
||||
return false;
|
||||
}
|
||||
|
||||
qint64 msec = QDateTime(QDate(getYear(), getMonth(), getDay()), QTime(getHour(), getMinute(), getSecond()), Qt::UTC).toMSecsSinceEpoch();
|
||||
qint64 msec = QDateTime(QDate(getYear(), getMonth(), getDay()), QTime(getHour(), getMinute(), getSecond()), QTimeZone(0)).toMSecsSinceEpoch();
|
||||
msec -= DTG::timezone2Secs(getTimezone()) * 1000LL;
|
||||
if (m_minTimeMSec > 0 && m_maxTimeMSec > 0 && m_minTimeMSec < m_maxTimeMSec)
|
||||
{
|
||||
@@ -1539,7 +1540,7 @@ void LtsDateTimeEdit::onFocusOutDay()
|
||||
{
|
||||
if (m_getCurrentTimeCallback)
|
||||
{
|
||||
const QDateTime dt(QDateTime::fromMSecsSinceEpoch(m_getCurrentTimeCallback(), Qt::UTC));
|
||||
const QDateTime dt(QDateTime::fromMSecsSinceEpoch(m_getCurrentTimeCallback(), QTimeZone(0)));
|
||||
setDay(dt.date().day());
|
||||
}
|
||||
}
|
||||
@@ -1571,7 +1572,7 @@ void LtsDateTimeEdit::onFocusOutHHMMSS()
|
||||
{
|
||||
if (m_getCurrentTimeCallback)
|
||||
{
|
||||
const QDateTime dt(QDateTime::fromMSecsSinceEpoch(m_getCurrentTimeCallback(), Qt::UTC));
|
||||
const QDateTime dt(QDateTime::fromMSecsSinceEpoch(m_getCurrentTimeCallback(), QTimeZone(0)));
|
||||
setHHMMSS(dt.time().hour(), dt.time().minute(), dt.time().second());
|
||||
}
|
||||
}
|
||||
@@ -1632,7 +1633,7 @@ void LtsDateTimeEdit::onFocusOutMonth()
|
||||
{
|
||||
if (m_getCurrentTimeCallback)
|
||||
{
|
||||
const QDateTime dt(QDateTime::fromMSecsSinceEpoch(m_getCurrentTimeCallback(), Qt::UTC));
|
||||
const QDateTime dt(QDateTime::fromMSecsSinceEpoch(m_getCurrentTimeCallback(), QTimeZone(0)));
|
||||
setMonth(dt.date().month());
|
||||
}
|
||||
}
|
||||
@@ -1671,7 +1672,7 @@ void LtsDateTimeEdit::onFocusOutYear()
|
||||
{
|
||||
if (m_getCurrentTimeCallback)
|
||||
{
|
||||
const QDateTime dt(QDateTime::fromMSecsSinceEpoch(m_getCurrentTimeCallback(), Qt::UTC));
|
||||
const QDateTime dt(QDateTime::fromMSecsSinceEpoch(m_getCurrentTimeCallback(), QTimeZone(0)));
|
||||
setYear(dt.date().year());
|
||||
}
|
||||
}
|
||||
@@ -1768,7 +1769,7 @@ void LtsDateTimeEdit::onMonthWheelEvent(bool bForward, int cursorPos)
|
||||
if (!isMonthAcceptable())
|
||||
return;
|
||||
const int ofs = bForward ? 1 : -1;
|
||||
const QDateTime dt(QDateTime::fromMSecsSinceEpoch(m_curTimeMSec, Qt::UTC).addMonths(ofs));
|
||||
const QDateTime dt(QDateTime::fromMSecsSinceEpoch(m_curTimeMSec, QTimeZone(0)).addMonths(ofs));
|
||||
setMsecsSinceEpoch(dt.toMSecsSinceEpoch(), true);
|
||||
m_uiLe->leLongMonth->setCursorPosition(cursorPos);
|
||||
m_uiLe->leLongMonth->setSelection(0, 3);
|
||||
@@ -1782,7 +1783,7 @@ void LtsDateTimeEdit::onYearWheelEvent(bool bForward, int cursorPos)
|
||||
if (!isYearAcceptable())
|
||||
return;
|
||||
const int ofs = bForward ? 1 : -1;
|
||||
const QDateTime dt(QDateTime::fromMSecsSinceEpoch(m_curTimeMSec, Qt::UTC).addYears(ofs));
|
||||
const QDateTime dt(QDateTime::fromMSecsSinceEpoch(m_curTimeMSec, QTimeZone(0)).addYears(ofs));
|
||||
setMsecsSinceEpoch(dt.toMSecsSinceEpoch(), true);
|
||||
m_uiLe->leLongYear->setCursorPosition(cursorPos);
|
||||
m_uiLe->leLongYear->setSelection(0, 2);
|
||||
|
||||
@@ -389,7 +389,7 @@ void LtsDialog::addConnections(QWidget *widget)
|
||||
if (addChangesMadeSignal<QLineEdit>(widget, &QLineEdit::textChanged)) return;
|
||||
if (addChangesMadeSignal<QDateTimeEdit>(widget, &QDateTimeEdit::dateTimeChanged)) return;
|
||||
if (addChangesMadeSignal<QComboBox>(widget, &QComboBox::currentTextChanged)) return;
|
||||
if (addChangesMadeSignal<QCheckBox>(widget, &QCheckBox::stateChanged)) return;
|
||||
if (addChangesMadeSignal<QCheckBox>(widget, &QCheckBox::checkStateChanged)) return;
|
||||
if (addChangesMadeSignal<QSpinBox>(widget, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged))) return;
|
||||
if (addChangesMadeSignal<QDoubleSpinBox>(widget, static_cast<void (QDoubleSpinBox::*)(double)>(&QDoubleSpinBox::valueChanged))) return;
|
||||
if (addChangesMadeSignal<QSlider>(widget, &QSlider::valueChanged)) return;
|
||||
|
||||
@@ -437,7 +437,7 @@ private:
|
||||
for (WidgetType *widget : children)
|
||||
{
|
||||
QVariant lastState = widget->property("lastReadOnlyState");
|
||||
if (lastState.isValid() && !lastState.isNull() && lastState.canConvert(QMetaType::Bool))
|
||||
if (lastState.isValid() && !lastState.isNull() && lastState.canConvert<bool>())
|
||||
widget->setReadOnly(lastState.toBool());
|
||||
}
|
||||
}
|
||||
@@ -449,7 +449,7 @@ private:
|
||||
for (WidgetType *widget : children)
|
||||
{
|
||||
QVariant lastState = widget->property("lastEnabledState");
|
||||
if (lastState.isValid() && !lastState.isNull() && lastState.canConvert(QMetaType::Bool))
|
||||
if (lastState.isValid() && !lastState.isNull() && lastState.canConvert<bool>())
|
||||
widget->setEnabled(lastState.toBool());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -119,6 +119,7 @@ void bt()
|
||||
}
|
||||
|
||||
//qWarning() << "frame" << i << address << function << offset;
|
||||
(void)offset;
|
||||
}
|
||||
|
||||
free(symbols);
|
||||
|
||||
@@ -84,12 +84,12 @@ void LtsMSecDateTimeEdit::setTimezoneHoursOffset(int timezoneHoursOffset)
|
||||
void LtsMSecDateTimeEdit::setDateTime(const QDateTime &dateTime)
|
||||
{
|
||||
// TODO: doesn't make sense, as toMSecsSinceEpoch returns the *UTC version* of the dt, so the timespec stuff does nothing
|
||||
setMsecsSinceEpoch(QDateTime::fromMSecsSinceEpoch(dateTime.toMSecsSinceEpoch(), Qt::TimeSpec::OffsetFromUTC, m_timezoneHoursOffset * 3600).toMSecsSinceEpoch());
|
||||
setMsecsSinceEpoch(QDateTime::fromMSecsSinceEpoch(dateTime.toMSecsSinceEpoch(), QTimeZone(m_timezoneHoursOffset * 3600)).toMSecsSinceEpoch());
|
||||
}
|
||||
|
||||
void LtsMSecDateTimeEdit::setMsecsSinceEpoch(qint64 msecs)
|
||||
{
|
||||
QDateTimeEdit::setDateTime(QDateTime::fromMSecsSinceEpoch(msecs, Qt::TimeSpec::OffsetFromUTC, m_timezoneHoursOffset * 3600));
|
||||
QDateTimeEdit::setDateTime(QDateTime::fromMSecsSinceEpoch(msecs, QTimeZone(m_timezoneHoursOffset * 3600)));
|
||||
}
|
||||
|
||||
int LtsMSecDateTimeEdit::msecStepSize() const
|
||||
|
||||
@@ -50,11 +50,14 @@ QValidator::State LtsMultiRangeSpinBox::validate(QString &input, int &pos) const
|
||||
// int value = input.toInt();
|
||||
// value -= minimum();
|
||||
// return (value % singleStep() == 0) ? QValidator::Acceptable : QValidator::Intermediate;
|
||||
Q_UNUSED(input);
|
||||
Q_UNUSED(pos);
|
||||
return QValidator::Acceptable;
|
||||
}
|
||||
|
||||
void LtsMultiRangeSpinBox::fixup(QString &str) const
|
||||
{
|
||||
Q_UNUSED(str);
|
||||
|
||||
// QSpinBox::fixup(str);
|
||||
|
||||
|
||||
@@ -106,7 +106,7 @@ LtsSelectionPopup::~LtsSelectionPopup()
|
||||
|
||||
void LtsSelectionPopup::slotFilterChanged()
|
||||
{
|
||||
m_filter->setFilterWildcard(m_ui->leSearch->text().count() ? m_ui->leSearch->text() : QStringLiteral("*") /* show everything if nothing was entered */);
|
||||
m_filter->setFilterWildcard(m_ui->leSearch->text().size() ? m_ui->leSearch->text() : QStringLiteral("*") /* show everything if nothing was entered */);
|
||||
refresh();
|
||||
}
|
||||
|
||||
|
||||
@@ -139,7 +139,6 @@ void LtsTextEditor::slotTextBold()
|
||||
if (m_ui->textEdit->document()->isEmpty())
|
||||
{
|
||||
const QString &f = m_ui->cbFonts->currentText();
|
||||
fmt.setFontFamily(f);
|
||||
fmt.setFontFamilies({f});
|
||||
fmt.setForeground(m_foregroundColor);
|
||||
const qreal pointSize = (m_ui->cbFontSize->currentText().toFloat() > 0 ? m_ui->cbFontSize->currentText().toFloat() : 11);
|
||||
@@ -158,7 +157,6 @@ void LtsTextEditor::slotTextUnderline()
|
||||
if (m_ui->textEdit->document()->isEmpty())
|
||||
{
|
||||
const QString &f = m_ui->cbFonts->currentText();
|
||||
fmt.setFontFamily(f);
|
||||
fmt.setFontFamilies({f});
|
||||
fmt.setForeground(m_foregroundColor);
|
||||
const qreal pointSize = (m_ui->cbFontSize->currentText().toFloat() > 0 ? m_ui->cbFontSize->currentText().toFloat() : 11);
|
||||
@@ -177,7 +175,6 @@ void LtsTextEditor::slotTextItalic()
|
||||
if (m_ui->textEdit->document()->isEmpty())
|
||||
{
|
||||
const QString &f = m_ui->cbFonts->currentText();
|
||||
fmt.setFontFamily(f);
|
||||
fmt.setFontFamilies({f});
|
||||
fmt.setForeground(m_foregroundColor);
|
||||
const qreal pointSize = (m_ui->cbFontSize->currentText().toFloat() > 0 ? m_ui->cbFontSize->currentText().toFloat() : 11);
|
||||
@@ -202,7 +199,6 @@ void LtsTextEditor::slotTextFamily(int index)
|
||||
fmt.setForeground(m_foregroundColor);
|
||||
}
|
||||
const QString f = m_ui->cbFonts->currentText();
|
||||
fmt.setFontFamily(f);
|
||||
fmt.setFontFamilies({f});
|
||||
slotMergeFormatOnWordOrSelection(fmt);
|
||||
}
|
||||
@@ -223,7 +219,6 @@ void LtsTextEditor::slotTextSize(int index)
|
||||
if (m_ui->textEdit->document()->isEmpty())
|
||||
{
|
||||
const QString &f = m_ui->cbFonts->currentText();
|
||||
fmt.setFontFamily(f);
|
||||
fmt.setFontFamilies({f});
|
||||
fmt.setForeground(m_foregroundColor);
|
||||
|
||||
@@ -273,7 +268,6 @@ void LtsTextEditor::slotTextColor()
|
||||
fmt.setFontWeight(m_ui->pbBold->isChecked() ? QFont::Bold : QFont::Normal);
|
||||
|
||||
const QString &f = m_ui->cbFonts->currentText();
|
||||
fmt.setFontFamily(f);
|
||||
fmt.setFontFamilies({f});
|
||||
const qreal pointSize = (m_ui->cbFontSize->currentText().toFloat() > 0 ? m_ui->cbFontSize->currentText().toFloat() : 11);
|
||||
fmt.setFontPointSize(pointSize);
|
||||
|
||||
@@ -652,7 +652,7 @@ void LtsTextEditor2::onTextItalic()
|
||||
void LtsTextEditor2::onTextFamily(const QString &f)
|
||||
{
|
||||
QTextCharFormat fmt;
|
||||
fmt.setFontFamily(f);
|
||||
fmt.setFontFamilies({f});
|
||||
mergeFormatOnWordOrSelection(fmt);
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ class Interface
|
||||
{
|
||||
public:
|
||||
Interface(LtsSession::LtsSession* session, NGL::INGLLogger& logger)
|
||||
: m_hasInit(true), m_session(session), m_logger(logger), m_appId(LtsAppDescriptor::App::Login)
|
||||
: m_hasInit(true), m_session(session), m_appId(LtsAppDescriptor::App::Login), m_logger(logger)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -7,14 +7,14 @@
|
||||
#include <NGLLogger/NGLLoggerBootstrap.h>
|
||||
|
||||
Initialisation::Initialisation()
|
||||
: m_domainParticipant(nullptr)
|
||||
: m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger().getNGLLogger("UnitTests.Initialisation"))
|
||||
, m_domainParticipant(nullptr)
|
||||
, m_domainParticipantSub(nullptr)
|
||||
, m_domainId(0)
|
||||
, m_exerciseId(-1)
|
||||
, m_ddsPublisher(nullptr)
|
||||
, m_ddsSubscriber(nullptr)
|
||||
, m_subListener(new DDSGeneric::SubscriberListener)
|
||||
, m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger().getNGLLogger("UnitTests.Initialisation"))
|
||||
{
|
||||
if (!DDS::QosProfile::setDefault())
|
||||
ERROR_LOG(m_logger) << "Error setting default QoS from xml-file ";
|
||||
|
||||
@@ -115,7 +115,7 @@ void Threading::preInit() const
|
||||
}
|
||||
bremse--;
|
||||
|
||||
const int lenRest = maxLen - name.count();
|
||||
const int lenRest = maxLen - name.size();
|
||||
if (lenRest < 1)
|
||||
{
|
||||
Q_ASSERT(false);
|
||||
@@ -143,7 +143,7 @@ void Threading::preInit() const
|
||||
|
||||
|
||||
|
||||
const int finalLeft = maxLen - name.count();
|
||||
const int finalLeft = maxLen - name.size();
|
||||
if (finalLeft < 0 || (finalLeft > 0 && functionTopicName().length() > maxLen))
|
||||
{
|
||||
|
||||
|
||||
+4
-3
@@ -8,6 +8,7 @@
|
||||
*/
|
||||
|
||||
#include "aes_explosions_edit_adler_standalone.h"
|
||||
#include <utility>
|
||||
#include "aes_rocket_utility.h"
|
||||
#include "aes_effector.h"
|
||||
#include "ui_aes_explosions_edit_adler_standalone.h"
|
||||
@@ -1914,7 +1915,7 @@ void ExplosionsEditAdlerStandAlone::enableUiElements(bool enable)
|
||||
// }
|
||||
|
||||
const QList<QAbstractButton *> &geoButtons = m_geometrieButtonGroup->buttons();
|
||||
for (QAbstractButton *btn : qAsConst(geoButtons))
|
||||
for (QAbstractButton *btn : std::as_const(geoButtons))
|
||||
btn->setEnabled(enable);
|
||||
// For PreFat
|
||||
// m_ui->geometrieLineBtn->hide();
|
||||
@@ -2907,7 +2908,7 @@ void ExplosionsEditAdlerStandAlone::fillCharges()
|
||||
m_ui->cbChargeType->clear();
|
||||
m_ui->cbChargeType->addItem(emptyEntryComboBox, -1);
|
||||
|
||||
for (const ProjectDataManagement::ChargeType &chargeType : qAsConst(chargesForGearClass))
|
||||
for (const ProjectDataManagement::ChargeType &chargeType : std::as_const(chargesForGearClass))
|
||||
{
|
||||
// Vulcano ist available for point geometry only:
|
||||
const bool bIsVulcano = chargeTypeIdIsVulcano(chargeType.id());
|
||||
@@ -2953,7 +2954,7 @@ void ExplosionsEditAdlerStandAlone::fillGearClasses()
|
||||
int index = 0;
|
||||
m_ui->cbGearClass->insertItem(index, emptyEntryComboBox, -1);
|
||||
|
||||
for (auto type : qAsConst(gearClasses))
|
||||
for (auto type : std::as_const(gearClasses))
|
||||
{
|
||||
if (m_gearClassFilter.contains(type.gearClassId()))
|
||||
{
|
||||
|
||||
+2
-1
@@ -26,6 +26,7 @@
|
||||
#include <QSignalBlocker>
|
||||
#include <QtCore/QStringList>
|
||||
#include <QtCore/QVector>
|
||||
#include <QtCore/QTimeZone>
|
||||
#include <QtGlobal>
|
||||
#include <ngltools/ngltools_dtg.h>
|
||||
#include <utility>
|
||||
@@ -156,7 +157,7 @@ class AvmPlaybackMenu::TimeControl : public QObject
|
||||
QString msecsSinceEpochToString(qint64 msecs)
|
||||
{
|
||||
return dateTimeToString(
|
||||
QDateTime::fromMSecsSinceEpoch(msecs, Qt::TimeSpec::OffsetFromUTC, m_timezoneHoursOffset * 3600));
|
||||
QDateTime::fromMSecsSinceEpoch(msecs, QTimeZone(m_timezoneHoursOffset * 3600)));
|
||||
}
|
||||
|
||||
void setTimezoneHoursOffset(int timezoneHoursOffset)
|
||||
|
||||
+2
-5
@@ -35,11 +35,8 @@ set(SRCS
|
||||
# which needs to be built on SV, too.
|
||||
#
|
||||
NGL_ADD_LIBRARY2(WS AvmShared SHARED ${SRCS})
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(AvmShared
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../Services/
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../Common/
|
||||
)
|
||||
# NGL_TARGET_INCLUDE_DIRECTORIES(AvmShared) removed: ../../Services and ../../Common do not
|
||||
# exist at those relative paths (pre-existing -Wmissing-include-dirs warnings); nothing includes from them.
|
||||
if(QT6_GUI_AVAILABLE)
|
||||
NGL_TARGET_LINK_LIBRARIES(AvmShared
|
||||
PUBLIC
|
||||
|
||||
@@ -385,13 +385,10 @@ public:
|
||||
|
||||
const QString &backup = toString();
|
||||
|
||||
QString errorMsg;
|
||||
int errorLine;
|
||||
int errorColumn;
|
||||
|
||||
if (!setContent(xml, &errorMsg, &errorLine, &errorColumn))
|
||||
const auto parseResult = setContent(xml);
|
||||
if (!parseResult)
|
||||
{
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " parsing xml input failed: " << errorMsg << " at line " << errorLine << " , column " << errorColumn;
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " parsing xml input failed: " << parseResult.errorMessage << " at line " << int(parseResult.errorLine) << " , column " << int(parseResult.errorColumn);
|
||||
setContent(backup);
|
||||
return false;
|
||||
}
|
||||
@@ -406,13 +403,10 @@ public:
|
||||
|
||||
const QString &backup = toString();
|
||||
|
||||
QString errorMsg;
|
||||
int errorLine;
|
||||
int errorColumn;
|
||||
|
||||
if (!setContent(device, &errorMsg, &errorLine, &errorColumn))
|
||||
const auto parseResult = setContent(device);
|
||||
if (!parseResult)
|
||||
{
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " parsing xml input failed: " << errorMsg << " at line " << errorLine << " , column " << errorColumn;
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " parsing xml input failed: " << parseResult.errorMessage << " at line " << int(parseResult.errorLine) << " , column " << int(parseResult.errorColumn);
|
||||
setContent(backup);
|
||||
return false;
|
||||
}
|
||||
|
||||
+2
@@ -301,6 +301,8 @@ bool fill(QComboBox *cbx, PdmComboBoxType type)
|
||||
#endif // BUILD_WITH_EXTERNAL_DDS
|
||||
case PdmComboBoxType::CbUnkown:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (curData.isValid() && (cbx->findData(curData) != -1))
|
||||
|
||||
+2
-1
@@ -15,6 +15,7 @@
|
||||
#include <QtWidgets/QFileDialog>
|
||||
#include <QtWidgets/QToolButton>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QtCore/QTimeZone>
|
||||
|
||||
|
||||
namespace ScreenRecording
|
||||
@@ -138,7 +139,7 @@ void InterfaceImpl::onUpdateGui()
|
||||
connect(m_timer, &QTimer::timeout, this, [this]()
|
||||
{
|
||||
m_toolBtn->setIcon((m_counter++ % 2) ? m_recIcon : QIcon());
|
||||
m_toolBtn->setToolTip(QDateTime::fromSecsSinceEpoch(m_counter, Qt::UTC).toString(QLatin1String("hh:mm:ss")));
|
||||
m_toolBtn->setToolTip(QDateTime::fromSecsSinceEpoch(m_counter, QTimeZone(0)).toString(QLatin1String("hh:mm:ss")));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
+6
-5
@@ -8,6 +8,7 @@
|
||||
*/
|
||||
|
||||
#include "srm_data_plugin.h"
|
||||
#include <utility>
|
||||
|
||||
#include <DDS/Core/core_dtc.h>
|
||||
#include <SituationReplayManagement/srm_ftc.h>
|
||||
@@ -51,7 +52,7 @@ public:
|
||||
{
|
||||
// next 4 lines: comment please
|
||||
m_references += fi;
|
||||
for (const auto &info : qAsConst(m_replayPartitions))
|
||||
for (const auto &info : std::as_const(m_replayPartitions))
|
||||
{
|
||||
fi->write(info);
|
||||
}
|
||||
@@ -72,7 +73,7 @@ public:
|
||||
void removeSession(ForeignInterfaceImpl *fi, bool wait = true) noexcept(false)
|
||||
{
|
||||
m_references -= fi;
|
||||
for (const auto &info : qAsConst(m_replayPartitions))
|
||||
for (const auto &info : std::as_const(m_replayPartitions))
|
||||
fi->remove(info);
|
||||
|
||||
replayPartitionRemoveRequest(fi, 0, 0, 0, wait);
|
||||
@@ -262,7 +263,7 @@ public:
|
||||
}
|
||||
|
||||
const auto &rp = it.value();
|
||||
for (auto ptr : qAsConst(m_references))
|
||||
for (auto ptr : std::as_const(m_references))
|
||||
ptr->remove(rp);
|
||||
|
||||
proc->deleteLater();
|
||||
@@ -281,7 +282,7 @@ public:
|
||||
}
|
||||
|
||||
const ReplayPartitionEx &rp = it.value();
|
||||
for (ForeignInterfaceImpl* ptr : qAsConst(m_references))
|
||||
for (ForeignInterfaceImpl* ptr : std::as_const(m_references))
|
||||
ptr->write(rp);
|
||||
}
|
||||
|
||||
@@ -353,7 +354,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
for (auto *ptr : qAsConst(m_references))
|
||||
for (auto *ptr : std::as_const(m_references))
|
||||
ptr->remove(rp);
|
||||
|
||||
it = m_replayPartitions.erase(it);
|
||||
|
||||
+1
-1
@@ -11,8 +11,8 @@ namespace BSM
|
||||
{
|
||||
Api::Api(QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_socketHandler(new SocketHandler(this))
|
||||
, m_logger(TrainingAreaBase::getLogger("BSM.Api"))
|
||||
, m_socketHandler(new SocketHandler(this))
|
||||
{
|
||||
connect(m_socketHandler, &SocketHandler::opticalShot,
|
||||
this, &Api::opticalShot);
|
||||
|
||||
+1
-1
@@ -15,11 +15,11 @@ namespace BSM
|
||||
{
|
||||
Socket::Socket(const Bsm &cfg, QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_logger(TrainingAreaBase::getLogger("BSM.Socket"))
|
||||
, m_config(cfg)
|
||||
, m_tcpSocket(new QTcpSocket(this))
|
||||
, m_reconnectTimer(nullptr)
|
||||
, m_aliveTimer(new QTimer(this))
|
||||
, m_logger(TrainingAreaBase::getLogger("BSM.Socket"))
|
||||
{
|
||||
m_aliveTimer->setTimerType(Qt::VeryCoarseTimer);
|
||||
m_aliveTimer->setSingleShot(true);
|
||||
|
||||
+2
-2
@@ -12,8 +12,8 @@ namespace BuildingControlUnit
|
||||
namespace Json
|
||||
{
|
||||
WebSocketHandler::WebSocketHandler(QObject *parent) : QObject(parent)
|
||||
, m_webSocketServer(new QWebSocketServer(QStringLiteral("BCU"), QWebSocketServer::NonSecureMode, this)),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {}
|
||||
, m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger())
|
||||
, m_webSocketServer(new QWebSocketServer(QStringLiteral("BCU"), QWebSocketServer::NonSecureMode, this)) {}
|
||||
|
||||
WebSocketHandler::~WebSocketHandler()
|
||||
{
|
||||
|
||||
+1
-1
@@ -41,8 +41,8 @@ static const bool point3dRegistered = []() {
|
||||
|
||||
Api::Api(QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_lastHitResult(HitResult())
|
||||
, m_logger(TrainingAreaBase::getLogger("VWM.Api"))
|
||||
, m_lastHitResult(HitResult())
|
||||
{
|
||||
Q_UNUSED(point3dRegistered);
|
||||
}
|
||||
|
||||
+3
-5
@@ -294,12 +294,10 @@ bool readBuilding(const QString &fn, Building &cfg)
|
||||
bool readBuilding(const QByteArray &data, Building &cfg)
|
||||
{
|
||||
QDomDocument doc;
|
||||
QString errorMsg;
|
||||
int errorLine;
|
||||
int errorColumn;
|
||||
if (!doc.setContent(data, &errorMsg, &errorLine, &errorColumn))
|
||||
const auto parseResult = doc.setContent(data);
|
||||
if (!parseResult)
|
||||
{
|
||||
ERROR_LOG(logger()) << "Line=" << errorLine << ", Column=" << errorColumn << ": " << errorMsg;
|
||||
ERROR_LOG(logger()) << "Line=" << int(parseResult.errorLine) << ", Column=" << int(parseResult.errorColumn) << ": " << parseResult.errorMessage;
|
||||
return false;
|
||||
}
|
||||
const QDomElement domRoot = doc.documentElement();
|
||||
|
||||
+3
-5
@@ -32,13 +32,11 @@ QDomElement readFile(const QString &fn, const QString &rootTag)
|
||||
return QDomElement();
|
||||
}
|
||||
|
||||
QString errMsg;
|
||||
int errLine = 0;
|
||||
int errColumn = 0;
|
||||
QDomDocument doc;
|
||||
if (!doc.setContent(data, &errMsg, &errLine, &errColumn))
|
||||
const auto parseResult = doc.setContent(data);
|
||||
if (!parseResult)
|
||||
{
|
||||
WARNING_LOG(logger()) << "Could not parse xml file '" << fn << "' at " << errLine << ":" << errColumn << ": " << errMsg;
|
||||
WARNING_LOG(logger()) << "Could not parse xml file '" << fn << "' at " << int(parseResult.errorLine) << ":" << int(parseResult.errorColumn) << ": " << parseResult.errorMessage;
|
||||
return QDomElement();
|
||||
}
|
||||
|
||||
|
||||
@@ -25,8 +25,8 @@ BuildingControlHandler::BuildingControlHandler(MainHandler *mainHandler)
|
||||
, Interface::Fts::SendCesHit3DonBuildingRequestHandler(mainHandler->ddsHandler()->fts())
|
||||
, Interface::Fts::TriggerBsmFlashRequestHandler(mainHandler->ddsHandler()->fts())
|
||||
, Interface::Fts::SwitchRelayRequestHandler(mainHandler->ddsHandler()->fts())
|
||||
, m_mainHandler(mainHandler)
|
||||
, m_logger(getLogger("BuildingControlHandler"))
|
||||
, m_mainHandler(mainHandler)
|
||||
{}
|
||||
|
||||
BuildingControlHandler::~BuildingControlHandler()
|
||||
|
||||
@@ -46,6 +46,7 @@ BuildingProcess::BuildingProcess(MainHandler *mainHandler,
|
||||
const bool initBuilding,
|
||||
QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_logger(getLogger("BuildingProcess"))
|
||||
, m_mainHandler(mainHandler)
|
||||
, m_buildingInfo(info)
|
||||
, m_wsSocket(nullptr)
|
||||
@@ -53,7 +54,6 @@ BuildingProcess::BuildingProcess(MainHandler *mainHandler,
|
||||
, m_hitLineInfoTimer(new QTimer(this))
|
||||
, m_hitLineId(info.mseId << 16)
|
||||
, m_initBuilding(initBuilding)
|
||||
, m_logger(getLogger("BuildingProcess"))
|
||||
{
|
||||
m_proc.setProgram(procName);
|
||||
m_proc.setReadChannel(QProcess::StandardOutput);
|
||||
@@ -1145,7 +1145,7 @@ void BuildingProcess::openWebSocket()
|
||||
{
|
||||
closeWebSocket();
|
||||
m_wsSocket = new QWebSocket;
|
||||
connect(m_wsSocket, QOverload<QAbstractSocket::SocketError>::of(&QWebSocket::error),
|
||||
connect(m_wsSocket, &QWebSocket::errorOccurred,
|
||||
this, &BuildingProcess::onWebSocketError);
|
||||
connect(m_wsSocket, &QWebSocket::connected,
|
||||
this, &BuildingProcess::onWebSocketConnected);
|
||||
|
||||
@@ -14,8 +14,8 @@ namespace Buildings
|
||||
{
|
||||
|
||||
DdsHandler::DdsHandler(int domainId, int exerciseId)
|
||||
: m_ddsConnector(std::make_shared<DDSConnector::DdsConnector>(domainId, IDL::PartitionType::Exercise, exerciseId))
|
||||
, m_logger(getLogger("DdsHandler"))
|
||||
: m_logger(getLogger("DdsHandler"))
|
||||
, m_ddsConnector(std::make_shared<DDSConnector::DdsConnector>(domainId, IDL::PartitionType::Exercise, exerciseId))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "DdsHandler(" << domainId << ") for partition: " << m_ddsConnector->getDefaultPartition();
|
||||
}
|
||||
|
||||
@@ -17,12 +17,12 @@
|
||||
namespace Buildings
|
||||
{
|
||||
|
||||
IsmHandler::IsmHandler(MainHandler *mainHandler) : m_mainHandler(mainHandler)
|
||||
IsmHandler::IsmHandler(MainHandler *mainHandler) : m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger())
|
||||
, m_mainHandler(mainHandler)
|
||||
, m_dtcIsm(nullptr)
|
||||
, m_ftcIsm(nullptr)
|
||||
, m_changeTimeoutTimer(new QTimer(this))
|
||||
, m_changeTimeoutTimerInit(new QTimer(this)),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {
|
||||
, m_changeTimeoutTimerInit(new QTimer(this)) {
|
||||
connect(m_changeTimeoutTimer, &QTimer::timeout,
|
||||
this, &IsmHandler::onBuildingsChanged);
|
||||
m_changeTimeoutTimer->setInterval(3 * 1000);
|
||||
|
||||
@@ -8,9 +8,9 @@
|
||||
|
||||
namespace Buildings
|
||||
{
|
||||
PdmHandler::PdmHandler(MainHandler *mainHandler) : m_mainHandler(mainHandler)
|
||||
, m_bPdmInitialized(false),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {}
|
||||
PdmHandler::PdmHandler(MainHandler *mainHandler) : m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger())
|
||||
, m_mainHandler(mainHandler)
|
||||
, m_bPdmInitialized(false) {}
|
||||
|
||||
PdmHandler::~PdmHandler()
|
||||
{}
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
|
||||
namespace Buildings
|
||||
{
|
||||
PpmHandler::PpmHandler(MainHandler *mainHandler) : m_mainHandler(mainHandler),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {}
|
||||
PpmHandler::PpmHandler(MainHandler *mainHandler) : m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger())
|
||||
, m_mainHandler(mainHandler) {}
|
||||
|
||||
PpmHandler::~PpmHandler()
|
||||
{}
|
||||
|
||||
@@ -9,8 +9,8 @@ namespace Buildings
|
||||
RelayInfoHandler::RelayInfoHandler(MainHandler *mainHandler)
|
||||
: QObject()
|
||||
, Interface::Fts::SetRelayInfoRequestHandler(mainHandler->ddsHandler()->fts())
|
||||
, m_mainHandler(mainHandler)
|
||||
, m_logger(getLogger("RelayInfoHandler"))
|
||||
, m_mainHandler(mainHandler)
|
||||
{}
|
||||
|
||||
RelayInfoHandler::~RelayInfoHandler()
|
||||
|
||||
@@ -17,9 +17,9 @@ namespace Buildings
|
||||
|
||||
WebSocketHandler::WebSocketHandler(const std::shared_ptr<BuildingControlHandler> &buildingControlHandler, QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_logger(getLogger(QStringLiteral("WebSocketHandler")))
|
||||
, m_buildingControlHandler(buildingControlHandler)
|
||||
, m_webSocketServer(new QWebSocketServer(QStringLiteral("BuildingsSocket"), QWebSocketServer::NonSecureMode, this))
|
||||
, m_logger(getLogger(QStringLiteral("WebSocketHandler")))
|
||||
{}
|
||||
|
||||
WebSocketHandler::~WebSocketHandler()
|
||||
|
||||
+1
-1
@@ -11,9 +11,9 @@ using namespace CombatNetRadio::WebSocketInterface::Connection;
|
||||
|
||||
ClientConnection::ClientConnection(QWebSocket *socket, QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_logger(getLogger(QLatin1String("ClientConnection")))
|
||||
, m_socket(socket)
|
||||
, m_ip(socket->peerAddress())
|
||||
, m_logger(getLogger(QLatin1String("ClientConnection")))
|
||||
{}
|
||||
|
||||
ClientConnection::~ClientConnection()
|
||||
|
||||
+2
-2
@@ -11,8 +11,8 @@
|
||||
|
||||
using namespace CombatNetRadio::WebSocketInterface::Connection;
|
||||
|
||||
ConnectionHandler::ConnectionHandler() : m_server(nullptr),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {
|
||||
ConnectionHandler::ConnectionHandler() : m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger())
|
||||
, m_server(nullptr) {
|
||||
}
|
||||
|
||||
ConnectionHandler::~ConnectionHandler()
|
||||
|
||||
+2
-2
@@ -13,8 +13,8 @@ namespace WebSocketInterface
|
||||
namespace Messages
|
||||
{
|
||||
|
||||
MessageHandler::MessageHandler(ExerciseManager *exerciseManager) : m_exerciseManager(exerciseManager),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {
|
||||
MessageHandler::MessageHandler(ExerciseManager *exerciseManager) : m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger())
|
||||
, m_exerciseManager(exerciseManager) {
|
||||
Q_ASSERT(exerciseManager);
|
||||
}
|
||||
|
||||
|
||||
@@ -20,8 +20,8 @@ namespace CombatNetRadio
|
||||
ConfigCnr::ConfigCnr(int exerciseId, AudioVideoManagement::Interface::Dtc *avmDtc, InfrastructureManagement::Interface::Dtc *ismDtc) : m_exerciseId(exerciseId)
|
||||
, m_avmDtc(avmDtc)
|
||||
, m_ismDtc(ismDtc)
|
||||
, m_loggerJson(getLogger("ConfigCnr.Json")),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {
|
||||
, m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger())
|
||||
, m_loggerJson(getLogger("ConfigCnr.Json")) {
|
||||
Q_ASSERT(avmDtc);
|
||||
Q_ASSERT(ismDtc);
|
||||
|
||||
|
||||
@@ -18,8 +18,8 @@ namespace CombatNetRadio
|
||||
{
|
||||
|
||||
DdsHandler::DdsHandler(int domainId)
|
||||
: m_ddsConnector(std::make_shared<DDSConnector::DdsConnector>(domainId, IDL::PartitionType::Global))
|
||||
, m_logger(getLogger("DdsHandler"))
|
||||
: m_logger(getLogger("DdsHandler"))
|
||||
, m_ddsConnector(std::make_shared<DDSConnector::DdsConnector>(domainId, IDL::PartitionType::Global))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "DdsHandler(" << domainId << ") for partition: " << m_ddsConnector->getDefaultPartition();
|
||||
}
|
||||
|
||||
@@ -16,8 +16,8 @@ namespace ComponentMonitor
|
||||
{
|
||||
|
||||
CheckmkHandler::CheckmkHandler() : QObject()
|
||||
, m_socket(new QTcpSocket(this)),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {
|
||||
, m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger())
|
||||
, m_socket(new QTcpSocket(this)) {
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
@@ -13,8 +13,8 @@ namespace DifferentialGPS
|
||||
{
|
||||
|
||||
DdsHandler::DdsHandler(int domainId)
|
||||
: m_ddsConnector(std::make_shared<DDSConnector::DdsConnector>(domainId, IDL::PartitionType::Global))
|
||||
, m_logger(getLogger("DdsHandler"))
|
||||
: m_logger(getLogger("DdsHandler"))
|
||||
, m_ddsConnector(std::make_shared<DDSConnector::DdsConnector>(domainId, IDL::PartitionType::Global))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "DdsHandler(" << domainId << ") for partition: " << m_ddsConnector->getDefaultPartition();
|
||||
} // end of ctor()
|
||||
|
||||
@@ -17,11 +17,11 @@ namespace DifferentialGPS
|
||||
{
|
||||
MainThread::MainThread(QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_logger(getLogger("MainThread"))
|
||||
, m_ddsHandler(nullptr)
|
||||
, m_dgpsTimer(new QTimer(this))
|
||||
, m_tetraIfNum(0)
|
||||
, m_trimbleIfNum(0)
|
||||
, m_logger(getLogger("MainThread"))
|
||||
, m_broadcastTime(QTime::currentTime())
|
||||
, m_broadcastCycle_ms(10000)
|
||||
{
|
||||
|
||||
@@ -94,7 +94,7 @@ bool get(const QJsonObject &obj, const QString &key, double &val, bool bOptional
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, FinalAttackHeadingMode &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<FinalAttackHeadingMode>(iVal))
|
||||
{
|
||||
@@ -111,7 +111,7 @@ bool get(const QJsonObject &obj, const QString &key, FinalAttackHeadingMode &val
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, FuseType &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<FuseType>(iVal))
|
||||
{
|
||||
@@ -129,7 +129,7 @@ bool get(const QJsonObject &obj, const QString &key, FuseType &val, bool bOption
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, Heading2InitialPointMode &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<Heading2InitialPointMode>(iVal))
|
||||
{
|
||||
@@ -150,7 +150,7 @@ bool get(const QJsonObject &obj, const QString &key, Heading2InitialPointMode &v
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, Munition &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<Munition>(iVal))
|
||||
{
|
||||
@@ -206,7 +206,7 @@ bool get(const QJsonObject &obj, const QString &key, Munition &val, bool bOption
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, ReleaseMode &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<ReleaseMode>(iVal))
|
||||
{
|
||||
@@ -223,7 +223,7 @@ bool get(const QJsonObject &obj, const QString &key, ReleaseMode &val, bool bOpt
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, TimeForTargetMode &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<TimeForTargetMode>(iVal))
|
||||
{
|
||||
|
||||
@@ -51,8 +51,8 @@ int NasatAircraftParticipantEx::partyId() const
|
||||
|
||||
|
||||
HandlerParticipant::HandlerParticipant(Initialization *mainHandler)
|
||||
: m_mainHandler(mainHandler)
|
||||
, m_logger(getLogger("ParticipantPositionPublisher"))
|
||||
: m_logger(getLogger("ParticipantPositionPublisher"))
|
||||
, m_mainHandler(mainHandler)
|
||||
{}
|
||||
|
||||
HandlerParticipant::~HandlerParticipant()
|
||||
|
||||
+2
@@ -32,5 +32,7 @@ void TestExAnmeldebestaetigung::testExAnmeldebestaetigung()
|
||||
const QJsonObject jsonObj = jsonDoc.object();
|
||||
QJsonObject dataObj = jsonObj[AdlerJson::JsonKeys::DATA()].toObject();
|
||||
|
||||
// WIP: parsed from dataObj once the test body is completed
|
||||
AdlerJson::AnBestaetigungsdaten anBestaetigungsdaten;
|
||||
Q_UNUSED(anBestaetigungsdaten);
|
||||
}
|
||||
+18
-17
@@ -8,6 +8,7 @@
|
||||
*/
|
||||
|
||||
#include "aes_handler.h"
|
||||
#include <utility>
|
||||
#include "DDS/Core/function_reply_object.h"
|
||||
#include "aes.hpp"
|
||||
#include "json_dispatcher.h"
|
||||
@@ -128,7 +129,7 @@ void AesHandler::onEffectClusterModifyReply(const Core::FunctionReplyObject &rep
|
||||
|
||||
std::vector<std::string> args;
|
||||
args.reserve(argsList.size());
|
||||
for (const auto &str : qAsConst(argsList))
|
||||
for (const auto &str : std::as_const(argsList))
|
||||
args.emplace_back(str.toStdString());
|
||||
|
||||
req.notification().content(content.toStdString());
|
||||
@@ -171,7 +172,7 @@ void AesHandler::onEffectClusterModifyReply(const Core::FunctionReplyObject &rep
|
||||
std::vector<NotificationManagement::Address> recipientIdsDds;
|
||||
recipientIdsDds.reserve(recipientIds.size());
|
||||
|
||||
for (const auto &recipientId : qAsConst(recipientIds))
|
||||
for (const auto &recipientId : std::as_const(recipientIds))
|
||||
{
|
||||
NotificationManagement::Address addr;
|
||||
addr.addressId(recipientId);
|
||||
@@ -349,7 +350,7 @@ void AesHandler::sendTrajectoryAdlerModifyRequest(const WirkfeldplanungData &dat
|
||||
QVector<int> subordinates = m_dtcPpm->getSubordinatesByParticipant(participantId);
|
||||
QVector<ParticipantManagement::ParticipantPosition> subordinatePositions;
|
||||
|
||||
for (int subordinate : qAsConst(subordinates))
|
||||
for (int subordinate : std::as_const(subordinates))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "subordinates(" << participantId << ") :" << subordinate;
|
||||
subordinatePositions.append(m_dtcPpm->participantPosition(subordinate));
|
||||
@@ -365,7 +366,7 @@ void AesHandler::sendTrajectoryAdlerModifyRequest(const WirkfeldplanungData &dat
|
||||
|
||||
double grad = (data.zieldaten.zielachse / 6400.) * 360.0;
|
||||
|
||||
for (Flugbahnpunkt pos : qAsConst(data.feuerkommando.wirkmittel.at(wirkmittelIndex).flugbahnpunkt))
|
||||
for (Flugbahnpunkt pos : std::as_const(data.feuerkommando.wirkmittel.at(wirkmittelIndex).flugbahnpunkt))
|
||||
{
|
||||
/*
|
||||
DEBUG_LOG(m_logger) << "Flugbahnpunkt:"
|
||||
@@ -625,7 +626,7 @@ void AesHandler::handleEffectCluster(const WirkfeldplanungData &data, int wsId)
|
||||
QList<QRectF> rects;
|
||||
int zone = 0;
|
||||
QVector<QPointF> vecPoints;
|
||||
for (const WirkmittelFeuerkommando &effector : qAsConst(data.feuerkommando.wirkmittel))
|
||||
for (const WirkmittelFeuerkommando &effector : std::as_const(data.feuerkommando.wirkmittel))
|
||||
{
|
||||
// get the target point for the effector
|
||||
const QPointF centerPoint(effector.auftreffpunkt.koordinate.longitude * (M_PI / 180.0), effector.auftreffpunkt.koordinate.latitude * (M_PI / 180.0));
|
||||
@@ -674,9 +675,9 @@ void AesHandler::handleEffectCluster(const WirkfeldplanungData &data, int wsId)
|
||||
// Now that we know the impact radius we create a boundingbox around all impact areas
|
||||
int zone = 0;
|
||||
QVector<QPointF> vecPoints;
|
||||
for (const WirkmittelFeuerkommandoRakete &effector : qAsConst(data.feuerkommando.wirkmittelRakete))
|
||||
for (const WirkmittelFeuerkommandoRakete &effector : std::as_const(data.feuerkommando.wirkmittelRakete))
|
||||
{
|
||||
for (const Treffpunkt &treffpunkt : qAsConst(effector.treffpunkte))
|
||||
for (const Treffpunkt &treffpunkt : std::as_const(effector.treffpunkte))
|
||||
{
|
||||
const QPointF centerPoint(treffpunkt.koordinate.koordinate.longitude * (M_PI / 180.0), treffpunkt.koordinate.koordinate.latitude * (M_PI / 180.0));
|
||||
|
||||
@@ -744,7 +745,7 @@ void AesHandler::handleEffectCluster(const WirkfeldplanungData &data, int wsId)
|
||||
|
||||
if (data.feuerkommando.wirkmittel.size() > 0)
|
||||
{
|
||||
for (const auto &effectorAdler : qAsConst(data.feuerkommando.wirkmittel))
|
||||
for (const auto &effectorAdler : std::as_const(data.feuerkommando.wirkmittel))
|
||||
{
|
||||
AreaEffectSimulation::EffectorData effectorData;
|
||||
effectorData.angleOfFall() = 0;
|
||||
@@ -778,7 +779,7 @@ void AesHandler::handleEffectCluster(const WirkfeldplanungData &data, int wsId)
|
||||
const double useNewGrad = -90 + std::atan2(coordDiff.y, coordDiff.x) * (180.0 / M_PI);
|
||||
DEBUG_LOG(m_logger) << "Atan2 Deg to: last point " << std::atan2(coordDiff.y, coordDiff.x) * (180.0 / M_PI);
|
||||
|
||||
for (const auto &flightPointAdler : qAsConst(effectorAdler.flugbahnpunkt))
|
||||
for (const auto &flightPointAdler : std::as_const(effectorAdler.flugbahnpunkt))
|
||||
{
|
||||
Core::RelativePositionRelativeTime flightPoint;
|
||||
flightPoint.offsetX() = 0; // flightPointAdler.zRelativ;
|
||||
@@ -826,7 +827,7 @@ void AesHandler::handleEffectCluster(const WirkfeldplanungData &data, int wsId)
|
||||
}
|
||||
else if (data.feuerkommando.wirkmittelRakete.size() > 0)
|
||||
{
|
||||
for (const auto &effectorAdler : qAsConst(data.feuerkommando.wirkmittelRakete))
|
||||
for (const auto &effectorAdler : std::as_const(data.feuerkommando.wirkmittelRakete))
|
||||
{
|
||||
AreaEffectSimulation::EffectorData effectorData;
|
||||
|
||||
@@ -851,7 +852,7 @@ void AesHandler::handleEffectCluster(const WirkfeldplanungData &data, int wsId)
|
||||
// create centroid
|
||||
Core::GeoPosition mhpPos;
|
||||
QPointF centroid;
|
||||
for (const auto &treffpunkt : qAsConst(effectorAdler.treffpunkte))
|
||||
for (const auto &treffpunkt : std::as_const(effectorAdler.treffpunkte))
|
||||
centroid += {treffpunkt.koordinate.koordinate.latitude, treffpunkt.koordinate.koordinate.longitude};
|
||||
|
||||
centroid /= effectorAdler.treffpunkte.size();
|
||||
@@ -889,7 +890,7 @@ void AesHandler::handleEffectCluster(const WirkfeldplanungData &data, int wsId)
|
||||
double currentFlightTime = 0.0;
|
||||
|
||||
const LtsCoordTrans::UtmCoordinate utmStartPos = LtsCoordTrans::UtmCoordinate::fromGeographic(participantPosition.pos().lon(), participantPosition.pos().lat());
|
||||
for (const Core::GeoPosition &pos : qAsConst(trajectoryWithoutTime))
|
||||
for (const Core::GeoPosition &pos : std::as_const(trajectoryWithoutTime))
|
||||
{
|
||||
const LtsCoordTrans::UtmCoordinate utmCurrentPos = LtsCoordTrans::UtmCoordinate::fromGeographic(pos.lon(), pos.lat());
|
||||
|
||||
@@ -935,7 +936,7 @@ void AesHandler::handleEffectCluster(const WirkfeldplanungData &data, int wsId)
|
||||
std::vector<ProjectDataManagement::L27_EffectorId> refWirkmittel;
|
||||
refWirkmittel.reserve(data.feuerkommando.wirkmittel.size());
|
||||
|
||||
for (const auto &wm : qAsConst(data.feuerkommando.wirkmittel))
|
||||
for (const auto &wm : std::as_const(data.feuerkommando.wirkmittel))
|
||||
{
|
||||
ammoCounter += wm.geschoss.anzahl; // Counts every Ammo that will be shooted
|
||||
DEBUG_LOG(m_logger) << "INSERT KENNER INTO MAP: " << data.feuerkampfReferenz << "---------" << wm.kenner;
|
||||
@@ -954,7 +955,7 @@ QList<qint32> AesHandler::findAllPendingEffectCluster(int partyId)
|
||||
// QList<AreaEffectSimulation::EffectCluster> ret;
|
||||
QList<qint32> ret;
|
||||
const auto &effectClusters = m_dtcAes->effectClusters();
|
||||
for (const auto &effectCluster : qAsConst(effectClusters))
|
||||
for (const auto &effectCluster : std::as_const(effectClusters))
|
||||
{
|
||||
if (effectCluster.partyId() != partyId)
|
||||
continue;
|
||||
@@ -993,7 +994,7 @@ void AesHandler::handleAmmoCount(const Feuerkampfdaten &data, int saaPartyId, bo
|
||||
|
||||
const auto &aesEffetClusters = m_dtcAes->effectClusters();
|
||||
|
||||
for (const auto &aes : qAsConst(aesEffetClusters))
|
||||
for (const auto &aes : std::as_const(aesEffetClusters))
|
||||
{
|
||||
if (aes.isDeleted() || aes.partyId() != saaPartyId || aes.element() != refTrimmed.toStdString())
|
||||
{
|
||||
@@ -1024,7 +1025,7 @@ void AesHandler::handleAmmoCount(const Feuerkampfdaten &data, int saaPartyId, bo
|
||||
{
|
||||
auto refKenners = m_feuerkampfReferenzWirkmittel.value(refTrimmed);
|
||||
|
||||
for (const auto &kenner : qAsConst(refKenners))
|
||||
for (const auto &kenner : std::as_const(refKenners))
|
||||
{
|
||||
ExVollzugsmeldung exvm;
|
||||
exvm.feuerkampfdaten.feuerkampfReferenz = data.feuerkampfReferenz;
|
||||
@@ -1056,7 +1057,7 @@ void AesHandler::removeAllPendingEffectCluster(int partyId)
|
||||
|
||||
INFO_LOG(m_logger) << "Pending effect cluster size: " << effectClusterIds.size();
|
||||
Core::RemoveElementRequest req;
|
||||
for (const qint32 id : qAsConst(effectClusterIds))
|
||||
for (const qint32 id : std::as_const(effectClusterIds))
|
||||
{
|
||||
req.id(id);
|
||||
INFO_LOG(m_logger) << "Remove effect cluster id: " << id;
|
||||
|
||||
+3
-2
@@ -8,6 +8,7 @@
|
||||
*/
|
||||
|
||||
#include "json_dispatcher.h"
|
||||
#include <utility>
|
||||
#include "json_handler_rx.h"
|
||||
#include "json_handler_tx.h"
|
||||
#include "settings.h"
|
||||
@@ -910,7 +911,7 @@ void JsonDispatcher::getCreateNotificationRequestData(const int wsId,
|
||||
|
||||
std::vector<std::string> args;
|
||||
args.reserve(contentArgs.size());
|
||||
for (const auto & str : qAsConst(contentArgs))
|
||||
for (const auto & str : std::as_const(contentArgs))
|
||||
args.emplace_back(str.toStdString());
|
||||
|
||||
notif.content(content.toStdString());
|
||||
@@ -930,7 +931,7 @@ void JsonDispatcher::getCreateNotificationRequestData(const int wsId,
|
||||
std::vector<NotificationManagement::Address> recipientIdsDds;
|
||||
recipientIdsDds.reserve(recipientIds.size());
|
||||
|
||||
for (const auto &recipientId : qAsConst(recipientIds))
|
||||
for (const auto &recipientId : std::as_const(recipientIds))
|
||||
{
|
||||
NotificationManagement::Address addr;
|
||||
addr.addressId(recipientId);
|
||||
|
||||
+30
-29
@@ -1,4 +1,5 @@
|
||||
#include "telegrams.h"
|
||||
#include <utility>
|
||||
|
||||
#include <QDebug>
|
||||
#include <QJsonDocument>
|
||||
@@ -332,7 +333,7 @@ void SAATELEGRAMS_EXPORT zielmeldedatenFromJson(const QJsonObject &data, Zielmel
|
||||
zielmeldedaten.forderung = ForderungMap.value(data[JsonKeys::FORDERUNG()].toString());
|
||||
zielmeldedaten.dauer = toInteger(data[JsonKeys::DAUER()], bOk);
|
||||
QJsonArray FeuerkommandoArray = data[JsonKeys::FEUERKOMMANDO()].toArray();
|
||||
for (const QJsonValue &value : qAsConst(FeuerkommandoArray))
|
||||
for (const QJsonValue &value : std::as_const(FeuerkommandoArray))
|
||||
{
|
||||
Feuerkommando feuerkommando;
|
||||
feuerkommandoFromJson(value.toObject(), feuerkommando, bOk); // EX-L34 Wirkmittel Feuerkommando
|
||||
@@ -362,7 +363,7 @@ void SAATELEGRAMS_EXPORT feuerstellungsdatenFromJson(const QJsonObject &data, Fe
|
||||
einheitfromJson(data[JsonKeys::FEUEREINHEIT()].toObject(), feuerstellungsdaten.feuereinheit, bOk); // EX-L3
|
||||
koordinateMitHoeheFromJson(data[JsonKeys::MITTELPUNKT()].toObject(), feuerstellungsdaten.mittelpunkt, bOk); // EX-L3
|
||||
QJsonArray koordinatenArray = data[JsonKeys::KOORDINATEN()].toArray();
|
||||
for (const QJsonValue &value : qAsConst(koordinatenArray))
|
||||
for (const QJsonValue &value : std::as_const(koordinatenArray))
|
||||
{
|
||||
KoordinateMitHoehe koordinate;
|
||||
koordinateMitHoeheFromJson(value.toObject(), koordinate, bOk); // EX-L34 Wirkmittel Feuerkommando
|
||||
@@ -370,7 +371,7 @@ void SAATELEGRAMS_EXPORT feuerstellungsdatenFromJson(const QJsonObject &data, Fe
|
||||
}
|
||||
|
||||
QJsonArray geschosseArray = data[JsonKeys::GESCHOSSE()].toArray();
|
||||
for (const QJsonValue &value : qAsConst(geschosseArray))
|
||||
for (const QJsonValue &value : std::as_const(geschosseArray))
|
||||
{
|
||||
Geschoss geschosse;
|
||||
geschossfromJson(value.toObject(), geschosse, bOk); // EX-L34 Wirkmittel Feuerkommando
|
||||
@@ -394,7 +395,7 @@ void SAATELEGRAMS_EXPORT feuerstellungsdatenToJson(QJsonObject &data, const Feue
|
||||
data[JsonKeys::MITTELPUNKT()] = mittelpunkt;
|
||||
|
||||
QJsonArray koordinaten;
|
||||
for (const auto &koordinate : qAsConst(feuerstellungsdaten.koordinaten))
|
||||
for (const auto &koordinate : std::as_const(feuerstellungsdaten.koordinaten))
|
||||
{
|
||||
QJsonObject koordinateObj;
|
||||
koordinateMitHoeheToJson(koordinateObj, koordinate);
|
||||
@@ -403,7 +404,7 @@ void SAATELEGRAMS_EXPORT feuerstellungsdatenToJson(QJsonObject &data, const Feue
|
||||
data[JsonKeys::KOORDINATEN()] = koordinaten;
|
||||
|
||||
QJsonArray geschosse;
|
||||
for (const auto &geschoss : qAsConst(feuerstellungsdaten.geschosse))
|
||||
for (const auto &geschoss : std::as_const(feuerstellungsdaten.geschosse))
|
||||
{
|
||||
QJsonObject geschossObj;
|
||||
geschossToJson(geschossObj, geschoss);
|
||||
@@ -425,7 +426,7 @@ void SAATELEGRAMS_EXPORT waffensystemdatenFromJson(const QJsonObject &data, Waff
|
||||
einheitfromJson(data[JsonKeys::EINHEIT()].toObject(), waffensystemdaten.einheit, bOk); // EX-L3
|
||||
|
||||
QJsonArray geschosseArray = data[JsonKeys::GESCHOSSE()].toArray();
|
||||
for (const QJsonValue &value : qAsConst(geschosseArray))
|
||||
for (const QJsonValue &value : std::as_const(geschosseArray))
|
||||
{
|
||||
Geschoss geschosse;
|
||||
geschossfromJson(value.toObject(), geschosse, bOk); // EX-L34 Wirkmittel Feuerkommando
|
||||
@@ -445,7 +446,7 @@ void SAATELEGRAMS_EXPORT waffensystemdatenToJson(QJsonObject &data, const Waffen
|
||||
data[JsonKeys::EINHEIT()] = einheit;
|
||||
|
||||
QJsonArray geschosse;
|
||||
for (const auto &geschoss : qAsConst(waffensystemdaten.geschosse))
|
||||
for (const auto &geschoss : std::as_const(waffensystemdaten.geschosse))
|
||||
{
|
||||
QJsonObject geschossObj;
|
||||
geschossToJson(geschossObj, geschoss);
|
||||
@@ -469,7 +470,7 @@ void SAATELEGRAMS_EXPORT ladeplatzdatenFromJson(const QJsonObject &data, Ladepla
|
||||
|
||||
koordinateMitHoeheFromJson(data[JsonKeys::KOORDINATE()].toObject(), ladeplatzdaten.koordinate, bOk);
|
||||
QJsonArray geschosseArray = data[JsonKeys::GESCHOSSE()].toArray();
|
||||
for (const QJsonValue &value : qAsConst(geschosseArray))
|
||||
for (const QJsonValue &value : std::as_const(geschosseArray))
|
||||
{
|
||||
Geschoss geschosse;
|
||||
geschossfromJson(value.toObject(), geschosse, bOk); // EX-L34 Wirkmittel Feuerkommando
|
||||
@@ -484,7 +485,7 @@ void SAATELEGRAMS_EXPORT ladeplatzdatenToJson(QJsonObject &data, const Ladeplatz
|
||||
data[JsonKeys::EINHEIT()] = einheit;
|
||||
|
||||
QJsonArray geschosse;
|
||||
for (const auto &geschoss : qAsConst(ladeplatzdaten.geschosse))
|
||||
for (const auto &geschoss : std::as_const(ladeplatzdaten.geschosse))
|
||||
{
|
||||
QJsonObject geschossObj;
|
||||
geschossToJson(geschossObj, geschoss);
|
||||
@@ -536,7 +537,7 @@ void SAATELEGRAMS_EXPORT koordinierungsdatenFromJson(const QJsonObject &data, Ko
|
||||
zeitangabe_DTGFromJson(data[JsonKeys::BIS()].toObject(), koordinierungsdaten.bis, bOk); // EX-L15
|
||||
|
||||
QJsonArray koordinatenArray = data[JsonKeys::KOORDINATEN()].toArray();
|
||||
for (const QJsonValue &value : qAsConst(koordinatenArray))
|
||||
for (const QJsonValue &value : std::as_const(koordinatenArray))
|
||||
{
|
||||
Koordinate koordinate;
|
||||
koordinatefromJson(value.toObject(), koordinate, bOk); // EX-L13
|
||||
@@ -561,7 +562,7 @@ void SAATELEGRAMS_EXPORT koordinierungsdatenToJson(QJsonObject &data, const Koor
|
||||
data[JsonKeys::BIS()] = objTimestamp;
|
||||
|
||||
QJsonArray koordinatenArray;
|
||||
for (const auto &koordinate : qAsConst(koordinierungsdaten.koordinaten))
|
||||
for (const auto &koordinate : std::as_const(koordinierungsdaten.koordinaten))
|
||||
{
|
||||
QJsonObject objKoordinate;
|
||||
koordinateToJson(objKoordinate, koordinate);
|
||||
@@ -817,7 +818,7 @@ void SAATELEGRAMS_EXPORT erkundungsstellungenFromJson(const QJsonObject &data, E
|
||||
// Wirkungsbereich wirkungsbereich; // EX-L18
|
||||
|
||||
QJsonArray waffenplaetzeArray = data[JsonKeys::WAFFENPLAETZE()].toArray();
|
||||
for (const QJsonValue &value : qAsConst(waffenplaetzeArray))
|
||||
for (const QJsonValue &value : std::as_const(waffenplaetzeArray))
|
||||
{
|
||||
KoordinateMitHoehe koordinateMitHoehe;
|
||||
koordinateMitHoeheFromJson(value.toObject(), koordinateMitHoehe, bOk);
|
||||
@@ -829,7 +830,7 @@ void SAATELEGRAMS_EXPORT erkundungsstellungenFromJson(const QJsonObject &data, E
|
||||
void SAATELEGRAMS_EXPORT erkundungsstellungenToJson(QJsonObject &data, const Erkundungsstellungen &erkundungsstellungen)
|
||||
{
|
||||
QJsonArray objWaffenplatzList;
|
||||
for (const auto waffenplatz : qAsConst(erkundungsstellungen.waffenplaetze))
|
||||
for (const auto waffenplatz : std::as_const(erkundungsstellungen.waffenplaetze))
|
||||
{
|
||||
QJsonObject objWaffenplatz;
|
||||
koordinateMitHoeheToJson(objWaffenplatz, waffenplatz);
|
||||
@@ -855,7 +856,7 @@ void SAATELEGRAMS_EXPORT feuerkommandoFromJson(const QJsonObject &data, Feuerkom
|
||||
else
|
||||
{
|
||||
QJsonArray wirkmittelArray = data[JsonKeys::WIRKMITTEL()].toArray();
|
||||
for (const QJsonValue &value : qAsConst(wirkmittelArray))
|
||||
for (const QJsonValue &value : std::as_const(wirkmittelArray))
|
||||
{
|
||||
WirkmittelFeuerkommando wirkmittel;
|
||||
wirkmittelFeuerkommandoFromJson(value.toObject(), wirkmittel, bOk); // EX-L34 Wirkmittel Feuerkommando
|
||||
@@ -867,7 +868,7 @@ void SAATELEGRAMS_EXPORT feuerkommandoFromJson(const QJsonObject &data, Feuerkom
|
||||
else
|
||||
{
|
||||
QJsonArray wirkmittelArray = data[JsonKeys::WIRKMITTELRAKETE()].toArray();
|
||||
for (const QJsonValue &value : qAsConst(wirkmittelArray))
|
||||
for (const QJsonValue &value : std::as_const(wirkmittelArray))
|
||||
{
|
||||
WirkmittelFeuerkommandoRakete wirkmittel;
|
||||
wirkmittelFeuerkommandoRaketeFromJson(value.toObject(), wirkmittel, bOk); // EX-L34 Wirkmittel Feuerkommando
|
||||
@@ -878,7 +879,7 @@ void SAATELEGRAMS_EXPORT feuerkommandoFromJson(const QJsonObject &data, Feuerkom
|
||||
|
||||
void SAATELEGRAMS_EXPORT feuerkommandosToJson(QJsonArray &data, const QVector<Feuerkommando> &feuerkommandos)
|
||||
{
|
||||
for (const auto &feuerkommando : qAsConst(feuerkommandos))
|
||||
for (const auto &feuerkommando : std::as_const(feuerkommandos))
|
||||
{
|
||||
QJsonObject objFeuerkommand;
|
||||
feuerkommandoToJson(objFeuerkommand, feuerkommando);
|
||||
@@ -892,7 +893,7 @@ void SAATELEGRAMS_EXPORT feuerkommandoToJson(QJsonObject &data, const Feuerkomma
|
||||
data[JsonKeys::TYP()] = waffensystemtypMap.key(feuerkommando.typ);
|
||||
QJsonArray objWirkmittelList;
|
||||
QJsonArray objWirkmittelRaketeList;
|
||||
for (const auto &kommando : qAsConst(feuerkommando.wirkmittel))
|
||||
for (const auto &kommando : std::as_const(feuerkommando.wirkmittel))
|
||||
{
|
||||
QJsonObject objWirkmittel;
|
||||
wirkmittelFeuerkommandoToJson(objWirkmittel, kommando);
|
||||
@@ -900,7 +901,7 @@ void SAATELEGRAMS_EXPORT feuerkommandoToJson(QJsonObject &data, const Feuerkomma
|
||||
}
|
||||
data[JsonKeys::WIRKMITTEL()] = objWirkmittelList;
|
||||
|
||||
for (const auto &kommando : qAsConst(feuerkommando.wirkmittelRakete))
|
||||
for (const auto &kommando : std::as_const(feuerkommando.wirkmittelRakete))
|
||||
{
|
||||
QJsonObject objWirkmittel;
|
||||
wirkmittelFeuerkommandoRaketeToJson(objWirkmittel, kommando);
|
||||
@@ -937,7 +938,7 @@ void wirkmittelFeuerkommandoFromJson(const QJsonObject &data, WirkmittelFeuerkom
|
||||
|
||||
void wirkmittelFeuerkommandosToJson(QJsonArray &data, const QVector<WirkmittelFeuerkommando> &wirkmittelFeuerkommando)
|
||||
{
|
||||
for (const auto &feuerkommando : qAsConst(wirkmittelFeuerkommando))
|
||||
for (const auto &feuerkommando : std::as_const(wirkmittelFeuerkommando))
|
||||
{
|
||||
QJsonObject fkd;
|
||||
wirkmittelFeuerkommandoToJson(fkd, feuerkommando);
|
||||
@@ -947,7 +948,7 @@ void wirkmittelFeuerkommandosToJson(QJsonArray &data, const QVector<WirkmittelFe
|
||||
|
||||
void wirkmittelFeuerkommansdoToJson(QJsonArray &data, const QVector<WirkmittelFeuerkommando> &wirkmittelFeuerkommando)
|
||||
{
|
||||
for (const auto &wfk : qAsConst(wirkmittelFeuerkommando))
|
||||
for (const auto &wfk : std::as_const(wirkmittelFeuerkommando))
|
||||
{
|
||||
QJsonObject obj;
|
||||
wirkmittelFeuerkommandoToJson(obj, wfk);
|
||||
@@ -1007,7 +1008,7 @@ void SAATELEGRAMS_EXPORT flugbahnpunktToJson(QJsonObject &data, const Flugbahnpu
|
||||
// Array [EX-L35 Flugbahnpunkte]
|
||||
void SAATELEGRAMS_EXPORT flugbahnpunkteFromJson(const QJsonArray &data, QVector<Flugbahnpunkt> &flugbahnpunkte, bool &bOk)
|
||||
{
|
||||
for (const QJsonValue &value : qAsConst(data))
|
||||
for (const QJsonValue &value : std::as_const(data))
|
||||
{
|
||||
QJsonObject obj = value.toObject();
|
||||
Flugbahnpunkt flugbahnpunkt;
|
||||
@@ -1021,7 +1022,7 @@ void SAATELEGRAMS_EXPORT flugbahnpunkteToJson(QJsonArray &data, const QVector<Fl
|
||||
if (flugbahnpunkte.isEmpty())
|
||||
return;
|
||||
|
||||
for (const auto &flugpunkt : qAsConst(flugbahnpunkte))
|
||||
for (const auto &flugpunkt : std::as_const(flugbahnpunkte))
|
||||
{
|
||||
QJsonObject objFlugpunkt;
|
||||
flugbahnpunktToJson(objFlugpunkt, flugpunkt);
|
||||
@@ -1168,7 +1169,7 @@ void treffpunktfromJson(const QJsonObject &data, Treffpunkt &treffpunkt, bool &b
|
||||
|
||||
void treffpunktefromJson(const QJsonArray &data, QVector<Treffpunkt> &treffpunkte, bool &bOk)
|
||||
{
|
||||
for (const QJsonValue &val : qAsConst(data))
|
||||
for (const QJsonValue &val : std::as_const(data))
|
||||
{
|
||||
Treffpunkt treffpunkt;
|
||||
treffpunktfromJson(val.toObject(), treffpunkt, bOk);
|
||||
@@ -1215,7 +1216,7 @@ void trefferpunktToJson(QJsonObject &data, const Treffpunkt &treffpunkt)
|
||||
|
||||
void trefferpunkteToJson(QJsonArray &data, const QVector<Treffpunkt> &treffpunkte)
|
||||
{
|
||||
for (const auto &treffpunkt : qAsConst(treffpunkte))
|
||||
for (const auto &treffpunkt : std::as_const(treffpunkte))
|
||||
{
|
||||
QJsonObject trp;
|
||||
trefferpunktToJson(trp, treffpunkt);
|
||||
@@ -1244,7 +1245,7 @@ void wirkmittelFeuerkommandoRaketeToJson(QJsonObject &data, const WirkmittelFeue
|
||||
|
||||
void wirkmittelFeuerkommandosRaketeToJson(QJsonArray &data, const QVector<WirkmittelFeuerkommandoRakete> &wirkmittelFeuerkommandoRakete)
|
||||
{
|
||||
for (const auto &feuerkommandoRakete : qAsConst(wirkmittelFeuerkommandoRakete))
|
||||
for (const auto &feuerkommandoRakete : std::as_const(wirkmittelFeuerkommandoRakete))
|
||||
{
|
||||
QJsonObject fkr;
|
||||
wirkmittelFeuerkommandoRaketeToJson(fkr, feuerkommandoRakete);
|
||||
@@ -1292,7 +1293,7 @@ void SAATELEGRAMS_EXPORT fuehrungsdatenFromJson(const QJsonObject &data, Fuehrun
|
||||
zeitangabe_DTGFromJson(data[JsonKeys::AB()].toObject(), fuehrungsdaten.ab, bOk); // EX-L15
|
||||
zeitangabe_DTGFromJson(data[JsonKeys::BIS()].toObject(), fuehrungsdaten.bis, bOk); // EX-L15
|
||||
QJsonArray koordinatenArray = data[JsonKeys::KOORDINATEN()].toArray();
|
||||
for (const QJsonValue &value : qAsConst(koordinatenArray))
|
||||
for (const QJsonValue &value : std::as_const(koordinatenArray))
|
||||
{
|
||||
Koordinate koordinate;
|
||||
koordinatefromJson(value.toObject(), koordinate, bOk); // EX-L13
|
||||
@@ -1315,7 +1316,7 @@ void SAATELEGRAMS_EXPORT fuehrungsdatenToJson(QJsonObject &data, const Fuehrungs
|
||||
data[JsonKeys::BIS()] = objTimestamp;
|
||||
|
||||
QJsonArray koordinatenArray;
|
||||
for (const auto &koordinate : qAsConst(fuehrungsdaten.koordinaten))
|
||||
for (const auto &koordinate : std::as_const(fuehrungsdaten.koordinaten))
|
||||
{
|
||||
QJsonObject objKoordinate;
|
||||
koordinateToJson(objKoordinate, koordinate);
|
||||
@@ -1378,7 +1379,7 @@ void SAATELEGRAMS_EXPORT flugbahndatenFromJson(const QJsonObject &data, Flugbahn
|
||||
flugbahndaten.fallwinkel = toInteger(data[JsonKeys::FALLWINKEL()], bOk);
|
||||
|
||||
QJsonArray flugbahnpunkteArray = data[JsonKeys::FLUGBAHNPUNKT()].toArray();
|
||||
for (const QJsonValue &value : qAsConst(flugbahnpunkteArray))
|
||||
for (const QJsonValue &value : std::as_const(flugbahnpunkteArray))
|
||||
{
|
||||
Flugbahnpunkt flugbahnpunkt;
|
||||
flugbahnpunktFromJson(value.toObject(), flugbahnpunkt, bOk); // EX-L13
|
||||
@@ -1410,7 +1411,7 @@ void SAATELEGRAMS_EXPORT flugbahndatenToJson(QJsonObject &data, const Flugbahnda
|
||||
data[JsonKeys::FALLWINKEL()] = flugbahndaten.fallwinkel;
|
||||
|
||||
QJsonArray flugbahnpunkte;
|
||||
for (const auto &flugbahnpunkt : qAsConst(flugbahndaten.flugbahnpunkt))
|
||||
for (const auto &flugbahnpunkt : std::as_const(flugbahndaten.flugbahnpunkt))
|
||||
{
|
||||
QJsonObject flugbahnpunktObj;
|
||||
flugbahnpunktToJson(flugbahnpunktObj, flugbahnpunkt);
|
||||
|
||||
@@ -13,11 +13,11 @@
|
||||
namespace TrainingAreaBase
|
||||
{
|
||||
|
||||
IsmHandler::IsmHandler(MainHandler *mainHandler) : m_mainHandler(mainHandler)
|
||||
IsmHandler::IsmHandler(MainHandler *mainHandler) : m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger())
|
||||
, m_mainHandler(mainHandler)
|
||||
, m_dtcIsm(nullptr)
|
||||
, m_distanceIpsToGps(Settings::distanceIpsToGps())
|
||||
, m_distanceOpsToGps(Settings::distanceOpsToGps()),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {}
|
||||
, m_distanceOpsToGps(Settings::distanceOpsToGps()) {}
|
||||
|
||||
bool IsmHandler::init()
|
||||
{
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "main_handler.h"
|
||||
#include <utility>
|
||||
#include "settings.h"
|
||||
#include "logger.h"
|
||||
#include "WebSocketInterface/Messages/reply_message.h"
|
||||
@@ -31,9 +32,9 @@ namespace TrainingAreaBase
|
||||
|
||||
MainHandler::MainHandler(QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_ddsHandler(nullptr)
|
||||
, m_handlerWebSocket(nullptr)
|
||||
, m_logger(getLogger("MainHandler"))
|
||||
, m_ddsHandler(nullptr)
|
||||
, m_handlerWebSocket(nullptr)
|
||||
{}
|
||||
|
||||
MainHandler::~MainHandler()
|
||||
@@ -333,7 +334,7 @@ void MainHandler::onExerciseChanged(const ExerciseManagement::Exercise &data, Da
|
||||
m_txHandler->txData(exerciseStateData());
|
||||
|
||||
// update Interfaces
|
||||
for (const std::shared_ptr<Plugin::Interface> &ifc : qAsConst(m_interfaces))
|
||||
for (const std::shared_ptr<Plugin::Interface> &ifc : std::as_const(m_interfaces))
|
||||
ifc->exerciseChanged();
|
||||
}
|
||||
|
||||
@@ -392,7 +393,7 @@ void MainHandler::onDirectMessage(const QByteArray &jsonMessage)
|
||||
quint32 bitValue = 1U << it;
|
||||
QString name;
|
||||
QString isOk;
|
||||
for (const ProjectDataManagement::CanComponentString &ccs : qAsConst(m_ccsMap))
|
||||
for (const ProjectDataManagement::CanComponentString &ccs : std::as_const(m_ccsMap))
|
||||
{
|
||||
if (ccs.pdm_bitMask == bitValue)
|
||||
{
|
||||
@@ -436,7 +437,7 @@ void MainHandler::onDirectMessage(const QByteArray &jsonMessage)
|
||||
}
|
||||
|
||||
// componentErrors
|
||||
for (const auto &ele : qAsConst(biteError))
|
||||
for (const auto &ele : std::as_const(biteError))
|
||||
{
|
||||
QString text;
|
||||
QJsonObject error = ele.toObject();
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
|
||||
namespace TrainingAreaBase
|
||||
{
|
||||
PdmHandler::PdmHandler(MainHandler *mainHandler) : m_initialized(false)
|
||||
, m_mainHandler(mainHandler),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {}
|
||||
PdmHandler::PdmHandler(MainHandler *mainHandler) : m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger())
|
||||
, m_initialized(false)
|
||||
, m_mainHandler(mainHandler) {}
|
||||
|
||||
bool PdmHandler::init()
|
||||
{
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
using namespace TrainingAreaBase;
|
||||
|
||||
PositionHandler::PositionHandler(MainHandler *mainHandler) : QObject()
|
||||
, m_mainHandler(mainHandler),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {}
|
||||
, m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger())
|
||||
, m_mainHandler(mainHandler) {}
|
||||
|
||||
bool PositionHandler::init()
|
||||
{
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "recv_from_dds_fts.h"
|
||||
#include <utility>
|
||||
#include "main_handler.h"
|
||||
#include "ism_handler.h"
|
||||
#include "settings.h"
|
||||
@@ -51,10 +52,10 @@ RecvFromDdsFts::RecvFromDdsFts(MainHandler *mainHandler, const std::shared_ptr<I
|
||||
, Interface::Fts::SendExFireReadinessRequestHandler(ftsTab)
|
||||
, Interface::Fts::SendExFiredReportRequestHandler(ftsTab)
|
||||
, Interface::Fts::SendExConfirmationReportRequestHandler(ftsTab)
|
||||
, m_logger(getLogger("RecvFromDdsFts"))
|
||||
, m_mainHandler(mainHandler)
|
||||
, m_ftsTab(ftsTab)
|
||||
, m_txCallback(txCallback)
|
||||
, m_logger(getLogger("RecvFromDdsFts"))
|
||||
{
|
||||
m_categorieData = loadRemainEffectStructMap();
|
||||
}
|
||||
@@ -567,6 +568,8 @@ void RecvFromDdsFts::onSetDevicePowerRequest(const rti::core::SampleIdentity &co
|
||||
|
||||
void RecvFromDdsFts::onAdlerCalculateTrajectoryRequest(const rti::core::SampleIdentity &cookie, const AdlerCalculateTrajectoryRequest &request)
|
||||
{
|
||||
Q_UNUSED(cookie);
|
||||
Q_UNUSED(request);
|
||||
DEBUG_LOG(m_logger) << "onSendCalculateTrajectoryAdlerRequest";
|
||||
}
|
||||
|
||||
@@ -722,7 +725,7 @@ QMap<int, QVector<RecvFromDdsFts::RemainEffectStruct>> RecvFromDdsFts::loadRemai
|
||||
QVector<RemainEffectStruct> resVec;
|
||||
|
||||
QStringList keyList = obj.keys();
|
||||
for (const auto &key : qAsConst(keyList))
|
||||
for (const auto &key : std::as_const(keyList))
|
||||
{
|
||||
const auto &val = obj.value(key).toObject();
|
||||
|
||||
@@ -731,7 +734,7 @@ QMap<int, QVector<RecvFromDdsFts::RemainEffectStruct>> RecvFromDdsFts::loadRemai
|
||||
|
||||
QStringList x = val.keys();
|
||||
int i=0;
|
||||
for (const auto &resElement : qAsConst(x))
|
||||
for (const auto &resElement : std::as_const(x))
|
||||
{
|
||||
const auto val2 = val.value(resElement).toInt();
|
||||
|
||||
|
||||
+43
-42
@@ -241,7 +241,7 @@ bool get(const QJsonObject &obj, const QString &key, std::vector<unsigned char>
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, VulnerabilityState &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
|
||||
val = static_cast<VulnerabilityState>(iVal);
|
||||
@@ -253,7 +253,7 @@ bool get(const QJsonObject &obj, const QString &key, VulnerabilityState &val, bo
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, OriginatorType &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<OriginatorType>(iVal))
|
||||
{
|
||||
@@ -275,7 +275,7 @@ bool get(const QJsonObject &obj, const QString &key, OriginatorType &val, bool b
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, FunctionalAreaOperatingMode &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<FunctionalAreaOperatingMode>(iVal))
|
||||
{
|
||||
@@ -291,7 +291,7 @@ bool get(const QJsonObject &obj, const QString &key, FunctionalAreaOperatingMode
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, Language &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<Language>(iVal))
|
||||
{
|
||||
@@ -311,7 +311,7 @@ bool get(const QJsonObject &obj, const QString &key, Language &val, bool bOption
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, ParticipantLicenseState &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<ParticipantLicenseState>(iVal))
|
||||
{
|
||||
@@ -328,7 +328,7 @@ bool get(const QJsonObject &obj, const QString &key, ParticipantLicenseState &va
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, EquipmentConfigurationReport::MineHandgrenadeSensorMode &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<EquipmentConfigurationReport::MineHandgrenadeSensorMode>(iVal))
|
||||
{
|
||||
@@ -344,7 +344,7 @@ bool get(const QJsonObject &obj, const QString &key, EquipmentConfigurationRepor
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, EquipmentConfigurationReport::FirMode &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<EquipmentConfigurationReport::FirMode>(iVal))
|
||||
{
|
||||
@@ -360,7 +360,7 @@ bool get(const QJsonObject &obj, const QString &key, EquipmentConfigurationRepor
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, EquipmentConfigurationReport::MineLayerMode &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<EquipmentConfigurationReport::MineLayerMode>(iVal))
|
||||
{
|
||||
@@ -376,7 +376,7 @@ bool get(const QJsonObject &obj, const QString &key, EquipmentConfigurationRepor
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, EquipmentConfigurationReport::SpecialSensorStandardMode &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<EquipmentConfigurationReport::SpecialSensorStandardMode>(iVal))
|
||||
{
|
||||
@@ -394,7 +394,7 @@ bool get(const QJsonObject &obj, const QString &key, EquipmentConfigurationRepor
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, EquipmentConfigurationReport::AgdusHwMode &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<EquipmentConfigurationReport::AgdusHwMode>(iVal))
|
||||
{
|
||||
@@ -410,7 +410,7 @@ bool get(const QJsonObject &obj, const QString &key, EquipmentConfigurationRepor
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, EquipmentConfigurationReport::PositionUpdateInterval &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<EquipmentConfigurationReport::PositionUpdateInterval>(iVal))
|
||||
{
|
||||
@@ -426,7 +426,7 @@ bool get(const QJsonObject &obj, const QString &key, EquipmentConfigurationRepor
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, CtaDataError::Reason &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<CtaDataError::Reason>(iVal))
|
||||
{
|
||||
@@ -460,7 +460,7 @@ bool get(const QJsonObject &obj, const QString &key, CtaDataError::Reason &val,
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, CreateCContamination::Volatiliy &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<CreateCContamination::Volatiliy>(iVal))
|
||||
{
|
||||
@@ -475,7 +475,7 @@ bool get(const QJsonObject &obj, const QString &key, CreateCContamination::Volat
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, AreaEffectSimulationType &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<AreaEffectSimulationType>(iVal))
|
||||
{
|
||||
@@ -503,7 +503,7 @@ bool get(const QJsonObject &obj, const QString &key, AreaEffectSimulationType &v
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, IedType &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<IedType>(iVal))
|
||||
{
|
||||
@@ -519,7 +519,7 @@ bool get(const QJsonObject &obj, const QString &key, IedType &val, bool bOptiona
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, IedPairingState &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<IedPairingState>(iVal))
|
||||
{
|
||||
@@ -535,7 +535,7 @@ bool get(const QJsonObject &obj, const QString &key, IedPairingState &val, bool
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, IedTacticalState &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<IedTacticalState>(iVal))
|
||||
{
|
||||
@@ -557,7 +557,7 @@ bool get(const QJsonObject &obj, const QString &key, IedTacticalState &val, bool
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, IedError &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<IedError>(iVal))
|
||||
{
|
||||
@@ -572,7 +572,7 @@ bool get(const QJsonObject &obj, const QString &key, IedError &val, bool bOption
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, MinelayerThrowerData::ThrowingType &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<MinelayerThrowerData::ThrowingType>(iVal))
|
||||
{
|
||||
@@ -592,7 +592,7 @@ bool get(const QJsonObject &obj, const QString &key, MinelayerThrowerData::Throw
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, OpaquePayloadDataBase::Type &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<OpaquePayloadDataBase::Type>(iVal))
|
||||
{
|
||||
@@ -609,7 +609,7 @@ bool get(const QJsonObject &obj, const QString &key, OpaquePayloadDataBase::Type
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, TechnicalArea::Type &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<TechnicalArea::Type>(iVal))
|
||||
{
|
||||
@@ -628,7 +628,7 @@ bool get(const QJsonObject &obj, const QString &key, TechnicalArea::Type &val, b
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, ParticipantModeBase::OperationMode &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<ParticipantModeBase::OperationMode>(iVal))
|
||||
{
|
||||
@@ -644,7 +644,7 @@ bool get(const QJsonObject &obj, const QString &key, ParticipantModeBase::Operat
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, BiteReport::LoginType &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<BiteReport::LoginType>(iVal))
|
||||
{
|
||||
@@ -661,7 +661,7 @@ bool get(const QJsonObject &obj, const QString &key, BiteReport::LoginType &val,
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, ParticipantModeBase::WphMode &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<ParticipantModeBase::WphMode>(iVal))
|
||||
{
|
||||
@@ -677,7 +677,7 @@ bool get(const QJsonObject &obj, const QString &key, ParticipantModeBase::WphMod
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, ParticipantModeBase::PersonellProtection &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<ParticipantModeBase::PersonellProtection>(iVal))
|
||||
{
|
||||
@@ -694,7 +694,7 @@ bool get(const QJsonObject &obj, const QString &key, ParticipantModeBase::Person
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, ParticipantModeBase::ProtectionLevel &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<ParticipantModeBase::ProtectionLevel>(iVal))
|
||||
{
|
||||
@@ -713,7 +713,7 @@ bool get(const QJsonObject &obj, const QString &key, ParticipantModeBase::Protec
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, ParticipantModeBase::HandgrenadeSearchMode &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<ParticipantModeBase::HandgrenadeSearchMode>(iVal))
|
||||
{
|
||||
@@ -729,7 +729,7 @@ bool get(const QJsonObject &obj, const QString &key, ParticipantModeBase::Handgr
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, ParticipantModeBase::InternationalMode &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<ParticipantModeBase::InternationalMode>(iVal))
|
||||
{
|
||||
@@ -745,7 +745,7 @@ bool get(const QJsonObject &obj, const QString &key, ParticipantModeBase::Intern
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, ParticipantModeBase::ABCProtectionMode &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<ParticipantModeBase::ABCProtectionMode>(iVal))
|
||||
{
|
||||
@@ -761,7 +761,7 @@ bool get(const QJsonObject &obj, const QString &key, ParticipantModeBase::ABCPro
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, ParticipantConfigurationBase::FaultPositionHandling &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<ParticipantConfigurationBase::FaultPositionHandling>(iVal))
|
||||
{
|
||||
@@ -778,7 +778,7 @@ bool get(const QJsonObject &obj, const QString &key, ParticipantConfigurationBas
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, ParticipantConfigurationBase::SwitchingPositionIntervall &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<ParticipantConfigurationBase::SwitchingPositionIntervall>(iVal))
|
||||
{
|
||||
@@ -794,7 +794,7 @@ bool get(const QJsonObject &obj, const QString &key, ParticipantConfigurationBas
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, ParticipantConfigurationBase::OpticalCode &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<ParticipantConfigurationBase::OpticalCode>(iVal))
|
||||
{
|
||||
@@ -811,7 +811,7 @@ bool get(const QJsonObject &obj, const QString &key, ParticipantConfigurationBas
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, SanitationResult &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<SanitationResult>(iVal))
|
||||
{
|
||||
@@ -829,7 +829,7 @@ bool get(const QJsonObject &obj, const QString &key, SanitationResult &val, bool
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, SanitationEvaluation &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<SanitationEvaluation>(iVal))
|
||||
{
|
||||
@@ -846,7 +846,7 @@ bool get(const QJsonObject &obj, const QString &key, SanitationEvaluation &val,
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, Qualification &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<Qualification>(iVal))
|
||||
{
|
||||
@@ -863,7 +863,7 @@ bool get(const QJsonObject &obj, const QString &key, Qualification &val, bool bO
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, SanitationRepair::TreatmentResult &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<SanitationRepair::TreatmentResult>(iVal))
|
||||
{
|
||||
@@ -880,7 +880,7 @@ bool get(const QJsonObject &obj, const QString &key, SanitationRepair::Treatment
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, ExerciseStateData::ExerciseState &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<ExerciseStateData::ExerciseState>(iVal))
|
||||
{
|
||||
@@ -899,7 +899,7 @@ bool get(const QJsonObject &obj, const QString &key, ExerciseStateData::Exercise
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, ServiceControlEnum &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<ServiceControlEnum>(iVal))
|
||||
{
|
||||
@@ -916,7 +916,7 @@ bool get(const QJsonObject &obj, const QString &key, ServiceControlEnum &val, bo
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, PowerMethod &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<PowerMethod>(iVal))
|
||||
{
|
||||
@@ -933,7 +933,7 @@ bool get(const QJsonObject &obj, const QString &key, PowerMethod &val, bool bOpt
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, UAVActionTask &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<UAVActionTask>(iVal))
|
||||
{
|
||||
@@ -944,6 +944,7 @@ bool get(const QJsonObject &obj, const QString &key, UAVActionTask &val, bool bO
|
||||
case UAVActionTask::Connect:
|
||||
case UAVActionTask::Loiter:
|
||||
case UAVActionTask::Return:
|
||||
case UAVActionTask::Observe:
|
||||
val = static_cast<UAVActionTask>(iVal);
|
||||
return true;
|
||||
}
|
||||
@@ -953,7 +954,7 @@ bool get(const QJsonObject &obj, const QString &key, UAVActionTask &val, bool bO
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, UAVRadioLinkConnectionStatusType &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<UAVRadioLinkConnectionStatusType>(iVal))
|
||||
{
|
||||
@@ -972,7 +973,7 @@ bool get(const QJsonObject &obj, const QString &key, UAVRadioLinkConnectionStatu
|
||||
template <>
|
||||
bool get(const QJsonObject &obj, const QString &key, UAVState &val, bool bOptional)
|
||||
{
|
||||
int iVal;
|
||||
int iVal = 0;
|
||||
get(obj, key, iVal, bOptional);
|
||||
switch (static_cast<UAVState>(iVal))
|
||||
{
|
||||
|
||||
@@ -14,11 +14,11 @@
|
||||
namespace TrainingAreaBaseOC
|
||||
{
|
||||
|
||||
TxDdlHandler::TxDdlHandler() : m_state(DdlState::NotStarted)
|
||||
TxDdlHandler::TxDdlHandler() : m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger())
|
||||
, m_state(DdlState::NotStarted)
|
||||
, m_segmentToggle(0)
|
||||
, m_sentCnt(0)
|
||||
, m_responseTimer(new QTimer(this)),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {
|
||||
, m_responseTimer(new QTimer(this)) {
|
||||
m_responseTimer->setInterval(1000);
|
||||
m_responseTimer->setSingleShot(true);
|
||||
connect(m_responseTimer, &QTimer::timeout, this, &TxDdlHandler::sendAbortOrRestartTimeout);
|
||||
|
||||
+3
-3
@@ -12,9 +12,9 @@
|
||||
namespace TrainingAreaBaseOC
|
||||
{
|
||||
|
||||
ConnectionHandlerSerial::ConnectionHandlerSerial() : m_spQuerry(new LtsSerialPortQuerry::LtsSerialPortQuerry(this))
|
||||
, m_receiveTimeoutTimer(new QTimer(this)),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {
|
||||
ConnectionHandlerSerial::ConnectionHandlerSerial() : m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger())
|
||||
, m_spQuerry(new LtsSerialPortQuerry::LtsSerialPortQuerry(this))
|
||||
, m_receiveTimeoutTimer(new QTimer(this)) {
|
||||
connect(m_spQuerry, &LtsSerialPortQuerry::LtsSerialPortQuerry::connectionEstablished, this, &ConnectionHandlerSerial::open);
|
||||
m_spQuerry->restartQuerry();
|
||||
m_receiveTimeoutTimer->setInterval(5000);
|
||||
|
||||
+2
-2
@@ -12,8 +12,8 @@
|
||||
namespace TrainingAreaBaseOC
|
||||
{
|
||||
|
||||
ConnectionHandlerTcp::ConnectionHandlerTcp() : m_timer(new QTimer(this)),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {
|
||||
ConnectionHandlerTcp::ConnectionHandlerTcp() : m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger())
|
||||
, m_timer(new QTimer(this)) {
|
||||
m_timer->setInterval(5000);
|
||||
connect(m_timer, &QTimer::timeout, this, &ConnectionHandlerTcp::open);
|
||||
}
|
||||
|
||||
+3
-3
@@ -15,14 +15,14 @@ using namespace NGL;
|
||||
|
||||
namespace TrainingAreaBaseOC
|
||||
{
|
||||
ConnectionHandlerTcpTtci::ConnectionHandlerTcpTtci() : m_messageDataStart(true)
|
||||
ConnectionHandlerTcpTtci::ConnectionHandlerTcpTtci() : m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger())
|
||||
, m_messageDataStart(true)
|
||||
, m_wirkfeldDataStart(true)
|
||||
, m_wirkfeldMultiplex(0)
|
||||
, m_sendingData(false)
|
||||
, m_segmentToggle(0)
|
||||
, m_canDevice(new Device(this))
|
||||
, m_canChannel(new Channel(QLatin1Char('@'), true, this)),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {
|
||||
, m_canChannel(new Channel(QLatin1Char('@'), true, this)) {
|
||||
connect(m_canChannel, &Channel::dataAvailable, this, &ConnectionHandlerTcpTtci::slotReadCanFrame);
|
||||
connect(m_canChannel, &Channel::disconnectedFromEq, this, &ConnectionHandlerTcpTtci::disconnectedFromEq);
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ namespace TrainingAreaBaseOC
|
||||
|
||||
MainHandler::MainHandler(QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_logger(getLogger("MainHandler"))
|
||||
, m_aesDtc(nullptr)
|
||||
, m_aesFtc(nullptr)
|
||||
, m_pdmDtc(nullptr)
|
||||
@@ -25,7 +26,6 @@ MainHandler::MainHandler(QObject *parent)
|
||||
, m_rxHandler(nullptr)
|
||||
, m_ftsHandler(nullptr)
|
||||
, m_websocketHandler(nullptr)
|
||||
, m_logger(getLogger("MainHandler"))
|
||||
{}
|
||||
|
||||
MainHandler::~MainHandler()
|
||||
|
||||
@@ -16,10 +16,10 @@ RecvFromDdsFts::RecvFromDdsFts(MainHandler *mainHandler)
|
||||
, Interface::Fts::SendTechnicalStateOcRequestHandler(mainHandler->dds()->ftsTaboc())
|
||||
, TrainingAreaBase::Interface::Fts::SendOcDataRequestHandler(mainHandler->dds()->ftsTab())
|
||||
, TrainingAreaBase::Interface::Fts::SendFireSmokeMarkerDataRequestHandler(mainHandler->dds()->ftsTab())
|
||||
, m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger())
|
||||
, m_ftsTaboc(mainHandler->dds()->ftsTaboc())
|
||||
, m_ftsTab(mainHandler->dds()->ftsTab())
|
||||
, m_txCallback(mainHandler->txHandler())
|
||||
, m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger())
|
||||
{}
|
||||
|
||||
void RecvFromDdsFts::onDemandCyclicPositionsRequest(const rti::core::SampleIdentity &cookie, const DemandCyclicPositionsRequest &request)
|
||||
|
||||
@@ -12,11 +12,11 @@
|
||||
namespace TrainingAreaBaseOC
|
||||
{
|
||||
|
||||
SendToDds::SendToDds(MainHandler *mainHandler) : m_dtsTaboc(mainHandler->dds()->dtsTaboc())
|
||||
SendToDds::SendToDds(MainHandler *mainHandler) : m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger())
|
||||
, m_dtsTaboc(mainHandler->dds()->dtsTaboc())
|
||||
, m_dtsTab(mainHandler->dds()->dtsTab())
|
||||
, m_utmCoord(LtsCoordTrans::UtmCoordinate())
|
||||
, m_idToSend(1),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {}
|
||||
, m_idToSend(1) {}
|
||||
|
||||
void SendToDds::rxData(const OcTelegrams::Display &inData)
|
||||
{
|
||||
|
||||
@@ -10,10 +10,10 @@ namespace TrainingAreaBaseOC
|
||||
{
|
||||
|
||||
Channel::Channel(QChar channel, bool bIsBinary, QObject *parent) : QObject(parent)
|
||||
, m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger().getNGLLogger("SCTT.Channel"))
|
||||
, m_channel(channel)
|
||||
, m_bIsBinary(bIsBinary)
|
||||
, m_device(nullptr)
|
||||
, m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger().getNGLLogger("SCTT.Channel")) {}
|
||||
, m_device(nullptr) {}
|
||||
|
||||
void Channel::setDevice(Device *dev)
|
||||
{
|
||||
|
||||
@@ -11,12 +11,12 @@
|
||||
namespace TrainingAreaBaseOC
|
||||
{
|
||||
Device::Device(QObject *parent, bool tcpMode) : QObject(parent)
|
||||
, m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger().getNGLLogger("TTCI.Device"))
|
||||
, m_spQuerry(new LtsSerialPortQuerry::LtsSerialPortQuerry(this))
|
||||
, m_socket(new QTcpSocket(this))
|
||||
, m_restartTimer(new QTimer(this))
|
||||
, m_receiveTimeoutTimer(new QTimer(this))
|
||||
, m_tcpMode(tcpMode)
|
||||
, m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger().getNGLLogger("TTCI.Device")) {
|
||||
, m_tcpMode(tcpMode) {
|
||||
connect(m_spQuerry, &LtsSerialPortQuerry::LtsSerialPortQuerry::connectionEstablished, this, &Device::open);
|
||||
m_spQuerry->restartQuerry();
|
||||
|
||||
|
||||
@@ -146,7 +146,7 @@ void DataManager::openWebSocket()
|
||||
this, &DataManager::newTextMessageFromClient);
|
||||
|
||||
m_clientConnection->init();
|
||||
connect(wsSocket, QOverload<QAbstractSocket::SocketError>::of(&QWebSocket::error),
|
||||
connect(wsSocket, &QWebSocket::errorOccurred,
|
||||
this, &DataManager::onWebSocketError);
|
||||
connect(wsSocket, &QWebSocket::connected,
|
||||
this, &DataManager::onWebSocketConnected);
|
||||
|
||||
@@ -14,8 +14,8 @@ namespace WarehouseManagement
|
||||
{
|
||||
|
||||
DdsHandler::DdsHandler(int domainId)
|
||||
: m_ddsConnector(new DDSConnector::DdsConnector(domainId, IDL::PartitionType::Global, 0))
|
||||
, m_logger(getLogger("DdsHandler"))
|
||||
: m_logger(getLogger("DdsHandler"))
|
||||
, m_ddsConnector(new DDSConnector::DdsConnector(domainId, IDL::PartitionType::Global, 0))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "DdsHandler(" << domainId << ") for partition: " << m_ddsConnector->getDefaultPartition();
|
||||
}
|
||||
|
||||
+2
-2
@@ -15,8 +15,8 @@ namespace WarehouseManagement
|
||||
{
|
||||
|
||||
DdsHandlerExercise::DdsHandlerExercise(const dds::domain::DomainParticipant &dp, int exerciseId)
|
||||
: m_ddsConnector(new DDSConnector::DdsConnector(dp, IDL::PartitionType::Exercise, exerciseId))
|
||||
, m_logger(getLogger("DdsHandlerExercise"))
|
||||
: m_logger(getLogger("DdsHandlerExercise"))
|
||||
, m_ddsConnector(new DDSConnector::DdsConnector(dp, IDL::PartitionType::Exercise, exerciseId))
|
||||
{
|
||||
m_ddsConnector->setDomainParticipant(dp);
|
||||
DEBUG_LOG(m_logger) << "DdsHandlerExercise for partition: " << m_ddsConnector->getDefaultPartition();
|
||||
|
||||
+2
-2
@@ -10,10 +10,10 @@ using namespace WarehouseManagement;
|
||||
ExerciseParticipantHandler::ExerciseParticipantHandler(const dds::domain::DomainParticipant &domainParticipant,
|
||||
int exerciseId,
|
||||
ExercisesHandler *exercisesHandler)
|
||||
: m_exerciseId(exerciseId)
|
||||
: m_logger(getLogger(QLatin1String("ExerciseParticipantHandler.") + QString::number(exerciseId)))
|
||||
, m_exerciseId(exerciseId)
|
||||
, m_ddsHandlerExercise(new DdsHandlerExercise(domainParticipant, exerciseId))
|
||||
, m_exercisesHandler(exercisesHandler)
|
||||
, m_logger(getLogger(QLatin1String("ExerciseParticipantHandler.") + QString::number(exerciseId)))
|
||||
{}
|
||||
|
||||
ExerciseParticipantHandler::~ExerciseParticipantHandler()
|
||||
|
||||
@@ -14,8 +14,8 @@ namespace WirelessLocationSystem
|
||||
{
|
||||
|
||||
DdsHandler::DdsHandler(int domainId, int exerciseId)
|
||||
: m_ddsConnector(new DDSConnector::DdsConnector(domainId, IDL::PartitionType::Global, exerciseId))
|
||||
, m_logger(getLogger("DdsHandler"))
|
||||
: m_logger(getLogger("DdsHandler"))
|
||||
, m_ddsConnector(new DDSConnector::DdsConnector(domainId, IDL::PartitionType::Global, exerciseId))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "DdsHandler(" << domainId << ") for partition: " << m_ddsConnector->getDefaultPartition();
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ bool sendBinarySfmData(const QByteArray &ba, int sendCounter)
|
||||
|
||||
if (!WlsParticipant::calcChunkCountAndLen(ba, chunkCount, chunkLen))
|
||||
{
|
||||
fprintf(stderr, "Chunk count is not ok - data size: %d\n", ba.size());
|
||||
fprintf(stderr, "Chunk count is not ok - data size: %d\n", (int)ba.size());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ bool sendBinarySfmData(const QByteArray &ba, int sendCounter)
|
||||
SfmMsgTetra_rx rx;
|
||||
rx.setPayload(tx.getPayload());
|
||||
fprintf(stdout, "Output: len: %d(%d), %s, sendCounter: %d(0x%02x), is fragmented: %d, fragment: %d/%d\n",
|
||||
payload.size(), tx.getPayload().size(), payload.data(),
|
||||
(int)payload.size(), (int)tx.getPayload().size(), payload.data(),
|
||||
rx.sendCounter(), rx.sendCounter(), rx.isFragmented(), rx.fragmentNumber(), rx.fragmentCount());
|
||||
|
||||
++sendCounter;
|
||||
@@ -75,12 +75,12 @@ static int checkData(const QByteArray &data)
|
||||
try
|
||||
{
|
||||
const auto msg = LtsUtils::byteStreamToSfmMessage(ba);
|
||||
fprintf(stdout, "Message payload: len: %d, %s\n", msg.payload().size(), msg.payload().toHex().data());
|
||||
fprintf(stdout, "Message payload: len: %d, %s\n", (int)msg.payload().size(), msg.payload().toHex().data());
|
||||
if (msg.id() == int(SfmMessage::MsgId::TetraMessage))
|
||||
{
|
||||
WirelessLocationSystem::SfmMsgTetra_rx rx;
|
||||
rx.setPayload(msg.payload());
|
||||
fprintf(stdout, "SfmMsgTetra payload: len: %d, %s, ", rx.payload().size(), rx.payload().toHex().data());
|
||||
fprintf(stdout, "SfmMsgTetra payload: len: %d, %s, ", (int)rx.payload().size(), rx.payload().toHex().data());
|
||||
fprintf(stdout, "sendCounter: %d(0x%02x), is fragmented: %d, fragment: %d/%d\n",
|
||||
rx.sendCounter(), rx.sendCounter(), rx.isFragmented(), rx.fragmentNumber(), rx.fragmentCount());
|
||||
sendBinarySfmData(rx.payload(), 0x02);
|
||||
|
||||
@@ -15,8 +15,8 @@ namespace WirelessLocationSystem
|
||||
|
||||
MainHandler::MainHandler(QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_ddsHandler(nullptr)
|
||||
, m_logger(getLogger("MainHandler"))
|
||||
, m_ddsHandler(nullptr)
|
||||
{}
|
||||
|
||||
MainHandler::~MainHandler()
|
||||
|
||||
+2
-2
@@ -24,9 +24,9 @@ namespace WirelessLocationSystem
|
||||
const char *exerciseIdProperty = "exerciseId";
|
||||
|
||||
WebSocketHandler::WebSocketHandler(QObject *parent) : QObject(parent)
|
||||
, m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger())
|
||||
, m_webSocketServer(new QWebSocketServer(QStringLiteral("WLS"), QWebSocketServer::NonSecureMode, this))
|
||||
, m_basePoint(LtsCoordTrans::UtmCoordinate::fromMgrs(Settings::wlsMgrsBasePoint())),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {}
|
||||
, m_basePoint(LtsCoordTrans::UtmCoordinate::fromMgrs(Settings::wlsMgrsBasePoint())) {}
|
||||
|
||||
WebSocketHandler::~WebSocketHandler()
|
||||
{}
|
||||
|
||||
+2
-2
@@ -17,8 +17,8 @@ static constexpr int s_maxWlsRetryCount = 3;
|
||||
namespace WirelessLocationSystem
|
||||
{
|
||||
WlsParticipant::WlsParticipant(QObject *parent) : QObject(parent)
|
||||
, m_wlsTeleTimeoutTimer(new QTimer(this)),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {
|
||||
, m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger())
|
||||
, m_wlsTeleTimeoutTimer(new QTimer(this)) {
|
||||
m_wlsTeleTimeoutTimer->setSingleShot(true);
|
||||
m_wlsTeleTimeoutTimer->setTimerType(Qt::VeryCoarseTimer);
|
||||
m_wlsTeleTimeoutTimer->setInterval(s_dataCommunicationAliveTimeout);
|
||||
|
||||
Loaded 100 of 316 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user