Adds immediate migration results
This commit is contained in:
2395 files changed
+357322
-2524
No files matched your search
+6
-6
@@ -242,9 +242,9 @@ NGL_WRAP_UI(tln_event_timeline_gui_SRCS
|
||||
|
||||
NGL_ADD_LIBRARY(WS TlnEventTimelineGuiPlugin MODULE ${tln_event_timeline_gui_SRCS})
|
||||
NGL_TARGET_LINK_LIBRARIES(TlnEventTimelineGuiPlugin
|
||||
Qt5::Widgets
|
||||
Qt5::WebSockets
|
||||
Qt5::Concurrent
|
||||
Qt6::Widgets
|
||||
Qt6::WebSockets
|
||||
Qt6::Concurrent
|
||||
LtsAppManager
|
||||
LtsPluginManager
|
||||
LtsDataView
|
||||
@@ -291,9 +291,9 @@ NGL_INSTALL_TARGET(TlnEventTimelineGuiPlugin)
|
||||
# LtsTimeline
|
||||
# nglapplication
|
||||
# NGLLogger
|
||||
# Qt5::Core
|
||||
# Qt5::Gui
|
||||
# Qt5::Widgets
|
||||
# Qt6::Core
|
||||
# Qt6::Gui
|
||||
# Qt6::Widgets
|
||||
|
||||
# ngltools # get settings from file
|
||||
# ngldb
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
#include "tln_camera_video_filter.h"
|
||||
#include <utility>
|
||||
#include "tln_camera_video_event_factory.h"
|
||||
#include "../../logger.h"
|
||||
|
||||
@@ -456,7 +457,7 @@ void CameraVideoFilter::onMainStructureElementChanged(const InfrastructureManage
|
||||
|
||||
bool inExercise = false;
|
||||
const QJsonArray &arr = doc.object().value(QLatin1String("available_in_exercise")).toArray();
|
||||
for (const QJsonValue &value : qAsConst(arr))
|
||||
for (const QJsonValue &value : std::as_const(arr))
|
||||
{
|
||||
if (!value.isDouble())
|
||||
continue;
|
||||
|
||||
+3
-2
@@ -1,4 +1,5 @@
|
||||
#include "tln_hit_building_filter.h"
|
||||
#include <utility>
|
||||
#include "tln_hit_building_event_factory.h"
|
||||
#include "../../logger.h"
|
||||
|
||||
@@ -386,7 +387,7 @@ void HitBuildingFilter::onMainStructureElementChanged(const InfrastructureManage
|
||||
|
||||
bool inExercise = false;
|
||||
const QJsonArray &arr = doc.object().value(QLatin1String("available_in_exercise")).toArray();
|
||||
for (const QJsonValue &value : qAsConst(arr))
|
||||
for (const QJsonValue &value : std::as_const(arr))
|
||||
{
|
||||
if (!value.isDouble())
|
||||
continue;
|
||||
@@ -407,7 +408,7 @@ void HitBuildingFilter::onMainStructureElementChanged(const InfrastructureManage
|
||||
|
||||
|
||||
bool isOutdoor = true;
|
||||
for (const InfrastructureManagement::StructureElement &structureElement : qAsConst(data.elements()))
|
||||
for (const InfrastructureManagement::StructureElement &structureElement : std::as_const(data.elements()))
|
||||
{
|
||||
if (structureElement.mountingPointTypeId() != InfrastructureManagement::MountingPointType_def::OutdoorCamera)
|
||||
{
|
||||
|
||||
+4
-3
@@ -1,4 +1,5 @@
|
||||
#include "tln_filter_attribute.h"
|
||||
#include <utility>
|
||||
|
||||
#include <LtsWidgets/lts_spinbox.h>
|
||||
#include <LtsWidgets/lts_date_time_edit.h>
|
||||
@@ -122,7 +123,7 @@ bool FilterAttribute::check(const QVariant &value) const
|
||||
if (!bOk)
|
||||
return false;
|
||||
|
||||
for (const QVariant &range : qAsConst(m_values))
|
||||
for (const QVariant &range : std::as_const(m_values))
|
||||
{
|
||||
const QVariantList &list = range.toList();
|
||||
if (list.first().toInt() <= intValue && intValue <= list.last().toInt())
|
||||
@@ -138,7 +139,7 @@ bool FilterAttribute::check(const QVariant &value) const
|
||||
if (!bOk)
|
||||
return false;
|
||||
|
||||
for (const QVariant &range : qAsConst(m_values))
|
||||
for (const QVariant &range : std::as_const(m_values))
|
||||
{
|
||||
const QVariantList &list = range.toList();
|
||||
if (list.first().toLongLong() <= intValue && intValue <= list.last().toLongLong())
|
||||
@@ -294,7 +295,7 @@ QStringList FilterAttribute::toStringList() const
|
||||
{
|
||||
bool bOk;
|
||||
QStringList ret;
|
||||
for (QVariant value : qAsConst(m_values))
|
||||
for (QVariant value : std::as_const(m_values))
|
||||
{
|
||||
switch (m_type)
|
||||
{
|
||||
|
||||
+5
-4
@@ -1,5 +1,6 @@
|
||||
#include "tln_filter_model.h"
|
||||
#include "EventTypes/BiteMessage/tln_bite_message_item.h"
|
||||
#include <utility>
|
||||
#include "EventTypes/Block/tln_block_item.h"
|
||||
#include "EventTypes/CameraVideo/tln_camera_video_item.h"
|
||||
#include "EventTypes/CrossBorderline/tln_cross_borderline_item.h"
|
||||
@@ -473,13 +474,13 @@ QByteArray FilterModel::modelToJson()
|
||||
for (auto itFilter = m_filter.constBegin(); itFilter != m_filter.constEnd(); ++itFilter)
|
||||
{
|
||||
QStringList attributeNames = filterPtr->attributeNames();
|
||||
for (const QString &attributeName : qAsConst(attributeNames))
|
||||
for (const QString &attributeName : std::as_const(attributeNames))
|
||||
{
|
||||
QJsonObject attributeObject;
|
||||
const FilterAttribute attribute = filterPtr->attribute(attributeName);
|
||||
QVariantList varList = attribute.values();
|
||||
QJsonArray jsEventValues;
|
||||
for (const QVariant &value: qAsConst(varList))
|
||||
for (const QVariant &value: std::as_const(varList))
|
||||
{
|
||||
QList<QVariant> range;
|
||||
QJsonArray jsRangeValues;
|
||||
@@ -538,7 +539,7 @@ bool FilterModel::jsonToTimelineFilter(const QByteArray &content)
|
||||
return false;
|
||||
}
|
||||
|
||||
for (const QJsonValue &jsValue: qAsConst(contentObject))
|
||||
for (const QJsonValue &jsValue: std::as_const(contentObject))
|
||||
{
|
||||
QJsonObject obj = jsValue.toObject();
|
||||
EventType eventType = static_cast<EventType>(obj.value(QStringLiteral("evType")).toInt());
|
||||
@@ -554,7 +555,7 @@ bool FilterModel::jsonToTimelineFilter(const QByteArray &content)
|
||||
|
||||
filterPtr->clearAttributeValues(attributeName);
|
||||
QVariantList valueList = jsValueArray.toVariantList();
|
||||
for (const QVariant &variant: qAsConst(valueList))
|
||||
for (const QVariant &variant: std::as_const(valueList))
|
||||
filterPtr->insertAttributeValue(attributeName, variant);
|
||||
filterPtr->setActive(obj.value(QStringLiteral("attributeActive")).toBool());
|
||||
}
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
#include "tln_timeline_delegate.h"
|
||||
#include <utility>
|
||||
#include "tln_timeline_model.h"
|
||||
|
||||
#include <LtsTimeline/timeline_view.h>
|
||||
@@ -69,7 +70,7 @@ void TimelineDelegate::paint(QPainter *painter, const QStyleOptionViewItem &opti
|
||||
|
||||
|
||||
painter->setPen(QGuiApplication::palette().color(QPalette::Text));
|
||||
for (const LtsTimeline::Tick &tick : qAsConst(m_view->header()->majorTicks()))
|
||||
for (const LtsTimeline::Tick &tick : std::as_const(m_view->header()->majorTicks()))
|
||||
painter->drawLine(tick.pos, option.rect.top(), tick.pos, option.rect.bottom());
|
||||
|
||||
int top = option.rect.y();
|
||||
|
||||
+5
-4
@@ -1,4 +1,5 @@
|
||||
#include "tln_timeline_dialog.h"
|
||||
#include <utility>
|
||||
#include "logger.h"
|
||||
#include "tln_abstract_participant_event_item.h"
|
||||
#include "tln_filter_dialog.h"
|
||||
@@ -646,7 +647,7 @@ void TimelineDialog::openItemListDialog(const QVector<int> &itemIds)
|
||||
{
|
||||
EventItemPtrs items;
|
||||
items.reserve(itemIds.size());
|
||||
for (int itemId : qAsConst(itemIds))
|
||||
for (int itemId : std::as_const(itemIds))
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -984,7 +985,7 @@ void TimelineDialog::onShowItemsForEvents(EventTypes eventTypes)
|
||||
QVector<AbstractEventFilter *> filters;
|
||||
filters.reserve(eventTypes.size());
|
||||
|
||||
for (EventType eventType : qAsConst(eventTypes))
|
||||
for (EventType eventType : std::as_const(eventTypes))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "onShowItemsForFilters: EventType = " << QString::number(eventType);
|
||||
if (m_model->filters().contains(eventType))
|
||||
@@ -1139,7 +1140,7 @@ void TimelineDialog::onItemsSelected(const QVector<int> &itemIds)
|
||||
qCritical() << "PPPPPP inner itemSize" << blItem.items().size();
|
||||
prts.reserve(blItem.items().size());
|
||||
|
||||
for (const ItemPtr &itemPtr : qAsConst(static_cast<const BlockItem &>(blItem).items()))
|
||||
for (const ItemPtr &itemPtr : std::as_const(static_cast<const BlockItem &>(blItem).items()))
|
||||
{
|
||||
const AbstractEventItem &internalItem = static_cast<const AbstractEventItem &>(*itemPtr.get());
|
||||
prts.push_back(m_model->eventFactory(internalItem.type())->copyItem(internalItem));
|
||||
@@ -1180,7 +1181,7 @@ void TimelineDialog::onItemsSelected(const QVector<int> &itemIds)
|
||||
}
|
||||
|
||||
|
||||
for (const ItemPtr &itemPtr : qAsConst(static_cast<const BlockItem &>(item).items()))
|
||||
for (const ItemPtr &itemPtr : std::as_const(static_cast<const BlockItem &>(item).items()))
|
||||
{
|
||||
const AbstractEventItem &internalItem = static_cast<const AbstractEventItem &>(*itemPtr.get());
|
||||
|
||||
|
||||
+7
-6
@@ -1,6 +1,7 @@
|
||||
|
||||
|
||||
#include "tln_timeline_model.h"
|
||||
#include <utility>
|
||||
#include "tln_timeline_delegate.h"
|
||||
#include "tln_timeline_dialog.h"
|
||||
#include "logger.h"
|
||||
@@ -385,7 +386,7 @@ void TimelineModel::addParticipantTrack(Participant &participant, int superiorTr
|
||||
participant.trackId = trackId;
|
||||
m_modelState.participantTracks.insert(participant.participantId, trackId);
|
||||
|
||||
for (int id : qAsConst(participant.inferiorIds))
|
||||
for (int id : std::as_const(participant.inferiorIds))
|
||||
{
|
||||
addParticipantTrack(m_modelState.participants[id], trackId);
|
||||
}
|
||||
@@ -449,7 +450,7 @@ void TimelineModel::getParticipantTracks()
|
||||
m_ppmDtc->participants(cb);
|
||||
|
||||
|
||||
for (int superiorId : qAsConst(superiorIds))
|
||||
for (int superiorId : std::as_const(superiorIds))
|
||||
{
|
||||
Participant &superior = m_modelState.participants[superiorId];
|
||||
auto it = m_modelState.partys.constFind(superior.partyId);
|
||||
@@ -846,7 +847,7 @@ bool TimelineModel::isBlockItem(int itemId) const
|
||||
|
||||
bool TimelineModel::hasBlockItems(const QVector<int> &itemIds) const
|
||||
{
|
||||
for (int itemId : qAsConst(itemIds))
|
||||
for (int itemId : std::as_const(itemIds))
|
||||
if (isBlockItem(itemId))
|
||||
return true;
|
||||
return false;
|
||||
@@ -1867,7 +1868,7 @@ void TimelineModel::insertItem(Track &t, ItemPtr &&itemPtr) noexcept(false)
|
||||
BlockItem &blockItem = static_cast<BlockItem &>(item(blockItemId));
|
||||
ids.erase(ids.begin());
|
||||
|
||||
for (int id : qAsConst(ids))
|
||||
for (int id : std::as_const(ids))
|
||||
{
|
||||
auto it = m_itemCache.find(id);
|
||||
if (it == m_itemCache.end())
|
||||
@@ -2092,7 +2093,7 @@ void TimelineModel::getBuildings()
|
||||
|
||||
|
||||
int mappingCounter = 0;
|
||||
for (const InfrastructureManagement::StructureElement &se : qAsConst(mse.elements()))
|
||||
for (const InfrastructureManagement::StructureElement &se : std::as_const(mse.elements()))
|
||||
{
|
||||
if (se.structureElementTypeId() != InfrastructureManagement::StructureElementType_def::MountingPoint
|
||||
&& se.mountingPointTypeId() != InfrastructureManagement::MountingPointType_def::OutdoorCamera
|
||||
@@ -2715,7 +2716,7 @@ void TimelineModel::onFilterChanged()
|
||||
|
||||
m_filterString.clear();
|
||||
QStringList conditionStrings;
|
||||
for (const AbstractEventFilter *filter : qAsConst(m_filter))
|
||||
for (const AbstractEventFilter *filter : std::as_const(m_filter))
|
||||
{
|
||||
if (!filter->isActive())
|
||||
continue;
|
||||
|
||||
+3
-2
@@ -1,4 +1,5 @@
|
||||
#include "tln_timeline_select_handler.h"
|
||||
#include <utility>
|
||||
#include "tln_abstract_event_item.h"
|
||||
#include "tln_participant_track.h"
|
||||
#include "tln_timeline_delegate.h"
|
||||
@@ -272,7 +273,7 @@ int TimelineSelectHandler::itemIdAt(const LtsTimeline::Track &track, int x) cons
|
||||
{
|
||||
try
|
||||
{
|
||||
for (const ItemPtr &itemPtr : qAsConst(track.items()))
|
||||
for (const ItemPtr &itemPtr : std::as_const(track.items()))
|
||||
{
|
||||
const int xItem = m_view->toPixel(itemPtr->startTime());
|
||||
if (xItem <= x && x <= xItem + TimelineDelegate::s_zeroDurationItemWidth)
|
||||
@@ -288,7 +289,7 @@ int TimelineSelectHandler::itemIdAt(const LtsTimeline::Track &track, int x) cons
|
||||
try
|
||||
{
|
||||
const int minDuration = m_model->m_zeroDurationItemWidthTime;
|
||||
for (const ItemPtr &itemPtr : qAsConst(track.items()))
|
||||
for (const ItemPtr &itemPtr : std::as_const(track.items()))
|
||||
{
|
||||
if (itemPtr->duration() == -1 && itemPtr->startTime() >= time)
|
||||
return itemPtr->id();
|
||||
|
||||
Reference in new issue
Block a user