Adds immediate migration results
This commit is contained in:
2395 files changed
+357322
-2524
No files matched your search
@@ -3,3 +3,4 @@
|
||||
*~
|
||||
build
|
||||
**/build_*/
|
||||
qt6-after/qt6-migrated-legatus/build[0-9]*/
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
/home/torsten/swy/sandbox/external
|
||||
@@ -64,6 +64,16 @@ IF(CMAKE_VERSION VERSION_GREATER 3.15.9)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
# Qt6 Migration: Options to disable modules with missing dependencies (WebEngine, XmlPatterns, ArcGIS)
|
||||
# These can be enabled once the required system dependencies are available in the build environment
|
||||
OPTION(BUILD_PLUGINS_PLANEDITOR "Build PlanEditor plugin (requires Qt6 WebEngine + ArcGIS SDK)" OFF)
|
||||
OPTION(BUILD_PLUGINS_ONLINEHELP "Build OnlineHelp plugin (requires Qt6 WebEngine)" OFF)
|
||||
OPTION(BUILD_PLUGINS_SERVICEMONITOR "Build ServiceMonitor plugin (requires Qt6 WebEngine)" OFF)
|
||||
OPTION(BUILD_PLUGINS_PARTICIPANT_ORG_CHART "Build ParticipantOrgChart (requires Qt6 WebEngine)" OFF)
|
||||
OPTION(BUILD_PLUGINS_MSDL "Build MSDL module (requires Qt6 XmlPatterns)" OFF)
|
||||
OPTION(BUILD_PLUGINS_SAAB "Build Saab module (requires Qt6 XmlPatterns)" OFF)
|
||||
OPTION(BUILD_RTI "Build RTI Connext DDS dependent modules" OFF)
|
||||
|
||||
IF(WIN32)
|
||||
SET(EXTERNAL_LIBRARY_DIR "C:/Development/Projekte/SituationMap/ExtFw" CACHE STRING "Library dir with all external dependencies")
|
||||
LIST(APPEND CMAKE_PREFIX_PATH "${EXTERNAL_LIBRARY_DIR}")
|
||||
@@ -72,6 +82,8 @@ ENDIF()
|
||||
|
||||
ENABLE_TESTING()
|
||||
INCLUDE(CTest)
|
||||
# Add migration tests
|
||||
ADD_SUBDIRECTORY(tests)
|
||||
CONFIGURE_FILE(CTestCustom.ctest ${CMAKE_BINARY_DIR}/CTestCustom.ctest COPYONLY)
|
||||
CONFIGURE_FILE(lts-cc.conf ${CMAKE_BINARY_DIR}/lts-cc.conf.distrib COPYONLY)
|
||||
|
||||
@@ -96,9 +108,9 @@ macro_ensure_out_of_source_build("In-Source build nicht erlaubt!")
|
||||
SET(CMAKE_AUTOMOC TRUE)
|
||||
SET(CMAKE_AUTOUIC TRUE)
|
||||
SET(QT_USE_IMPORTED_TARGETS TRUE)
|
||||
# Prefer Qt6, fallback to Qt5. Create Qt5::*-aliases when Qt6 is found so existing CMakeLists continue to work.
|
||||
# Prefer Qt6, fallback to Qt5. Create Qt6::*-aliases when Qt6 is found so existing CMakeLists continue to work.
|
||||
# Try to detect Qt6 with a minimal check and then create aliases/placeholders for components used across the project.
|
||||
# Prefer Qt6, fallback to Qt5. Create Qt5::* aliases only when the corresponding
|
||||
# Prefer Qt6, fallback to Qt5. Create Qt6::* aliases only when the corresponding
|
||||
# Qt6:: component target exists. Avoid creating IMPORTED placeholder targets which
|
||||
# have no LOCATION and later inject 'NOTFOUND' into autogen timestamp deps.
|
||||
# Find minimal Qt6 Core first, then probe for other components (non-fatal).
|
||||
@@ -109,11 +121,8 @@ if(Qt6_FOUND)
|
||||
Sensors Multimedia Sql Svg SerialPort Test UiTools WebSockets WebEngineCore WebEngineWidgets
|
||||
Widgets Xml XmlPatterns)
|
||||
foreach(_comp ${_qlist})
|
||||
# Probe for each component (non-fatal). If found, create a Qt5:: alias.
|
||||
# Probe for each component (non-fatal).
|
||||
find_package(Qt6 COMPONENTS ${_comp} QUIET)
|
||||
if(TARGET "Qt6::${_comp}")
|
||||
add_library("Qt5::${_comp}" ALIAS "Qt6::${_comp}")
|
||||
endif()
|
||||
endforeach()
|
||||
# Map version variable for compatibility if available
|
||||
if(Qt6Core_VERSION)
|
||||
@@ -127,22 +136,22 @@ if(Qt6_FOUND)
|
||||
find_program(_lrelease_exec lrelease-qt6 lrelease)
|
||||
if(_lrelease_exec)
|
||||
set(Qt5_LRELEASE_EXECUTABLE ${_lrelease_exec} CACHE INTERNAL "Compatibility lrelease executable")
|
||||
if(TARGET Qt6::LinguistTools AND NOT TARGET Qt5::lrelease)
|
||||
add_executable(Qt5::lrelease IMPORTED)
|
||||
set_target_properties(Qt5::lrelease PROPERTIES IMPORTED_LOCATION ${Qt5_LRELEASE_EXECUTABLE})
|
||||
if(TARGET Qt6::LinguistTools AND NOT TARGET Qt6::lrelease)
|
||||
add_executable(Qt6::lrelease IMPORTED)
|
||||
set_target_properties(Qt6::lrelease PROPERTIES IMPORTED_LOCATION ${Qt5_LRELEASE_EXECUTABLE})
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
FIND_PACKAGE(Qt5 5.9.0 COMPONENTS Concurrent Core Gui Location LinguistTools
|
||||
find_package(Qt6 5.9.0 COMPONENTS Concurrent Core Gui Location LinguistTools
|
||||
Network OpenGL PrintSupport Sensors Multimedia
|
||||
Sql Svg SerialPort Test UiTools WebSockets
|
||||
WebEngineCore WebEngineWidgets Widgets
|
||||
Xml XmlPatterns
|
||||
REQUIRED)
|
||||
MESSAGE(STATUS "Qt version is ${Qt5Core_VERSION}")
|
||||
MESSAGE(STATUS "Qt version is ${Qt6Core_VERSION}")
|
||||
endif()
|
||||
|
||||
MESSAGE(STATUS "Qt version is ${Qt5Core_VERSION}")
|
||||
MESSAGE(STATUS "Qt version is ${Qt6Core_VERSION}")
|
||||
ADD_DEFINITIONS(-DQT_USE_QSTRINGBUILDER)
|
||||
ADD_DEFINITIONS(-DQT_NO_CAST_TO_ASCII)
|
||||
ADD_DEFINITIONS(-DQT_NO_CAST_FROM_ASCII)
|
||||
@@ -290,6 +299,15 @@ ENDIF(USE_UBSAN)
|
||||
|
||||
OPTION(BUILD_RPM "Build a RPM - install script in scripts subdir" OFF)
|
||||
|
||||
# Build component options for NGL_ADD_LIBRARY
|
||||
OPTION(BUILD_ALL "Build all components" ON)
|
||||
OPTION(BUILD_SV "Build SV component" ON)
|
||||
OPTION(BUILD_WS "Build WS component" ON)
|
||||
OPTION(BUILD_AAR "Build AAR component" ON)
|
||||
OPTION(BUILD_TOOLSWS "Build TOOLSWS component" ON)
|
||||
OPTION(BUILD_TOOLSSV "Build TOOLSSV component" ON)
|
||||
OPTION(BUILD_HLA "Build HLA component" ON)
|
||||
|
||||
IF(BUILD_RPM)
|
||||
ADD_SUBDIRECTORY(scripts)
|
||||
ELSE()
|
||||
@@ -359,13 +377,12 @@ endfunction()
|
||||
NGL_ADD_SUBDIR_GUARDED(TetraIF)
|
||||
NGL_ADD_SUBDIR_GUARDED(Z/src)
|
||||
NGL_ADD_SUBDIR_GUARDED(Lts)
|
||||
# Special-case: when migrating TetraIF, also include TrainingAreaBase and Z so generated headers
|
||||
# TrainingAreaBase is included via Lts/Proxies when Lts is processed
|
||||
# Special-case: when migrating TetraIF, also include ProjectDataManagement so generated headers
|
||||
# and internal logger target are available in the same build tree for TetraIF dependents.
|
||||
if(DEFINED MIGRATE_MODULE AND MIGRATE_MODULE STREQUAL "TetraIF")
|
||||
message(STATUS "Including helper modules for TetraIF migration: Lts/Proxies/TrainingAreaBase and Z/src")
|
||||
add_subdirectory(Lts/Proxies/TrainingAreaBase)
|
||||
message(STATUS "Including helper modules for TetraIF migration: Lts/Plugins/ProjectDataManagement")
|
||||
add_subdirectory(Lts/Plugins/ProjectDataManagement)
|
||||
add_subdirectory(Z/src)
|
||||
endif()
|
||||
# at last, to make sure we get all targets in NGL_TS_TARGETS property
|
||||
NGL_ADD_SUBDIR_GUARDED(translations)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#
|
||||
|
||||
FIND_PACKAGE(RTI)
|
||||
FIND_PACKAGE(Grantlee5)
|
||||
FIND_PACKAGE(Grantlee5 REQUIRED COMPONENTS Templates)
|
||||
|
||||
NGL_ADD_LIBRARY(ALL codegen_base SHARED
|
||||
codegen_export.h
|
||||
@@ -18,11 +18,11 @@ NGL_ADD_LIBRARY(ALL codegen_base SHARED
|
||||
)
|
||||
NGL_TARGET_LINK_LIBRARIES(codegen_base
|
||||
PRIVATE
|
||||
Qt5::Xml
|
||||
Qt6::Xml
|
||||
NGLLogger
|
||||
ngltools
|
||||
PUBLIC
|
||||
Qt5::Core
|
||||
Qt6::Core
|
||||
)
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(codegen_base
|
||||
PUBLIC
|
||||
@@ -37,9 +37,11 @@ if (TARGET RTI::nddscpp2)
|
||||
NGL_TARGET_COMPILE_DEFINITIONS(codegen_base
|
||||
PUBLIC
|
||||
$<TARGET_PROPERTY:RTI::nddscpp2,INTERFACE_COMPILE_DEFINITIONS>
|
||||
RTI_DDS_AVAILABLE
|
||||
)
|
||||
message(STATUS "RTI found; building codegen_base with RTI support")
|
||||
else()
|
||||
message(STATUS "RTI not found; building codegen_base without RTI include/compile definitions")
|
||||
message(STATUS "RTI not found; building codegen_base without RTI support")
|
||||
endif()
|
||||
NGL_INSTALL_TARGET(codegen_base)
|
||||
|
||||
@@ -110,7 +112,7 @@ if (TARGET Grantlee5::Templates)
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
)
|
||||
else()
|
||||
message(STATUS "Grantlee5 not found; skipping codegen_grantlee target")
|
||||
message(STATUS "Grantlee not found; skipping codegen_grantlee target")
|
||||
endif()
|
||||
|
||||
# Smoke-test: parse all .grantlee templates in this directory to detect parse/render regressions
|
||||
@@ -119,8 +121,8 @@ if (TARGET Grantlee5::Templates)
|
||||
if (Qt6_FOUND)
|
||||
set(QTCORE_TARGET Qt6::Core)
|
||||
else()
|
||||
find_package(Qt5 COMPONENTS Core REQUIRED)
|
||||
set(QTCORE_TARGET Qt5::Core)
|
||||
find_package(Qt6 COMPONENTS Core REQUIRED)
|
||||
set(QTCORE_TARGET Qt6::Core)
|
||||
endif()
|
||||
|
||||
add_executable(grantlee_parser_smoke tests/GrantleeParserSmoke.cpp)
|
||||
@@ -128,14 +130,14 @@ if (TARGET Grantlee5::Templates)
|
||||
add_test(NAME GrantleeParserSmoke COMMAND grantlee_parser_smoke ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
endif()
|
||||
|
||||
NGL_ADD_EXECUTABLE(ALL codegen
|
||||
NGL_ADD_EXECUTABLE(ALL ngl_codegen
|
||||
main_grantlee.cpp
|
||||
)
|
||||
NGL_TARGET_LINK_LIBRARIES(codegen
|
||||
NGL_TARGET_LINK_LIBRARIES(ngl_codegen
|
||||
codegen_grantlee
|
||||
LtsCommandLineParser
|
||||
nglcoreapplication
|
||||
Qt5::Core
|
||||
Qt6::Core
|
||||
)
|
||||
|
||||
NGL_WRAP_UI(codegen_gui_uics
|
||||
@@ -150,6 +152,6 @@ NGL_TARGET_LINK_LIBRARIES(codegen_gui
|
||||
codegen_grantlee
|
||||
LtsCommandLineParser
|
||||
nglapplication
|
||||
Qt5::Widgets
|
||||
Qt6::Widgets
|
||||
Grantlee5::Templates
|
||||
)
|
||||
@@ -7,6 +7,10 @@
|
||||
#include <NGLLogger/INGLLogger.h>
|
||||
#include <grantlee/context.h>
|
||||
|
||||
#ifdef RTI_HEADER_AVAILABLE
|
||||
#include <dds/core/xtypes/EnumType.hpp>
|
||||
#endif
|
||||
|
||||
using namespace CodeGen;
|
||||
|
||||
CppTopicGeneratorGrantlee::CppTopicGeneratorGrantlee()
|
||||
@@ -240,12 +244,17 @@ bool CppTopicGeneratorGrantlee::handleIdlStruct(const CompleteTopicTypeInformati
|
||||
const CompleteTopicTypeInformation ctti = m_structBuilder->topicTypeInformationByStructType(csi.baseValueType, false);
|
||||
if (ctti.isValid())
|
||||
{
|
||||
#ifdef RTI_HEADER_AVAILABLE
|
||||
if (ctti.extensibility == dds::core::xtypes::ExtensibilityKind_def::FINAL)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Base struct (" << ctti.name
|
||||
<< ") has final extensibility - this is not allowed";
|
||||
return false;
|
||||
}
|
||||
#else
|
||||
// RTI not available - skip extensibility check (assume EXTENSIBLE)
|
||||
Q_UNUSED(ctti.extensibility);
|
||||
#endif
|
||||
if (!idlStructNames.contains(csi.baseValueType))
|
||||
{
|
||||
if (!handleIdlStruct(ctti, idlStructNames, idlStructs))
|
||||
@@ -336,8 +345,7 @@ CompleteTopicTypeInformation CppTopicGeneratorGrantlee::topicTypeInformationByDe
|
||||
if (tti.name.contains(QLatin1String("::")) &&
|
||||
!tti.baseValueType.contains(QLatin1String("::")))
|
||||
{
|
||||
|
||||
const QVector<QStringRef> sl = tti.name.splitRef(QStringLiteral("::"));
|
||||
const QStringList sl = tti.name.split(QStringLiteral("::"));
|
||||
baseValueType = sl.at(0) + QLatin1String("::") + tti.baseValueType;
|
||||
}
|
||||
DEBUG_LOG(m_logger) << "topicTypeInformationByStructName(" << baseValueType << ")";
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "GrantleeWrappers.h"
|
||||
#include <NGLLogger/NGLLoggerBootstrap.h>
|
||||
#include <QFile>
|
||||
#include <QRegularExpression>
|
||||
#include <grantlee/context.h>
|
||||
#include <grantlee/engine.h>
|
||||
|
||||
@@ -57,7 +58,7 @@ bool GeneratorGrantleeBase::setTemplate(const QString &templateName, const QStri
|
||||
QString GeneratorGrantleeBase::render() const
|
||||
{
|
||||
QString out = m_template->render(m_ctx);
|
||||
QRegExp rx(QLatin1String(";\\n([ ]+\\n)*"));
|
||||
const QRegularExpression rx(QLatin1String(";\\n([ ]+\\n)*"));
|
||||
out = out.replace(rx, QStringLiteral(";\n"));
|
||||
return out;
|
||||
}
|
||||
@@ -131,7 +132,7 @@ bool GeneratorGrantleeBase::getFilenameFromData(const QString &dataToParse, QStr
|
||||
ERROR_LOG(m_logger) << "Could not find end marker '\\n' in data!";
|
||||
return false;
|
||||
}
|
||||
filename = dataToParse.midRef(idx, endIdx - idx).trimmed().toString();
|
||||
filename = dataToParse.mid(idx, endIdx - idx).trimmed();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -3,9 +3,11 @@
|
||||
|
||||
#include "GrantleeWrappers.h"
|
||||
#include <NGLLogger/NGLLoggerBootstrap.h>
|
||||
#include <utility>
|
||||
|
||||
using namespace CodeGen;
|
||||
|
||||
#ifdef RTI_HEADER_AVAILABLE
|
||||
QString IdlStructWrapper::extensibility2String(dds::core::xtypes::ExtensibilityKind extensiblity)
|
||||
{
|
||||
switch (extensiblity.underlying())
|
||||
@@ -20,6 +22,13 @@ QString IdlStructWrapper::extensibility2String(dds::core::xtypes::ExtensibilityK
|
||||
Q_ASSERT_X(false, "IdlStructWrapper::extensibility2String", "Unknown extensiblity kind");
|
||||
return QString();
|
||||
}
|
||||
#else
|
||||
QString IdlStructWrapper::extensibility2String(int /*extensiblity*/)
|
||||
{
|
||||
// RTI not available - return placeholder
|
||||
return QStringLiteral("EXTENSIBLE_EXTENSIBILITY");
|
||||
}
|
||||
#endif
|
||||
|
||||
QString DataTopicWrapper::typeFq() const
|
||||
{
|
||||
@@ -51,29 +60,44 @@ QString MemberInformationWrapper::ddsToJsonElement() const
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (cppMemberName().isEmpty())
|
||||
return QStringLiteral("obj[QStringLiteral(\"") + cppType() + QStringLiteral("\")] = element;");
|
||||
|
||||
const QString memberAccess = isCppStruct() ? cppMemberName() : cppMemberName() + QStringLiteral("()");
|
||||
if (!isOptional())
|
||||
return QStringLiteral("obj[QStringLiteral(\"") + cppMemberName() + QStringLiteral("\")] = ") +
|
||||
cppToJsonPre() + QStringLiteral("element.") + cppMemberName() + QStringLiteral("()") + cppToJsonPost();
|
||||
cppToJsonPre() + QStringLiteral("element.") + memberAccess + cppToJsonPost();
|
||||
|
||||
return QStringLiteral("if (element.") + cppMemberName() + QStringLiteral("().is_set()) ") +
|
||||
const QString optionalAccess = isCppStruct() ? cppMemberName() + QStringLiteral(".is_set()") : cppMemberName() + QStringLiteral("().is_set()");
|
||||
const QString getValue = isCppStruct() ? cppMemberName() : cppMemberName() + QStringLiteral("()");
|
||||
return QStringLiteral("if (element.") + optionalAccess + QStringLiteral(") ") +
|
||||
QStringLiteral("obj[QStringLiteral(\"") + cppMemberName() + QStringLiteral("\")] = ") +
|
||||
cppToJsonPre() + QStringLiteral("element.") + cppMemberName() + QStringLiteral("().get()") + cppToJsonPost();
|
||||
cppToJsonPre() + QStringLiteral("element.") + getValue + cppToJsonPost();
|
||||
}
|
||||
|
||||
QString MemberInformationWrapper::jsonElementToDds() const
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -81,10 +105,6 @@ QString MemberInformationWrapper::jsonElementToDds() const
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (cppMemberName().isEmpty())
|
||||
return QStringLiteral("element = ") +
|
||||
cppFromQvPre2() + QStringLiteral("objElement.value(QStringLiteral(\"") + cppType() + QStringLiteral("\"))") + cppFromJsonPost();
|
||||
@@ -93,8 +113,12 @@ QString MemberInformationWrapper::jsonElementToDds() const
|
||||
if (isOptional())
|
||||
ret += QStringLiteral("if (!val.isNull()) ");
|
||||
|
||||
ret += QStringLiteral("element.") + cppMemberName() + QStringLiteral("(") +
|
||||
cppFromJsonPre2() + QStringLiteral("val") + cppFromJsonPost() + QStringLiteral(")");
|
||||
if (isCppStruct())
|
||||
ret += QStringLiteral("element.") + cppMemberName() + QStringLiteral(" = ") +
|
||||
cppFromJsonPre2() + QStringLiteral("val") + cppFromJsonPost();
|
||||
else
|
||||
ret += QStringLiteral("element.") + cppMemberName() + QStringLiteral("(") +
|
||||
cppFromJsonPre2() + QStringLiteral("val") + cppFromJsonPost() + QStringLiteral(")");
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -165,7 +189,7 @@ QVariantList DbStructWrapper::insertStructures()
|
||||
QMap<QString, MemberInformationWrapper *> fkComplexTableKeys;
|
||||
|
||||
tableNames.reserve(5);
|
||||
for (const QVariant &v : qAsConst(m_member))
|
||||
for (const QVariant &v : std::as_const(m_member))
|
||||
{
|
||||
MemberInformationWrapper *mi = v.value<MemberInformationWrapper *>();
|
||||
const QString &tableName = mi->info().db.table;
|
||||
|
||||
@@ -6,8 +6,13 @@
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QVariant>
|
||||
#include <utility>
|
||||
#include "StructBuilder.h"
|
||||
|
||||
#ifdef RTI_HEADER_AVAILABLE
|
||||
#include <dds/core/xtypes/EnumType.hpp>
|
||||
#endif
|
||||
|
||||
namespace CodeGen
|
||||
{
|
||||
class NameWrapper : public QObject
|
||||
@@ -38,7 +43,7 @@ public:
|
||||
using NameWrapper::NameWrapper;
|
||||
~VariantListWrapper()
|
||||
{
|
||||
for (const QVariant &v : qAsConst(m_member))
|
||||
for (const QVariant &v : std::as_const(m_member))
|
||||
{
|
||||
auto ptr = v.value<QObject *>();
|
||||
delete ptr;
|
||||
@@ -75,6 +80,7 @@ class MemberInformationWrapper final : public QObject
|
||||
Q_PROPERTY(QString jsonElementToDb READ jsonElementToDb)
|
||||
Q_PROPERTY(bool dbHasSequence READ dbHasSequence)
|
||||
Q_PROPERTY(bool isOptional READ isOptional)
|
||||
Q_PROPERTY(bool isCppStruct READ isCppStruct)
|
||||
public:
|
||||
MemberInformationWrapper(const MemberInformation &mi, QObject *parent)
|
||||
: QObject(parent)
|
||||
@@ -103,6 +109,7 @@ public:
|
||||
QString jsonElementToDb() const;
|
||||
bool dbHasSequence() const { return m_mi.db.hasSequence; }
|
||||
bool isOptional() const { return m_mi.cpp.isOptional; }
|
||||
bool isCppStruct() const { return m_mi.cpp.usedForCppStruct; }
|
||||
|
||||
|
||||
QString cppToJsonPre() const { return m_mi.cpp.toJsonPre.isNull() ? m_mi.cpp.toVariantPre : m_mi.cpp.toJsonPre; }
|
||||
@@ -245,7 +252,7 @@ public:
|
||||
, m_csi(csi)
|
||||
{
|
||||
m_dbNotifications.reserve(m_csi.dbNotifications.size());
|
||||
for (const auto ¬ification : qAsConst(m_csi.dbNotifications))
|
||||
for (const auto ¬ification : std::as_const(m_csi.dbNotifications))
|
||||
m_dbNotifications += QVariant(notification.methodName);
|
||||
}
|
||||
|
||||
@@ -356,7 +363,7 @@ public:
|
||||
, m_ctti(ctti)
|
||||
{
|
||||
m_member.reserve(m_ctti.members.size());
|
||||
for (const auto &val : qAsConst(m_ctti.members))
|
||||
for (const auto &val : std::as_const(m_ctti.members))
|
||||
m_member += QVariant::fromValue(new IdlDataWrapper(val, this));
|
||||
}
|
||||
|
||||
@@ -366,7 +373,11 @@ public:
|
||||
|
||||
private:
|
||||
const CompleteTopicTypeInformation m_ctti;
|
||||
#ifdef RTI_HEADER_AVAILABLE
|
||||
static QString extensibility2String(dds::core::xtypes::ExtensibilityKind extensiblity);
|
||||
#else
|
||||
static QString extensibility2String(int extensiblity);
|
||||
#endif
|
||||
};
|
||||
|
||||
class IdlServiceWrapper final : public QObject
|
||||
|
||||
@@ -306,7 +306,7 @@ QString SqlGenerator::getTableColumnCreateStatements(const QString &tableName,
|
||||
|
||||
int maxLength = 1;
|
||||
for (const MemberInformation &mi : columns)
|
||||
maxLength = std::max(maxLength, mi.db.columnName.length());
|
||||
maxLength = std::max(maxLength, static_cast<int>(mi.db.columnName.length()));
|
||||
maxLength += 1;
|
||||
|
||||
QStringList retCols;
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "StructBuilder.h"
|
||||
|
||||
#include <QDateTime>
|
||||
#include <utility>
|
||||
|
||||
#include <NGLLogger/NGLLoggerBootstrap.h>
|
||||
|
||||
@@ -294,7 +295,7 @@ bool StructBuilder::handleEnum(const EnumInformation &ei)
|
||||
}
|
||||
|
||||
CompleteTableInformation cti = m_sqlTableInformations[ei.tableName];
|
||||
for (const ColumnInformation &ci : qAsConst(ti->plainColumns))
|
||||
for (const ColumnInformation &ci : std::as_const(ti->plainColumns))
|
||||
{
|
||||
MemberInformation mi;
|
||||
mi.db = FullQualifiedColumnInformation(ci, ei.tableName);
|
||||
@@ -335,7 +336,7 @@ EnumInformation StructBuilder::enumInformationByType(const QString &type, bool c
|
||||
return m_xmlReader->getExternalEnumeration(extInfo.service, extInfo.type, verbose);
|
||||
}
|
||||
|
||||
for (const EnumInformation &ei : qAsConst(m_enumInfos))
|
||||
for (const EnumInformation &ei : std::as_const(m_enumInfos))
|
||||
{
|
||||
if (ei.enumName == type)
|
||||
return ei;
|
||||
@@ -359,7 +360,7 @@ CompleteTopicTypeInformation StructBuilder::topicTypeInformationByStructType(con
|
||||
|
||||
return externalTopicTypeByStructType(extInfo);
|
||||
}
|
||||
for (const CompleteTopicTypeInformation &csi : qAsConst(m_topicTypeInfos))
|
||||
for (const CompleteTopicTypeInformation &csi : std::as_const(m_topicTypeInfos))
|
||||
{
|
||||
if (csi.name == type)
|
||||
return csi;
|
||||
@@ -385,7 +386,7 @@ CompleteTopicTypeInformation StructBuilder::externalTopicTypeByStructType(const
|
||||
{
|
||||
const QString typeToSearch = sts.fqType();
|
||||
DEBUG_LOG(m_logger) << "externalTopicTypeByStructType " << typeToSearch;
|
||||
for (const CompleteTopicTypeInformation &ctti : qAsConst(m_externalTopicTypes))
|
||||
for (const CompleteTopicTypeInformation &ctti : std::as_const(m_externalTopicTypes))
|
||||
{
|
||||
if (ctti.name == typeToSearch)
|
||||
return ctti;
|
||||
@@ -427,7 +428,7 @@ bool StructBuilder::getColumnsFromTable(const QString &tableName,
|
||||
const QSharedPointer<TableInformation> ti = m_xmlReader->getTable(tableName);
|
||||
QVector<ConstraintInformation> constraints;
|
||||
constraints.reserve(ti->constraints.size());
|
||||
for (const ConstraintInformation &ci : qAsConst(ti->constraints))
|
||||
for (const ConstraintInformation &ci : std::as_const(ti->constraints))
|
||||
{
|
||||
if (ci.affectedColumns.size() != 1)
|
||||
continue;
|
||||
@@ -437,7 +438,7 @@ bool StructBuilder::getColumnsFromTable(const QString &tableName,
|
||||
}
|
||||
|
||||
columns.reserve(columns.size() + ti->plainColumns.size());
|
||||
for (const auto &plainColum : qAsConst(ti->plainColumns))
|
||||
for (const auto &plainColum : std::as_const(ti->plainColumns))
|
||||
{
|
||||
ColumnInformationEx cie(ColumnInformationEx(plainColum, ti));
|
||||
for (int j = 0; j < constraints.size(); ++j)
|
||||
@@ -466,7 +467,7 @@ bool StructBuilder::handleTable(const ServiceStructInformation &ssi)
|
||||
csi.hasStaticContent = ssi.hasStaticContent;
|
||||
csi.dbNotifications = ssi.dbNotifications;
|
||||
|
||||
DEBUG_LOG(m_loggerCSV) << "primaryTable: " << csi.primaryTable;
|
||||
DEBUG_LOG(m_loggerCSV) << "primaryTable: " << csi.primaryTable.data();
|
||||
DEBUG_LOG(m_loggerCSV) << "hasStaticContent: " << csi.hasStaticContent;
|
||||
|
||||
|
||||
@@ -486,7 +487,7 @@ bool StructBuilder::handleTable(const ServiceStructInformation &ssi)
|
||||
|
||||
csi.member.reserve(columns.size() + 1);
|
||||
MemberInformation miPkFirstTable, miPkLastTable;
|
||||
for (const ColumnInformationEx &ci : qAsConst(columns))
|
||||
for (const ColumnInformationEx &ci : std::as_const(columns))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "handling column " << ci.columnName;
|
||||
|
||||
@@ -494,7 +495,7 @@ bool StructBuilder::handleTable(const ServiceStructInformation &ssi)
|
||||
if (ti.isNull())
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Could not find table for column " << ci.columnName
|
||||
<< " primary table is " << ssi.primaryTable;
|
||||
<< " primary table is " << ssi.primaryTable.data();
|
||||
return false;
|
||||
}
|
||||
csi.tables += ti;
|
||||
@@ -528,7 +529,7 @@ bool StructBuilder::handleTable(const ServiceStructInformation &ssi)
|
||||
if (!fki.isNull())
|
||||
{
|
||||
|
||||
for(const auto &tbl : qAsConst(csi.tables))
|
||||
for(const auto &tbl : std::as_const(csi.tables))
|
||||
{
|
||||
if (tbl->name == fki->destination.tableName)
|
||||
{
|
||||
@@ -545,7 +546,7 @@ bool StructBuilder::handleTable(const ServiceStructInformation &ssi)
|
||||
if (fki->destination.service.isEmpty())
|
||||
{
|
||||
|
||||
for (const EnumInformation &ei : qAsConst(m_enumInfos))
|
||||
for (const EnumInformation &ei : std::as_const(m_enumInfos))
|
||||
{
|
||||
if (ei.tableName == fki->destination.tableName)
|
||||
{
|
||||
@@ -658,7 +659,7 @@ bool StructBuilder::handleIdlStructInfo(const TopicTypeInformation &tti,
|
||||
const QString &svcName)
|
||||
{
|
||||
|
||||
for (const CompleteTopicTypeInformation &c : qAsConst(destination))
|
||||
for (const CompleteTopicTypeInformation &c : std::as_const(destination))
|
||||
{
|
||||
if (c.name == tti.name)
|
||||
return true;
|
||||
@@ -1285,7 +1286,7 @@ CompleteTableInformation StructBuilder::getRecordingTopicTable(const QString &st
|
||||
{
|
||||
const auto vec = structName.contains(QLatin1String("::")) ? m_externalTopicTypes : m_topicTypeInfos;
|
||||
|
||||
for (const CompleteTopicTypeInformation &ctti : qAsConst(vec))
|
||||
for (const CompleteTopicTypeInformation &ctti : std::as_const(vec))
|
||||
{
|
||||
if (structName != ctti.name)
|
||||
continue;
|
||||
@@ -1311,7 +1312,7 @@ QMap<QString, CompleteTableInformation> StructBuilder::getRecordingTopicTables()
|
||||
|
||||
MemberInformation miPrimaryKey(getRecordPrimaryKey());
|
||||
|
||||
for (const CompleteTopicTypeInformation &ctti : qAsConst(m_topicTypeInfos))
|
||||
for (const CompleteTopicTypeInformation &ctti : std::as_const(m_topicTypeInfos))
|
||||
{
|
||||
if (!ctti.recordTopic)
|
||||
continue;
|
||||
@@ -1331,7 +1332,7 @@ QMap<QString, CompleteTableInformation> StructBuilder::getRecordingTopicTables()
|
||||
void StructBuilder::addToSerializeFromToJsonTopics(const QSharedPointer<DataTypeInfo> &toAdd)
|
||||
{
|
||||
typedef QSharedPointer<DataTypeInfo> sDTI;
|
||||
for (const sDTI &dti : qAsConst(m_serializeFromToJsonTopics))
|
||||
for (const sDTI &dti : std::as_const(m_serializeFromToJsonTopics))
|
||||
{
|
||||
if (dti->cppType() == toAdd->cppType())
|
||||
return;
|
||||
@@ -1392,9 +1393,9 @@ QString StructBuilder::camelCaseToUnderline(const QString &in)
|
||||
|
||||
StructBuilder::ServiceTypeStruct StructBuilder::extractServiceAndTypeFromTypename(const QString &type)
|
||||
{
|
||||
const QVector<QStringRef> sl = type.splitRef(QStringLiteral("::"));
|
||||
QStringRef extServiceRef;;
|
||||
QStringRef extTypeRef;
|
||||
const QStringList sl = QString(type).split(QStringLiteral("::"));
|
||||
QStringView extServiceRef;
|
||||
QStringView extTypeRef;
|
||||
if (sl.size() == 1)
|
||||
extTypeRef = sl.at(0);
|
||||
else if (sl.size() == 2)
|
||||
@@ -1407,19 +1408,17 @@ StructBuilder::ServiceTypeStruct StructBuilder::extractServiceAndTypeFromTypenam
|
||||
StructBuilder::ServiceTypeStruct ret;
|
||||
if (!extServiceRef.isEmpty())
|
||||
{
|
||||
|
||||
if (extServiceRef.contains(QLatin1Char('<')))
|
||||
ret.service = extServiceRef.split(QLatin1Char('<')).at(1).toString();
|
||||
ret.service = QString(extServiceRef).split(QLatin1Char('<')).at(1);
|
||||
else
|
||||
ret.service = extServiceRef.toString();
|
||||
ret.service = QString(extServiceRef);
|
||||
}
|
||||
if (!extTypeRef.isEmpty())
|
||||
{
|
||||
|
||||
if (extTypeRef.contains(QLatin1Char('>')))
|
||||
ret.type = extTypeRef.split(QLatin1Char('>')).at(0).toString();
|
||||
ret.type = QString(extTypeRef).split(QLatin1Char('>')).at(0);
|
||||
else
|
||||
ret.type = extTypeRef.toString();
|
||||
ret.type = QString(extTypeRef);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
|
||||
|
||||
#include "XmlReader.h"
|
||||
#include <utility>
|
||||
|
||||
#include <NGLLogger/NGLLoggerBootstrap.h>
|
||||
|
||||
@@ -134,7 +135,7 @@ bool XmlReader::readServiceFile(const QString &svcFile,
|
||||
const QString groupNamesString = getAttribute(domRoot, QStringLiteral("groups"), true);
|
||||
if (!groupNamesString.isEmpty())
|
||||
{
|
||||
m_groupNames = groupNamesString.split(QLatin1Char(','), QString::SkipEmptyParts);
|
||||
m_groupNames = groupNamesString.split(QLatin1Char(','), Qt::SkipEmptyParts);
|
||||
INFO_LOG(m_logger) << "groups: " << groupNamesString;
|
||||
}
|
||||
else
|
||||
@@ -471,15 +472,20 @@ void XmlReader::parseTopicTypes(const QDomElement &rootElement)
|
||||
isi.baseValueType = getAttribute(domIdlStruct, QStringLiteral("baseValueType"), true);
|
||||
|
||||
|
||||
const QVector<QStringRef> sl = isi.baseValueType.splitRef(QStringLiteral("::"));
|
||||
const QStringList sl = isi.baseValueType.split(QStringLiteral("::"));
|
||||
if (sl.size() == 2)
|
||||
loadExternalTopicType(sl.at(0).toString(), sl.at(1).toString());
|
||||
loadExternalTopicType(sl.at(0), sl.at(1));
|
||||
|
||||
const QString tmp = getAttribute(domIdlStruct, QStringLiteral("extensibility"), true);
|
||||
|
||||
#ifdef RTI_HEADER_AVAILABLE
|
||||
if (tmp.compare(QLatin1String("FINAL"), Qt::CaseInsensitive) == 0) isi.extensibility = dds::core::xtypes::ExtensibilityKind::FINAL;
|
||||
if (tmp.compare(QLatin1String("MUTABLE"), Qt::CaseInsensitive) == 0) isi.extensibility = dds::core::xtypes::ExtensibilityKind::MUTABLE;
|
||||
if (tmp.compare(QLatin1String("EXTENSIBLE"), Qt::CaseInsensitive) == 0) isi.extensibility = dds::core::xtypes::ExtensibilityKind::EXTENSIBLE;
|
||||
#else
|
||||
// RTI not available - skip extensibility parsing
|
||||
Q_UNUSED(tmp)
|
||||
#endif
|
||||
|
||||
isi.comment = getAttribute(domIdlStruct, QStringLiteral("comment"), true);
|
||||
isi.isDataObject = getAttributeBool(domIdlStruct, QStringLiteral("isDataObject"), true, false);
|
||||
@@ -530,14 +536,14 @@ void XmlReader::parseFunctionTopics(const QDomElement &rootElement)
|
||||
domFunctionTopic = domFunctionTopic.nextSiblingElement(domFunctionTopic.tagName());
|
||||
}
|
||||
|
||||
for (const FunctionTopic &ft : qAsConst(m_functionTopics))
|
||||
for (const FunctionTopic &ft : std::as_const(m_functionTopics))
|
||||
{
|
||||
const QVector<QStringRef> sl1 = ft.requestTopicType.splitRef(QStringLiteral("::"));
|
||||
const QStringList sl1 = ft.requestTopicType.split(QStringLiteral("::"));
|
||||
if (sl1.size() == 2)
|
||||
loadExternalTopicType(sl1.at(0).toString(), sl1.at(1).toString());
|
||||
const QVector<QStringRef> sl2 = ft.replyTopicType.splitRef(QStringLiteral("::"));
|
||||
loadExternalTopicType(sl1.at(0), sl1.at(1));
|
||||
const QStringList sl2 = ft.replyTopicType.split(QStringLiteral("::"));
|
||||
if (sl2.size() == 2)
|
||||
loadExternalTopicType(sl2.at(0).toString(), sl2.at(1).toString());
|
||||
loadExternalTopicType(sl2.at(0), sl2.at(1));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -847,18 +853,18 @@ void XmlReader::loadIdlInfofile(const QString &idlServiceInfoFile)
|
||||
if (filePath.startsWith("--") || filePath.trimmed().isEmpty())
|
||||
continue;
|
||||
const QString fileName = QString::fromLocal8Bit(filePath.trimmed());
|
||||
const QVector<QStringRef> parts = fileName.splitRef(QLatin1Char('/'));
|
||||
const QStringList parts = fileName.split(QStringLiteral("/"));
|
||||
getServiceNameInfoFromFilePath(parts);
|
||||
const auto fn = parts.last().trimmed();
|
||||
if (fn.endsWith(QLatin1String(".xml")))
|
||||
{
|
||||
const auto svcAbbreveation = fn.split(QLatin1Char('.')).at(0).split(QLatin1Char('_')).at(0);
|
||||
m_xmlFiles[svcAbbreveation.toString()] = fileName;
|
||||
DEBUG_LOG(m_logger) << "xml: " << svcAbbreveation.toString() << " = " << fileName;
|
||||
m_xmlFiles[svcAbbreveation] = fileName;
|
||||
DEBUG_LOG(m_logger) << "xml: " << svcAbbreveation << " = " << fileName;
|
||||
}
|
||||
else
|
||||
{
|
||||
const auto svcAbbreveation = fn.split(QLatin1Char('.')).at(0).toString().toLower();
|
||||
const auto svcAbbreveation = fn.split(QLatin1Char('.')).at(0).toLower();
|
||||
if (svcAbbreveation.endsWith(QLatin1String("_enums")))
|
||||
continue;
|
||||
m_idlFiles[svcAbbreveation] = fileName;
|
||||
@@ -880,14 +886,14 @@ QString XmlReader::serviceNameAbbreviation(const QString &serviceName) const
|
||||
return m_fullServiceName2Abbreviation.value(serviceName);
|
||||
}
|
||||
|
||||
void XmlReader::getServiceNameInfoFromFilePath(const QVector<QStringRef> &parts)
|
||||
void XmlReader::getServiceNameInfoFromFilePath(const QStringList &parts)
|
||||
{
|
||||
if (parts.size() < 2)
|
||||
return;
|
||||
|
||||
|
||||
const QString abbreviation = parts.last().split(QLatin1Char('.')).first().split(QLatin1Char('_')).first().toString();
|
||||
const QString serviceName = parts.at(parts.size() - 2).toString();
|
||||
const QString abbreviation = parts.last().split(QLatin1Char('.')).first().split(QLatin1Char('_')).first();
|
||||
const QString serviceName = parts.at(parts.size() - 2);
|
||||
DEBUG_LOG(m_logger) << "serviceName: " << serviceName << " = " << abbreviation;
|
||||
m_fullServiceName2Abbreviation[serviceName] = abbreviation;
|
||||
}
|
||||
|
||||
@@ -7,9 +7,18 @@
|
||||
#include <QtCore/QSharedPointer>
|
||||
#include <QtCore/QString>
|
||||
#include <QtCore/QStringList>
|
||||
#include <QtCore/QStringView>
|
||||
#include <QtCore/QVector>
|
||||
|
||||
#ifdef RTI_DDS_AVAILABLE
|
||||
// Only include RTI headers if they are actually available
|
||||
#if __has_include(<dds/core/xtypes/EnumType.hpp>)
|
||||
#include <dds/core/xtypes/EnumType.hpp>
|
||||
#define RTI_HEADER_AVAILABLE 1
|
||||
#else
|
||||
#undef RTI_DDS_AVAILABLE
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "codegen_export.h"
|
||||
|
||||
@@ -212,7 +221,11 @@ struct TopicTypeInformationBase
|
||||
bool routeInReplay = true;
|
||||
bool autosubscribe = true;
|
||||
|
||||
#ifdef RTI_DDS_AVAILABLE
|
||||
dds::core::xtypes::ExtensibilityKind extensibility = dds::core::xtypes::ExtensibilityKind::EXTENSIBLE;
|
||||
#else
|
||||
int extensibility = 0; // Placeholder when RTI DDS is not available
|
||||
#endif
|
||||
|
||||
virtual bool isValid() const { return !name.isEmpty(); }
|
||||
|
||||
@@ -377,7 +390,7 @@ private:
|
||||
void loadIdlInfofile(const QString &idlServiceInfoFile);
|
||||
QString getIdlFileForService(const QMap<QString, QString> &data, const QString &serviceName) const;
|
||||
QString serviceNameAbbreviation(const QString &serviceName) const;
|
||||
void getServiceNameInfoFromFilePath(const QVector<QStringRef> &parts);
|
||||
void getServiceNameInfoFromFilePath(const QStringList &parts);
|
||||
static QString serviceNamespaceFromFile(const QString &fn);
|
||||
|
||||
|
||||
|
||||
@@ -20,13 +20,13 @@ namespace {{ namespace }}
|
||||
//
|
||||
QString toString({{ idl_enum.name }} state)
|
||||
{
|
||||
switch(state.underlying())
|
||||
switch(static_cast<int>(state))
|
||||
{{% for idl_member in idl_enum.member %}
|
||||
case {{ idl_enum.name }}_def::{{ idl_member.key }}: return QCoreApplication::translate("{{ idl_enum.name }}", "{{ idl_member.key }}");
|
||||
case static_cast<int>({{ idl_enum.name }}::{{ idl_member.key }}): return QCoreApplication::translate("{{ idl_enum.name }}", "{{ idl_member.key }}");
|
||||
{% endfor %}
|
||||
default: break;
|
||||
}
|
||||
return QCoreApplication::translate("{{ idl_enum.name }}", "Unknown (%1)").arg(state.underlying());
|
||||
return QCoreApplication::translate("{{ idl_enum.name }}", "Unknown (%1)").arg(static_cast<int>(state));
|
||||
}
|
||||
{% endfor %}
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ NGL_TARGET_INCLUDE_DIRECTORIES(LtsAppDescriptor
|
||||
|
||||
NGL_TARGET_LINK_LIBRARIES(LtsAppDescriptor
|
||||
PUBLIC
|
||||
Qt5::Core
|
||||
Qt6::Core
|
||||
)
|
||||
|
||||
NGL_INSTALL_TARGET(LtsAppDescriptor)
|
||||
@@ -40,7 +40,7 @@ NGL_TARGET_LINK_LIBRARIES(LtsAppDescriptorChecker
|
||||
PRIVATE
|
||||
LtsAppDescriptor
|
||||
PUBLIC
|
||||
Qt5::Core
|
||||
Qt6::Core
|
||||
)
|
||||
|
||||
|
||||
@@ -66,8 +66,8 @@ NGL_TARGET_LINK_LIBRARIES(LtsAppDescriptorChecker
|
||||
|
||||
#NGL_TARGET_LINK_LIBRARIES(LtsAppDescriptorEditor
|
||||
# PUBLIC
|
||||
# Qt5::Core
|
||||
# Qt5::Widgets
|
||||
# Qt6::Core
|
||||
# Qt6::Widgets
|
||||
# LtsAppDescriptor
|
||||
#)
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include <LtsAppDescriptor/lts_app_descriptor.h>
|
||||
#include <utility>
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QFile>
|
||||
@@ -66,14 +67,14 @@ int main(int argc, char *argv[])
|
||||
|
||||
QStringList filenames;
|
||||
filenames.reserve(guiPluginFiles.size());
|
||||
for (const QFileInfo &fi : qAsConst(guiPluginFiles))
|
||||
for (const QFileInfo &fi : std::as_const(guiPluginFiles))
|
||||
{
|
||||
filenames += fi.absoluteFilePath();
|
||||
}
|
||||
|
||||
|
||||
QStringList guiPluginIIDs;
|
||||
for (const QFileInfo &fi : qAsConst(guiPluginFiles))
|
||||
for (const QFileInfo &fi : std::as_const(guiPluginFiles))
|
||||
{
|
||||
QFile f2(fi.absoluteFilePath());
|
||||
|
||||
@@ -105,9 +106,9 @@ int main(int argc, char *argv[])
|
||||
|
||||
bool ok = true;
|
||||
|
||||
for (const LtsAppDescriptor::AppDescription &appdesc : qAsConst(adv))
|
||||
for (const LtsAppDescriptor::AppDescription &appdesc : std::as_const(adv))
|
||||
{
|
||||
for (const LtsAppDescriptor::PluginInfo &pi : qAsConst(appdesc.pluginInfos))
|
||||
for (const LtsAppDescriptor::PluginInfo &pi : std::as_const(appdesc.pluginInfos))
|
||||
{
|
||||
if (!guiPluginIIDs.contains(pi.iid))
|
||||
{
|
||||
|
||||
@@ -39,13 +39,13 @@ NGL_TARGET_LINK_LIBRARIES(LtsAppManager
|
||||
LtsUtilsSettings
|
||||
LtsMultiMonitor
|
||||
ProjectConfig
|
||||
Qt5::Gui
|
||||
Qt5::Widgets
|
||||
Qt5::Network # debug server
|
||||
Qt6::Gui
|
||||
Qt6::Widgets
|
||||
Qt6::Network # debug server
|
||||
OpmSettingsGuiPluginInterface
|
||||
LtsPluginLoader
|
||||
PUBLIC
|
||||
Qt5::Core
|
||||
Qt6::Core
|
||||
LtsAppDescriptor
|
||||
)
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "lts_app_manager.h"
|
||||
#include <utility>
|
||||
#include "AppChooser/app_chooser.h"
|
||||
|
||||
#include <LtsPluginManager/lts_plugin_manager.h>
|
||||
@@ -880,7 +881,7 @@ bool LtsAppManager::hasApp(LtsAppDescriptor::App appId) const
|
||||
int LtsAppManager::getNumberOfSituationMapInstances() const
|
||||
{
|
||||
int numberOfSituationMapInstances = 0;
|
||||
for (const LtsPluginManager::LtsPluginManager *app : qAsConst(m_appList))
|
||||
for (const LtsPluginManager::LtsPluginManager *app : std::as_const(m_appList))
|
||||
{
|
||||
if (!app)
|
||||
continue;
|
||||
@@ -931,7 +932,7 @@ void LtsAppManager::saveState()
|
||||
|
||||
|
||||
QJsonArray root;
|
||||
for (const LtsPluginManager::LtsPluginManager *app : qAsConst(m_appList))
|
||||
for (const LtsPluginManager::LtsPluginManager *app : std::as_const(m_appList))
|
||||
{
|
||||
const QVector<LtsSession::LtsSession *> sessions = app->sessions();
|
||||
|
||||
@@ -1000,7 +1001,7 @@ void LtsAppManager::saveState()
|
||||
|
||||
void LtsAppManager::slotLogout()
|
||||
{
|
||||
for (LtsPluginManager::LtsPluginManager *app : qAsConst(m_appList))
|
||||
for (LtsPluginManager::LtsPluginManager *app : std::as_const(m_appList))
|
||||
{
|
||||
const QVector<LtsSession::LtsSession *> sessions = app->sessions();
|
||||
for (LtsSession::LtsSession *session : sessions)
|
||||
@@ -1118,7 +1119,7 @@ bool LtsAppManager::otherSessionsResponsibility(LtsSession::LtsSession *thisSess
|
||||
|
||||
|
||||
|
||||
for (const LtsPluginManager::LtsPluginManager *app : qAsConst(worthyApps))
|
||||
for (const LtsPluginManager::LtsPluginManager *app : std::as_const(worthyApps))
|
||||
{
|
||||
const QVector<LtsSession::LtsSession *> sessions = app->sessions();
|
||||
for (const LtsSession::LtsSession *session : sessions)
|
||||
@@ -1133,7 +1134,7 @@ bool LtsAppManager::otherSessionsResponsibility(LtsSession::LtsSession *thisSess
|
||||
LtsMultiMonitor::LtsMultiMonitor *mm = LtsMultiMonitor::LtsMultiMonitor::getInstance();
|
||||
LtsMultiMonitor::LtsScreenBase *mainScreen = mm->mainScreen();
|
||||
|
||||
for (const LtsPluginManager::LtsPluginManager *app : qAsConst(worthyApps))
|
||||
for (const LtsPluginManager::LtsPluginManager *app : std::as_const(worthyApps))
|
||||
{
|
||||
const QVector<LtsSession::LtsSession *> sessions = app->sessions();
|
||||
for (LtsSession::LtsSession *session : sessions)
|
||||
|
||||
@@ -15,7 +15,7 @@ NGL_TARGET_INCLUDE_DIRECTORIES(LtsCommandLineParser
|
||||
NGL_TARGET_LINK_LIBRARIES(LtsCommandLineParser
|
||||
PRIVATE
|
||||
ngltools
|
||||
Qt5::Network
|
||||
Qt6::Network
|
||||
PUBLIC
|
||||
Qt5::Core
|
||||
Qt6::Core
|
||||
)
|
||||
@@ -12,11 +12,11 @@ NGL_ADD_LIBRARY2(LtsCoordTrans WS AAR SV HLA SHARED
|
||||
)
|
||||
NGL_TARGET_LINK_LIBRARIES(LtsCoordTrans
|
||||
PRIVATE
|
||||
Qt5::Core
|
||||
Qt6::Core
|
||||
)
|
||||
if (GeographicLib_FOUND)
|
||||
NGL_TARGET_LINK_LIBRARIES(LtsCoordTrans
|
||||
PRIVATE GeographicLib
|
||||
PRIVATE GeographicLib::GeographicLib_SHARED
|
||||
)
|
||||
else()
|
||||
message(STATUS "GeographicLib not found; building LtsCoordTrans without it")
|
||||
@@ -41,8 +41,8 @@ NGL_TARGET_LINK_LIBRARIES(ltsCoordWidget
|
||||
PRIVATE
|
||||
LtsCoordTrans
|
||||
PUBLIC
|
||||
Qt5::Core
|
||||
Qt5::Widgets
|
||||
Qt6::Core
|
||||
Qt6::Widgets
|
||||
)
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(ltsCoordWidget
|
||||
PUBLIC
|
||||
@@ -54,8 +54,8 @@ IF(TARGET LtsCoordTrans)
|
||||
FOREACH(_tool ${_tools})
|
||||
NGL_ADD_EXECUTABLE(ALL ${_tool} ${_tool}.cpp)
|
||||
NGL_TARGET_LINK_LIBRARIES(${_tool}
|
||||
Qt5::Core
|
||||
GeographicLib
|
||||
Qt6::Core
|
||||
GeographicLib::GeographicLib_SHARED
|
||||
)
|
||||
NGL_INSTALL_TARGET(${_tool})
|
||||
ENDFOREACH()
|
||||
@@ -76,8 +76,8 @@ IF(BUILD_TESTING AND TARGET LtsCoordTrans)
|
||||
)
|
||||
TARGET_LINK_LIBRARIES(lts_coord_trans_unit_test
|
||||
LtsCoordTrans
|
||||
Qt5::Test
|
||||
GeographicLib
|
||||
Qt6::Test
|
||||
GeographicLib::GeographicLib_SHARED
|
||||
)
|
||||
ADD_TEST(NAME lts_coord_trans_unit_test COMMAND $<TARGET_FILE:lts_coord_trans_unit_test>)
|
||||
ENDIF()
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "lts_coord_trans.h"
|
||||
#include <utility>
|
||||
|
||||
#include <GeographicLib/Geocentric.hpp>
|
||||
#include <GeographicLib/UTMUPS.hpp>
|
||||
@@ -320,7 +321,7 @@ QStringList getMgrsSurroundingSquares(const QRectF &geoRect, const QSize &offset
|
||||
QVector<UtmCoordinate> mainUtmsWithOffset = getMgrsSquaresInternal(rectWithOffset);
|
||||
QStringList mainSquaresWithOffset;
|
||||
mainSquaresWithOffset.reserve(mainUtmsWithOffset.count());
|
||||
for (const auto &utm : qAsConst(mainUtmsWithOffset))
|
||||
for (const auto &utm : std::as_const(mainUtmsWithOffset))
|
||||
mainSquaresWithOffset.append(utm.mgrs(0));
|
||||
|
||||
|
||||
|
||||
+6
-5
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "lts_coord_trans_unit_test.h"
|
||||
#include <utility>
|
||||
#include "lts_coord_trans.h"
|
||||
#include <GeographicLib/Math.hpp>
|
||||
#include <QTest>
|
||||
@@ -408,23 +409,23 @@ void coordtrans_test::testMgrsSquaresWithSurrounding()
|
||||
|
||||
QStringList string1;
|
||||
string1.reserve(squares1.size());
|
||||
for (const LtsCoordTrans::UtmCoordinate &item : qAsConst(squares1))
|
||||
for (const LtsCoordTrans::UtmCoordinate &item : std::as_const(squares1))
|
||||
string1.append(item.mgrs(0));
|
||||
|
||||
QStringList string9;
|
||||
string9.reserve(squares9.size());
|
||||
for (const LtsCoordTrans::UtmCoordinate &item : qAsConst(squares9))
|
||||
for (const LtsCoordTrans::UtmCoordinate &item : std::as_const(squares9))
|
||||
string9.append(item.mgrs(0));
|
||||
|
||||
QStringList string33;
|
||||
string33.reserve(square33.size());
|
||||
for (const LtsCoordTrans::UtmCoordinate &item : qAsConst(square33))
|
||||
for (const LtsCoordTrans::UtmCoordinate &item : std::as_const(square33))
|
||||
string33.append(item.mgrs(0));
|
||||
|
||||
{
|
||||
QStringList surroundingStrings;
|
||||
surroundingStrings.reserve(squares9.size());
|
||||
for (const QString &str : qAsConst(string9))
|
||||
for (const QString &str : std::as_const(string9))
|
||||
if (!string1.contains(str))
|
||||
surroundingStrings.append(str);
|
||||
|
||||
@@ -434,7 +435,7 @@ void coordtrans_test::testMgrsSquaresWithSurrounding()
|
||||
{
|
||||
QStringList surroundingStrings;
|
||||
surroundingStrings.reserve(string33.size());
|
||||
for (const QString &str : qAsConst(string33))
|
||||
for (const QString &str : std::as_const(string33))
|
||||
if (!string1.contains(str))
|
||||
surroundingStrings.append(str);
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "lts_coord_widget_p.h"
|
||||
#include <utility>
|
||||
|
||||
|
||||
namespace LtsCoordWidget
|
||||
@@ -188,7 +189,7 @@ void MgrsEdit::addMgrsSquare(const QString &newMgrsSquare)
|
||||
{
|
||||
QStringList squares = utmCoordsToList(LtsCoordTrans::defaultMgrsSquareWithOffsets());
|
||||
|
||||
for (const auto &sq : qAsConst(squares))
|
||||
for (const auto &sq : std::as_const(squares))
|
||||
if (!sl.contains(sq))
|
||||
sl.append(sq);
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ NGL_TARGET_LINK_LIBRARIES(LtsCoordinate
|
||||
PUBLIC
|
||||
ddscore
|
||||
LtsUtilsCoreHeaderOnly
|
||||
Qt5::Core
|
||||
Qt6::Core
|
||||
)
|
||||
|
||||
ADD_SUBDIRECTORY(UnitTest_Coordinate)
|
||||
+3
-3
@@ -21,9 +21,9 @@ TARGET_LINK_LIBRARIES(commonUnitTestCoordinate
|
||||
LtsCoordTrans
|
||||
situationMapCommon
|
||||
situationMapElevationMap
|
||||
Qt5::Core
|
||||
Qt5::Gui
|
||||
Qt5::Test)
|
||||
Qt6::Core
|
||||
Qt6::Gui
|
||||
Qt6::Test)
|
||||
|
||||
ADD_TEST(NAME commonUnitTestCoordinate COMMAND $<TARGET_FILE:commonUnitTestCoordinate>)
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <LtsCoordinate/ltscoordinate_export.h>
|
||||
#include <utility>
|
||||
|
||||
#include <Core/core.hpp>
|
||||
#include <LtsCoordTrans/lts_coord_trans.h>
|
||||
@@ -56,7 +57,7 @@ protected:
|
||||
utmVectorRef.clear();
|
||||
utmVectorRef.reserve(m_geo_coordinates.size());
|
||||
|
||||
for (const auto &geoCoord : qAsConst(m_geo_coordinates))
|
||||
for (const auto &geoCoord : std::as_const(m_geo_coordinates))
|
||||
utmVectorRef.push_back(LtsCoordTrans::UtmCoordinate::fromGeographic(geoCoord.lon(), geoCoord.lat(), zone));
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <LtsCoordinate/ltscoordinate_export.h>
|
||||
#include <utility>
|
||||
|
||||
#include <Core/core.hpp>
|
||||
#include <LtsCoordTrans/lts_coord_trans.h>
|
||||
@@ -352,7 +353,7 @@ T_OUT convert(const T_IN& contIn)
|
||||
{
|
||||
T_OUT out;
|
||||
out.reserve(contIn.size());
|
||||
for (const Core::GeoPosition &posGeo : qAsConst(contIn))
|
||||
for (const Core::GeoPosition &posGeo : std::as_const(contIn))
|
||||
out.push_back(LtsCoordinate(posGeo));
|
||||
return out;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ NGL_TARGET_LINK_LIBRARIES(LtsElevation
|
||||
situationMapElevationMap
|
||||
PUBLIC
|
||||
LtsUtilsCoreHeaderOnly
|
||||
Qt5::Core
|
||||
Qt6::Core
|
||||
)
|
||||
|
||||
ADD_SUBDIRECTORY(UnitTest_Elevation)
|
||||
+3
-3
@@ -20,9 +20,9 @@ TARGET_LINK_LIBRARIES(commenUnitTestElevation
|
||||
LtsCoordTrans
|
||||
situationMapCommon
|
||||
situationMapElevationMap
|
||||
Qt5::Core
|
||||
Qt5::Gui
|
||||
Qt5::Test)
|
||||
Qt6::Core
|
||||
Qt6::Gui
|
||||
Qt6::Test)
|
||||
|
||||
ADD_TEST(NAME commenUnitTestElevation COMMAND $<TARGET_FILE:commenUnitTestElevation>)
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "lts_elevation_manager.h"
|
||||
#include <utility>
|
||||
#include <Plugins/ExerciseManagement/exm_data_plugin_interface.h>
|
||||
#include <Plugins/AssetManagement/asm_data_plugin_interface.h>
|
||||
|
||||
@@ -348,7 +349,7 @@ QStringList LtsElevationManager::getFilenamesForTrainingArea(int trainingAreaId)
|
||||
const std::vector<AssetManagement::MapDescription> &mdVec = ta.elevation();
|
||||
filePaths_rough_to_fine.reserve(mdVec.size());
|
||||
|
||||
for (const AssetManagement::MapDescription &md : qAsConst(mdVec))
|
||||
for (const AssetManagement::MapDescription &md : std::as_const(mdVec))
|
||||
{
|
||||
|
||||
QUrl url(QString::fromStdString(md.url()));
|
||||
|
||||
@@ -23,10 +23,10 @@ NGL_TARGET_INCLUDE_DIRECTORIES(LtsLicence
|
||||
NGL_TARGET_LINK_LIBRARIES(LtsLicence
|
||||
PRIVATE
|
||||
${OPENSSL_LIBRARIES}
|
||||
Qt5::Xml
|
||||
Qt6::Xml
|
||||
NGLLogger
|
||||
PUBLIC
|
||||
Qt5::Core
|
||||
Qt6::Core
|
||||
)
|
||||
|
||||
IF (BUILD_TESTING AND TARGET LtsLicence)
|
||||
@@ -34,8 +34,8 @@ IF (BUILD_TESTING AND TARGET LtsLicence)
|
||||
TARGET_LINK_LIBRARIES(aes_crypt_test
|
||||
LtsLicence
|
||||
NGLLogger
|
||||
Qt5::Core
|
||||
Qt5::Test
|
||||
Qt6::Core
|
||||
Qt6::Test
|
||||
)
|
||||
ADD_TEST(NAME aes_crypt_test COMMAND $<TARGET_FILE:aes_crypt_test>)
|
||||
ENDIF()
|
||||
@@ -38,5 +38,5 @@ NGL_TARGET_LINK_LIBRARIES(LtsLogin
|
||||
OpmDataPluginInterface
|
||||
SrmDataPluginInterface
|
||||
AsmDataPluginInterface
|
||||
Qt5::Core
|
||||
Qt6::Core
|
||||
)
|
||||
@@ -36,10 +36,10 @@ NGL_TARGET_INCLUDE_DIRECTORIES(LtsMultiMonitor
|
||||
|
||||
NGL_TARGET_LINK_LIBRARIES(LtsMultiMonitor
|
||||
PUBLIC
|
||||
Qt5::Core
|
||||
Qt5::Widgets
|
||||
Qt6::Core
|
||||
Qt6::Widgets
|
||||
PRIVATE
|
||||
Qt5::Gui
|
||||
Qt6::Gui
|
||||
LtsWidgets
|
||||
LtsSessionData
|
||||
LtsUtilsCore
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "lts_multi_monitor.h"
|
||||
#include <utility>
|
||||
#include "lts_multi_monitor_selector_normal.h"
|
||||
#include "lts_multi_monitor_selector_wide.h"
|
||||
#include "lts_screen_normal.h"
|
||||
@@ -111,7 +112,7 @@ void LtsMultiMonitor::init()
|
||||
|
||||
bool found = false;
|
||||
|
||||
for (LtsScreenBase *ltsScreen : qAsConst(m_screens))
|
||||
for (LtsScreenBase *ltsScreen : std::as_const(m_screens))
|
||||
{
|
||||
if (ltsScreen->serialNumber() == screen.name())
|
||||
{
|
||||
@@ -247,7 +248,7 @@ bool LtsMultiMonitor::putScreen(QWidget *widget, int screenId, int screenPart)
|
||||
bool isSecondary = isWidgetSecondary(widget);
|
||||
qWarning() << "putScreen: isSecondary" << isSecondary;
|
||||
|
||||
for (LtsScreenBase *screen : qAsConst(m_screens))
|
||||
for (LtsScreenBase *screen : std::as_const(m_screens))
|
||||
{
|
||||
if (screen->screenId() != screenId)
|
||||
continue;
|
||||
@@ -289,7 +290,7 @@ bool LtsMultiMonitor::putScreenAutomatically(QWidget *widget)
|
||||
if (overlapBaseLayouts(widget))
|
||||
return true;
|
||||
|
||||
for (LtsScreenBase *screen : qAsConst(m_screens))
|
||||
for (LtsScreenBase *screen : std::as_const(m_screens))
|
||||
{
|
||||
if (screen->screenId() == m_skipScreenId || !screen->isEmpty())
|
||||
continue;
|
||||
@@ -333,7 +334,7 @@ bool LtsMultiMonitor::isOverlapBaseLayouts() const
|
||||
void LtsMultiMonitor::freezeMagicCorner(int screenId)
|
||||
{
|
||||
|
||||
for (auto *screen : qAsConst(m_screens))
|
||||
for (auto *screen : std::as_const(m_screens))
|
||||
{
|
||||
|
||||
if (screen->screenId() == screenId)
|
||||
@@ -352,7 +353,7 @@ void LtsMultiMonitor::freezeMagicCorner(int screenId)
|
||||
void LtsMultiMonitor::unfreezeMagicCorner(int screenId)
|
||||
{
|
||||
|
||||
for (auto *screen : qAsConst(m_screens))
|
||||
for (auto *screen : std::as_const(m_screens))
|
||||
{
|
||||
|
||||
if (screen->screenId() == screenId)
|
||||
@@ -420,7 +421,7 @@ bool LtsMultiMonitor::selectAndSwap(QWidget *widget)
|
||||
|
||||
|
||||
LtsScreenContainer *oldContainer = nullptr;
|
||||
for (LtsScreenBase *_screen : qAsConst(m_screens))
|
||||
for (LtsScreenBase *_screen : std::as_const(m_screens))
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -445,7 +446,7 @@ bool LtsMultiMonitor::selectAndSwap(QWidget *widget)
|
||||
|
||||
LtsScreenBase *LtsMultiMonitor::widgetsScreen(QWidget *widget)
|
||||
{
|
||||
for (LtsScreenBase *screen : qAsConst(m_screens))
|
||||
for (LtsScreenBase *screen : std::as_const(m_screens))
|
||||
if (screen->hasWidget(widget))
|
||||
return screen;
|
||||
return nullptr;
|
||||
@@ -519,7 +520,7 @@ bool LtsMultiMonitor::selectScreen(QWidget *widget, LtsScreenContainer *swap, bo
|
||||
if (!isSecondary)
|
||||
{
|
||||
bool allEmpty = putOnMainIfFree;
|
||||
for (LtsScreenBase *screen : qAsConst(m_screens))
|
||||
for (LtsScreenBase *screen : std::as_const(m_screens))
|
||||
{
|
||||
screen->switchToTemp(LtsScreenBase::WidgetType::MainWidget);
|
||||
bool isEmpty = screen->isEmpty();
|
||||
@@ -590,7 +591,7 @@ bool LtsMultiMonitor::selectScreen(QWidget *widget, LtsScreenContainer *swap, bo
|
||||
}
|
||||
|
||||
bool skip = false;
|
||||
for (QWidget *widget : qAsConst(irreplacableWidgets))
|
||||
for (QWidget *widget : std::as_const(irreplacableWidgets))
|
||||
{
|
||||
|
||||
if (screen->hasWidget(widget))
|
||||
@@ -649,7 +650,7 @@ bool LtsMultiMonitor::selectScreen(QWidget *widget, LtsScreenContainer *swap, bo
|
||||
{
|
||||
|
||||
|
||||
for (LtsScreenBase *screen : qAsConst(m_screens))
|
||||
for (LtsScreenBase *screen : std::as_const(m_screens))
|
||||
screen->check();
|
||||
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ NGL_TARGET_INCLUDE_DIRECTORIES(LtsNotification
|
||||
)
|
||||
|
||||
NGL_TARGET_LINK_LIBRARIES(LtsNotification
|
||||
Qt5::Widgets
|
||||
Qt6::Widgets
|
||||
)
|
||||
|
||||
NGL_INSTALL_TARGET(LtsNotification)
|
||||
@@ -1,6 +1,7 @@
|
||||
|
||||
|
||||
#include "lts_notification_ctl.h"
|
||||
#include <utility>
|
||||
|
||||
#include <QToolButton>
|
||||
#include <QImage>
|
||||
@@ -46,7 +47,7 @@ void LtsNotificationController::setCount(const int count)
|
||||
void LtsNotificationController::setBackground(const int r, const int g, const int b)
|
||||
{
|
||||
|
||||
for (QToolButton *tb : qAsConst(m_notiList))
|
||||
for (QToolButton *tb : std::as_const(m_notiList))
|
||||
{
|
||||
|
||||
QString stylesheet;
|
||||
@@ -81,7 +82,7 @@ void LtsNotificationController::setToolTip(const QString &toolTip)
|
||||
{
|
||||
m_toolTip = toolTip;
|
||||
|
||||
for (QToolButton *tb : qAsConst(m_notiList))
|
||||
for (QToolButton *tb : std::as_const(m_notiList))
|
||||
{
|
||||
tb->setToolTip(toolTip);
|
||||
tb->setIconSize(QSize(30,30));
|
||||
@@ -97,7 +98,7 @@ void LtsNotificationController::setAllIcons()
|
||||
|
||||
QIcon icon = modifyIcon(m_icon);
|
||||
|
||||
for (QToolButton *tb : qAsConst(m_notiList))
|
||||
for (QToolButton *tb : std::as_const(m_notiList))
|
||||
{
|
||||
tb->setIcon(icon);
|
||||
tb->setIconSize(QSize(30,30));
|
||||
@@ -120,7 +121,7 @@ QIcon LtsNotificationController::modifyIcon(const QIcon &icon)
|
||||
QPainter painter(&iconImage);
|
||||
|
||||
painter.save();
|
||||
painter.setRenderHints(QPainter::TextAntialiasing | QPainter::Antialiasing | QPainter::HighQualityAntialiasing | QPainter::SmoothPixmapTransform);
|
||||
painter.setRenderHints(QPainter::TextAntialiasing | QPainter::Antialiasing | QPainter::SmoothPixmapTransform);
|
||||
|
||||
QFont f;
|
||||
f.setFamily(QStringLiteral("Monospace"));
|
||||
|
||||
@@ -17,7 +17,7 @@ NGL_TARGET_LINK_LIBRARIES(LtsPluginLoader
|
||||
PRIVATE
|
||||
NGLLogger
|
||||
PUBLIC
|
||||
Qt5::Core
|
||||
Qt6::Core
|
||||
)
|
||||
|
||||
# LtsPluginManager
|
||||
@@ -53,11 +53,11 @@ NGL_TARGET_LINK_LIBRARIES(LtsPluginManager
|
||||
LtsWidgets
|
||||
LtsSession
|
||||
LtsSessionData
|
||||
Qt5::Widgets
|
||||
Qt6::Widgets
|
||||
PUBLIC
|
||||
ProjectConfig
|
||||
LtsAppDescriptor
|
||||
Qt5::Core
|
||||
Qt6::Core
|
||||
)
|
||||
|
||||
NGL_INSTALL_TARGET(LtsPluginManager)
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "lts_plugin_loader.h"
|
||||
#include <utility>
|
||||
|
||||
#include <NGLLogger/NGLLoggerBootstrap.h>
|
||||
#include <LtsAppDescriptor/lts_app_descriptor.h>
|
||||
@@ -49,7 +50,7 @@ LtsPluginLoader::~LtsPluginLoader()
|
||||
|
||||
void LtsPluginLoader::unloadAllPlugins()
|
||||
{
|
||||
for (auto &pi : qAsConst(m_loadedPlugins))
|
||||
for (auto &pi : std::as_const(m_loadedPlugins))
|
||||
{
|
||||
QPluginLoader *pluginLoader = pi.pluginLoader;
|
||||
|
||||
@@ -281,7 +282,7 @@ bool LtsPluginLoader::loadPlugins(PluginType requestedPluginType,
|
||||
}
|
||||
|
||||
const QString jsonIid = iid.value().toString().toLower();
|
||||
const QVector<QStringRef> iidParameters = jsonIid.splitRef(QLatin1Char(':'));
|
||||
const QStringList iidParameters = QString(jsonIid).split(QLatin1Char(':'));
|
||||
|
||||
DEBUG_LOG(logger) << "Plugin " << absoluteFilePath << " provides iid '" << jsonIid;
|
||||
|
||||
@@ -302,8 +303,8 @@ bool LtsPluginLoader::loadPlugins(PluginType requestedPluginType,
|
||||
|
||||
PluginType pluginType = PluginType::UNKNOWN;
|
||||
|
||||
const QString pluginName = iidParameters.at(2).toString();
|
||||
const QString pluginTypeString = iidParameters.at(0).toString();
|
||||
const QString pluginName = iidParameters.at(2);
|
||||
const QString pluginTypeString = iidParameters.at(0);
|
||||
switch (pluginTypes.indexOf(pluginTypeString))
|
||||
{
|
||||
case 0:
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "lts_plugin_manager.h"
|
||||
#include <utility>
|
||||
#include "Ui/lts_plugin_manager_dialog.h"
|
||||
|
||||
#include <LtsSession/lts_session_data_dds.h>
|
||||
@@ -78,7 +79,7 @@ bool LtsPluginManager::hasSituationMapInstance(const LtsAppDescriptor::AppDescri
|
||||
if (alsoTestForScriptApp && appDescription.id == LtsAppDescriptor::App::Scripts)
|
||||
return true;
|
||||
|
||||
for (const LtsAppDescriptor::PluginInfo &pluginInfo : qAsConst(appDescription.pluginInfos))
|
||||
for (const LtsAppDescriptor::PluginInfo &pluginInfo : std::as_const(appDescription.pluginInfos))
|
||||
{
|
||||
if (pluginInfo.flags.testFlag(LtsAppDescriptor::PluginInfo::Flag::ACTIONS) &&
|
||||
(pluginInfo.iid == QStringLiteral("sitmap")))
|
||||
|
||||
@@ -29,8 +29,8 @@ if (KDReports_FOUND)
|
||||
nglsettings
|
||||
ngltools
|
||||
PUBLIC
|
||||
Qt5::PrintSupport
|
||||
Qt5::Core
|
||||
Qt6::PrintSupport
|
||||
Qt6::Core
|
||||
)
|
||||
NGL_INSTALL_TARGET(LtsPrinting)
|
||||
else()
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
|
||||
#include "printing_base.h"
|
||||
#include <utility>
|
||||
#include <ngltools/ngltools_filesystem.h>
|
||||
|
||||
#include <QDateTime>
|
||||
@@ -251,7 +252,7 @@ bool Base::printListData(QString &str,
|
||||
QLatin1String("<tr>");
|
||||
|
||||
int columIdx = 0;
|
||||
for (const QModelIndex &mi :qAsConst(mil))
|
||||
for (const QModelIndex &mi :std::as_const(mil))
|
||||
{
|
||||
|
||||
if (columIdx >= nColums)
|
||||
@@ -281,7 +282,7 @@ bool Base::printListData(QString &str,
|
||||
else
|
||||
{
|
||||
|
||||
for (const QModelIndex &mi :qAsConst(mil))
|
||||
for (const QModelIndex &mi :std::as_const(mil))
|
||||
{
|
||||
if (printItemData(str, vm, mi, iconExtent))
|
||||
str += QLatin1String("<br />");
|
||||
@@ -363,7 +364,7 @@ bool Base::printTableData(QString &str,
|
||||
str += QLatin1String("<table border=\"1\" cellspacing=\"0\" cellpadding=\"3\" style=\"border-collapse:collapse\">") +
|
||||
QLatin1String("<thead>") +
|
||||
QLatin1String("<tr>");
|
||||
for (const QString &s : qAsConst(tableHeader))
|
||||
for (const QString &s : std::as_const(tableHeader))
|
||||
str += QLatin1String("<th scope=\"col\">") + s + QLatin1String("</th>");
|
||||
str += QLatin1String("</tr></thead><tbody>");
|
||||
|
||||
@@ -371,7 +372,7 @@ bool Base::printTableData(QString &str,
|
||||
|
||||
|
||||
QVector<QPair<int, int> > spannedL;
|
||||
for (const QModelIndex &mi :qAsConst(mil))
|
||||
for (const QModelIndex &mi :std::as_const(mil))
|
||||
{
|
||||
str += QLatin1String("<tr>");
|
||||
for (int ii = 0; ii < colCount; ii++)
|
||||
@@ -508,10 +509,10 @@ bool Base::printTreeData(QString &str,
|
||||
}
|
||||
}
|
||||
|
||||
for (const QString &s : qAsConst(tableHeader))
|
||||
for (const QString &s : std::as_const(tableHeader))
|
||||
str += QLatin1String("<th align=\"left\"><h4>") + s + QLatin1String("</h4></th>");
|
||||
str += QLatin1String("</tr>");
|
||||
for (const QModelIndex &miColumn0 : qAsConst(milColumn0))
|
||||
for (const QModelIndex &miColumn0 : std::as_const(milColumn0))
|
||||
printListPoint(str, view, vm, miColumn0, suppressCols, iconExtent);
|
||||
|
||||
str += QLatin1String("</tbody></table><br /><br />");
|
||||
|
||||
@@ -34,9 +34,9 @@ NGL_TARGET_INCLUDE_DIRECTORIES(LtsProjectionWorkstation
|
||||
|
||||
NGL_TARGET_LINK_LIBRARIES(LtsProjectionWorkstation
|
||||
PUBLIC
|
||||
Qt5::Core
|
||||
Qt6::Core
|
||||
PRIVATE
|
||||
Qt5::Gui
|
||||
Qt6::Gui
|
||||
NGLLogger
|
||||
nglsettings
|
||||
LtsWebSocketServer
|
||||
|
||||
+2
-1
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "lts_projection_workstation.h"
|
||||
#include <utility>
|
||||
#include "WebSocket/message_factory.h"
|
||||
#include "WebSocket/json_keys.h"
|
||||
|
||||
@@ -212,7 +213,7 @@ void LtsProjectionWorkstation::slotLogoffDone()
|
||||
{
|
||||
if (hasPendingLoginRequest())
|
||||
return;
|
||||
for (LtsWebSocket::ClientConnection *con : qAsConst(m_connections))
|
||||
for (LtsWebSocket::ClientConnection *con : std::as_const(m_connections))
|
||||
con->webSocket()->close();
|
||||
}
|
||||
|
||||
|
||||
+5
-4
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "vnc_server_manager.h"
|
||||
#include <utility>
|
||||
|
||||
#include <QRegularExpression>
|
||||
#include <QScreen>
|
||||
@@ -83,7 +84,7 @@ bool VncServerManager::init(const QList<QScreen *> &screens)
|
||||
void VncServerManager::startScreens()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Starting " << m_vncScreens.size() << " VNCScreen(s) ... ";
|
||||
for (const VncScreen &s : qAsConst(m_vncScreens))
|
||||
for (const VncScreen &s : std::as_const(m_vncScreens))
|
||||
{
|
||||
connect(s.proc, &QProcess::readyReadStandardOutput,
|
||||
this, &VncServerManager::slotReadStandardOutput, Qt::UniqueConnection);
|
||||
@@ -91,7 +92,7 @@ void VncServerManager::startScreens()
|
||||
this, &VncServerManager::slotErrorOccured, Qt::UniqueConnection);
|
||||
s.proc->start();
|
||||
}
|
||||
for (const VncScreen &s : qAsConst(m_vncScreens))
|
||||
for (const VncScreen &s : std::as_const(m_vncScreens))
|
||||
{
|
||||
if (!s.proc->waitForStarted(2000))
|
||||
ERROR_LOG(m_logger) << "Can not start process '" << s.proc->program() << "': "
|
||||
@@ -105,12 +106,12 @@ void VncServerManager::stopScreens()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Stopping " << m_vncScreens.size() << " VNCScreen(s) ...";
|
||||
|
||||
for (const VncScreen &s : qAsConst(m_vncScreens))
|
||||
for (const VncScreen &s : std::as_const(m_vncScreens))
|
||||
{
|
||||
s.proc->disconnect(this);
|
||||
s.proc->terminate();
|
||||
}
|
||||
for (const VncScreen &s : qAsConst(m_vncScreens))
|
||||
for (const VncScreen &s : std::as_const(m_vncScreens))
|
||||
{
|
||||
if (!s.proc->waitForFinished(2000))
|
||||
s.proc->kill();
|
||||
|
||||
@@ -63,8 +63,8 @@ NGL_TARGET_INCLUDE_DIRECTORIES(LtsScriptTimeline
|
||||
)
|
||||
|
||||
NGL_TARGET_LINK_LIBRARIES(LtsScriptTimeline
|
||||
Qt5::Core
|
||||
Qt5::Widgets
|
||||
Qt6::Core
|
||||
Qt6::Widgets
|
||||
LtsWidgets
|
||||
LtsSessionData
|
||||
)
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "script_timeline.h"
|
||||
#include <utility>
|
||||
#include "ui_script_timeline.h"
|
||||
#include "track_widget.h"
|
||||
#include "tools.h"
|
||||
@@ -437,7 +438,7 @@ TrackEntry *ScriptTimeline::getTrackEntryWithFiltersAsEntries(int topicId)
|
||||
for (const TrackWidget *tw : trackWidgetList)
|
||||
{
|
||||
const QVector<TrackEntry *> trackEntries = tw->getTrackEntriesFiltersAsEntries();
|
||||
for (TrackEntry *te : qAsConst(trackEntries))
|
||||
for (TrackEntry *te : std::as_const(trackEntries))
|
||||
{
|
||||
if (te->m_topicId == topicId)
|
||||
return te;
|
||||
@@ -507,7 +508,7 @@ bool ScriptTimeline::importTrackEntries(const QVector<LtsScriptTimeline::TrackEn
|
||||
{
|
||||
|
||||
int importLength = 0;
|
||||
for (TrackEntry *te : qAsConst(importTes))
|
||||
for (TrackEntry *te : std::as_const(importTes))
|
||||
{
|
||||
int teLen = te->m_startTime + te->m_length;
|
||||
if (teLen > importLength)
|
||||
@@ -519,7 +520,7 @@ bool ScriptTimeline::importTrackEntries(const QVector<LtsScriptTimeline::TrackEn
|
||||
const QVector<TrackEntry *> tes = getTrackEntries();
|
||||
int pasteTime = m_time;
|
||||
|
||||
for (TrackEntry *te : qAsConst(tes))
|
||||
for (TrackEntry *te : std::as_const(tes))
|
||||
{
|
||||
int start = te->m_startTime;
|
||||
int sum = start + te->m_length;
|
||||
@@ -536,7 +537,7 @@ bool ScriptTimeline::importTrackEntries(const QVector<LtsScriptTimeline::TrackEn
|
||||
|
||||
|
||||
|
||||
for (TrackEntry *te : qAsConst(tes))
|
||||
for (TrackEntry *te : std::as_const(tes))
|
||||
{
|
||||
if (te->m_startTime >= m_time)
|
||||
te->m_startTime += importLength + diff;
|
||||
@@ -608,7 +609,7 @@ QVector<TrackEntry *> ScriptTimeline::getSelectedEntriesWithFilterEntries() cons
|
||||
|
||||
const QList<TrackWidget *> tws = getTrackWidgets();
|
||||
|
||||
for (const TrackWidget *tw : qAsConst(tws))
|
||||
for (const TrackWidget *tw : std::as_const(tws))
|
||||
tes += tw->getTrackEntriesFiltersAsEntries(true);
|
||||
|
||||
return tes;
|
||||
@@ -655,7 +656,7 @@ QVector<TrackEntry *> ScriptTimeline::getSelectedFilterEntries() const
|
||||
QVector<TrackEntry *> result;
|
||||
|
||||
const QList<TrackWidget *> tws = getTrackWidgets();
|
||||
for (const TrackWidget *tw : qAsConst(tws))
|
||||
for (const TrackWidget *tw : std::as_const(tws))
|
||||
{
|
||||
result += tw->getSelectedFilterEntries();
|
||||
}
|
||||
@@ -669,7 +670,7 @@ void ScriptTimeline::slotDeleteSelectedTopics()
|
||||
int topicCount = 0;
|
||||
|
||||
const QList<TrackWidget *> tws = getTrackWidgets();
|
||||
for (const TrackWidget *tw : qAsConst(tws))
|
||||
for (const TrackWidget *tw : std::as_const(tws))
|
||||
{
|
||||
topicCount += tw->getSelectedFilterEntries().count();
|
||||
|
||||
@@ -689,12 +690,12 @@ void ScriptTimeline::slotDeleteSelectedTopics()
|
||||
this, [this]()
|
||||
{
|
||||
const QList<TrackWidget *> tws = getTrackWidgets();
|
||||
for (const TrackWidget *tw : qAsConst(tws))
|
||||
for (const TrackWidget *tw : std::as_const(tws))
|
||||
{
|
||||
|
||||
const QVector<FilterTrackWidget *> &ftws = tw->filterLines();
|
||||
|
||||
for (const FilterTrackWidget *ftw : qAsConst(ftws))
|
||||
for (const FilterTrackWidget *ftw : std::as_const(ftws))
|
||||
{
|
||||
const FilterBackgroundWidget *fbw = ftw->fbw();
|
||||
const QMap<int , TrackContentWidget *> &fcws = fbw->filterContentWidgets();
|
||||
@@ -715,7 +716,7 @@ void ScriptTimeline::slotCutTopics()
|
||||
slotCopyTopics();
|
||||
|
||||
const QList<TrackWidget *> tws = getTrackWidgets();
|
||||
for (const TrackWidget *tw : qAsConst(tws))
|
||||
for (const TrackWidget *tw : std::as_const(tws))
|
||||
{
|
||||
TrackContentWidget *tcw = tw->getTrackContentWidget();
|
||||
tcw->deleteSelectedTopics();
|
||||
@@ -730,7 +731,7 @@ void ScriptTimeline::slotCopyTopics()
|
||||
|
||||
|
||||
|
||||
for (const TrackWidget *tw : qAsConst(tws))
|
||||
for (const TrackWidget *tw : std::as_const(tws))
|
||||
{
|
||||
TrackContentWidget *tcw = tw->getTrackContentWidget();
|
||||
|
||||
@@ -739,7 +740,7 @@ void ScriptTimeline::slotCopyTopics()
|
||||
if (tcw->getSelectedEntries().isEmpty())
|
||||
continue;
|
||||
|
||||
for (const TrackEntry *te : qAsConst(selected))
|
||||
for (const TrackEntry *te : std::as_const(selected))
|
||||
{
|
||||
if (firstTeTime > te->m_startTime || firstTeTime == -1)
|
||||
firstTeTime = te->m_startTime;
|
||||
@@ -824,7 +825,7 @@ void ScriptTimeline::slotMoveAll(int direction)
|
||||
QList<TrackWidget *> tws = getTrackWidgets();
|
||||
|
||||
|
||||
for (TrackWidget *tw : qAsConst(tws))
|
||||
for (TrackWidget *tw : std::as_const(tws))
|
||||
{
|
||||
TrackContentWidget *tcw = tw->getTrackContentWidget();
|
||||
if (!tcw->canMoveAll(direction * factor))
|
||||
@@ -836,7 +837,7 @@ void ScriptTimeline::slotMoveAll(int direction)
|
||||
}
|
||||
|
||||
|
||||
for (TrackWidget *tw : qAsConst(tws))
|
||||
for (TrackWidget *tw : std::as_const(tws))
|
||||
{
|
||||
TrackContentWidget *tcw = tw->getTrackContentWidget();
|
||||
tcw->forceMoveAll(direction * factor);
|
||||
@@ -1153,7 +1154,7 @@ void ScriptTimeline::slotTrackEntrySelectionChanged(TrackEntry *)
|
||||
}
|
||||
|
||||
|
||||
for (TrackWidget *tw : qAsConst(tws))
|
||||
for (TrackWidget *tw : std::as_const(tws))
|
||||
tw->getTrackContentWidget()->setMultiLineMultiSelectionMode(activateMultiLineMultiSelectionMode);
|
||||
|
||||
emit signalTrackEntrySelectionChanged(nullptr);
|
||||
|
||||
+28
-27
@@ -1,4 +1,5 @@
|
||||
#include "track_content_widget.h"
|
||||
#include <utility>
|
||||
#include "track_entry.h"
|
||||
#include "tools.h"
|
||||
#include "track_entry_painters.h"
|
||||
@@ -170,7 +171,7 @@ bool TrackContentWidget::checkForCollisions(const TrackContentWidget *tcw, const
|
||||
{
|
||||
|
||||
const QVector<TrackEntry *> &selectedEntries = tcw->getSelectedEntries();
|
||||
for (TrackEntry *te : qAsConst(trackEntries))
|
||||
for (TrackEntry *te : std::as_const(trackEntries))
|
||||
{
|
||||
if (!selectedEntries.contains(te))
|
||||
vecEntriesToCheck.append(te);
|
||||
@@ -192,7 +193,7 @@ bool TrackContentWidget::checkForCollisions(const TrackContentWidget *tcw, const
|
||||
int startOffset_s = dropTime_s - startTimeMostLeft_s;
|
||||
|
||||
|
||||
for (TrackEntry *previewEntry : qAsConst(_preview))
|
||||
for (TrackEntry *previewEntry : std::as_const(_preview))
|
||||
{
|
||||
int startPreview_s = previewEntry->m_startTime + startOffset_s;
|
||||
|
||||
@@ -204,7 +205,7 @@ bool TrackContentWidget::checkForCollisions(const TrackContentWidget *tcw, const
|
||||
|
||||
int endPreview_s = startPreview_s + previewEntry->m_length;
|
||||
|
||||
for (const TrackEntry *checkTe : qAsConst(vecEntriesToCheck))
|
||||
for (const TrackEntry *checkTe : std::as_const(vecEntriesToCheck))
|
||||
{
|
||||
if (checkTe->m_topicId == previewEntry->m_topicId && !ignoreSelfCheck)
|
||||
{
|
||||
@@ -300,7 +301,7 @@ bool TrackContentWidget::checkForParallelTopics(const TrackContentWidget *tcw, c
|
||||
|
||||
|
||||
|
||||
for (TrackEntry *previewEntry : qAsConst(previewCopy))
|
||||
for (TrackEntry *previewEntry : std::as_const(previewCopy))
|
||||
{
|
||||
|
||||
|
||||
@@ -311,7 +312,7 @@ bool TrackContentWidget::checkForParallelTopics(const TrackContentWidget *tcw, c
|
||||
|
||||
|
||||
|
||||
for (TrackEntry *pTrackEntry : qAsConst(vecTrackEntries))
|
||||
for (TrackEntry *pTrackEntry : std::as_const(vecTrackEntries))
|
||||
{
|
||||
|
||||
|
||||
@@ -443,7 +444,7 @@ bool TrackContentWidget::checkForParallelTopics(const TrackContentWidget *tcw, c
|
||||
|
||||
QVector<TrackEntryType> correspondingDifferentTopicTypes;
|
||||
|
||||
for (TrackEntry *previewEntry : qAsConst(previewCopy))
|
||||
for (TrackEntry *previewEntry : std::as_const(previewCopy))
|
||||
{
|
||||
correspondingDifferentTopicTypes.clear();
|
||||
|
||||
@@ -454,7 +455,7 @@ bool TrackContentWidget::checkForParallelTopics(const TrackContentWidget *tcw, c
|
||||
startOffset_s -= startTimeMostLeft_s;
|
||||
|
||||
|
||||
for (const QPair<TrackEntryType, TrackEntryType> &pair : qAsConst(differentParallelForbidden))
|
||||
for (const QPair<TrackEntryType, TrackEntryType> &pair : std::as_const(differentParallelForbidden))
|
||||
{
|
||||
if (pair.first == previewEntry->m_type)
|
||||
correspondingDifferentTopicTypes += pair.second;
|
||||
@@ -468,11 +469,11 @@ bool TrackContentWidget::checkForParallelTopics(const TrackContentWidget *tcw, c
|
||||
if (correspondingDifferentTopicTypes.isEmpty())
|
||||
continue;
|
||||
|
||||
for (const TrackEntryType correspondingDifferentTopicType : qAsConst(correspondingDifferentTopicTypes))
|
||||
for (const TrackEntryType correspondingDifferentTopicType : std::as_const(correspondingDifferentTopicTypes))
|
||||
{
|
||||
|
||||
|
||||
for (TrackEntry *pTrackEntry : qAsConst(vecTrackEntries))
|
||||
for (TrackEntry *pTrackEntry : std::as_const(vecTrackEntries))
|
||||
{
|
||||
|
||||
|
||||
@@ -769,7 +770,7 @@ void TrackContentWidget::paintEvent(QPaintEvent *event)
|
||||
{
|
||||
int firstTeTime = -1;
|
||||
|
||||
for (const TrackEntry *te : qAsConst(m_preview))
|
||||
for (const TrackEntry *te : std::as_const(m_preview))
|
||||
{
|
||||
if (firstTeTime > te->m_startTime || firstTeTime == -1)
|
||||
firstTeTime = te->m_startTime;
|
||||
@@ -863,7 +864,7 @@ void TrackContentWidget::selectAll()
|
||||
{
|
||||
m_selected.clear();
|
||||
|
||||
for (TrackEntry *te : qAsConst(m_entryList))
|
||||
for (TrackEntry *te : std::as_const(m_entryList))
|
||||
{
|
||||
m_selected.append(te);
|
||||
m_mainSelected = te;
|
||||
@@ -1035,7 +1036,7 @@ bool TrackContentWidget::canMoveAll(int offset) const
|
||||
checkForCollisions(this, m_selected, newTime, cols, true);
|
||||
|
||||
QVector<TrackEntry *> parls;
|
||||
for (const auto &tcw : qAsConst(m_tcwCorresponding))
|
||||
for (const auto &tcw : std::as_const(m_tcwCorresponding))
|
||||
checkForParallelTopics(tcw, m_selected, newTime, parls);
|
||||
|
||||
if (!cols.isEmpty() || !parls.isEmpty())
|
||||
@@ -1168,7 +1169,7 @@ void TrackContentWidget::selectEntriesAtPositions(int fromPos, int toPos)
|
||||
{
|
||||
m_unselectAllImmune = true;
|
||||
|
||||
for (TrackEntry *te : qAsConst(m_entryList))
|
||||
for (TrackEntry *te : std::as_const(m_entryList))
|
||||
{
|
||||
int start = m_tools->getPos(te->m_startTime);
|
||||
int end = m_tools->getPos(te->m_startTime + te->m_length);
|
||||
@@ -1215,7 +1216,7 @@ bool TrackContentWidget::canPasteTopics(const QVector<TrackEntry *> &topics, int
|
||||
TemporaryPointerVector<TrackEntry *> newTes;
|
||||
|
||||
newTes.reserve(topics.size());
|
||||
for (TrackEntry *te : qAsConst(topics))
|
||||
for (TrackEntry *te : std::as_const(topics))
|
||||
{
|
||||
TrackEntry *newTe = new TrackEntry(te);
|
||||
newTe->m_startTime = (newTe->m_startTime - offsetTime + pasteTime);
|
||||
@@ -1228,7 +1229,7 @@ bool TrackContentWidget::canPasteTopics(const QVector<TrackEntry *> &topics, int
|
||||
|
||||
bool parl = false;
|
||||
|
||||
for (const auto &tcw : qAsConst(m_tcwCorresponding))
|
||||
for (const auto &tcw : std::as_const(m_tcwCorresponding))
|
||||
{
|
||||
parl = checkForParallelTopics(tcw, newTes, pasteTime, true );
|
||||
if (parl)
|
||||
@@ -1252,7 +1253,7 @@ void TrackContentWidget::forcePasteTopics(const QVector<TrackEntry *> &topics, i
|
||||
m_selected.clear();
|
||||
|
||||
|
||||
for (TrackEntry *te : qAsConst(topics))
|
||||
for (TrackEntry *te : std::as_const(topics))
|
||||
{
|
||||
TrackEntry *newTe = new TrackEntry(te);
|
||||
newTe->m_topicId = m_scriptTimeline->nextUniqueId();
|
||||
@@ -1345,7 +1346,7 @@ bool TrackContentWidget::dragEnter(const QByteArray &itemData)
|
||||
if (tes.isEmpty())
|
||||
return false;
|
||||
|
||||
for (TrackEntry *te : qAsConst(tes))
|
||||
for (TrackEntry *te : std::as_const(tes))
|
||||
{
|
||||
if (!allowedByType(te))
|
||||
{
|
||||
@@ -1370,11 +1371,11 @@ bool TrackContentWidget::dragEnter(const QByteArray &itemData)
|
||||
|
||||
if (m_isMultiLineMultiSelectionMode)
|
||||
{
|
||||
for (TrackEntry *te : qAsConst(tes))
|
||||
for (TrackEntry *te : std::as_const(tes))
|
||||
{
|
||||
bool found = false;
|
||||
|
||||
for (TrackEntry *thisTe : qAsConst(thisTes))
|
||||
for (TrackEntry *thisTe : std::as_const(thisTes))
|
||||
{
|
||||
if (thisTe->m_topicId == te->m_topicId)
|
||||
{
|
||||
@@ -1397,7 +1398,7 @@ bool TrackContentWidget::dragEnter(const QByteArray &itemData)
|
||||
TrackEntry *pPreview = tes.front();
|
||||
bool hasJustBeenAddedByUser = true;
|
||||
|
||||
for (auto pTE : qAsConst(m_entryList))
|
||||
for (auto pTE : std::as_const(m_entryList))
|
||||
{
|
||||
if (pPreview->m_topicId == pTE->m_topicId)
|
||||
{
|
||||
@@ -1407,9 +1408,9 @@ bool TrackContentWidget::dragEnter(const QByteArray &itemData)
|
||||
}
|
||||
|
||||
|
||||
for (const auto &tcw : qAsConst(m_tcwCorresponding))
|
||||
for (const auto &tcw : std::as_const(m_tcwCorresponding))
|
||||
{
|
||||
for (auto pTE : qAsConst(tcw->m_entryList))
|
||||
for (auto pTE : std::as_const(tcw->m_entryList))
|
||||
{
|
||||
if (pPreview->m_topicId == pTE->m_topicId)
|
||||
{
|
||||
@@ -1424,7 +1425,7 @@ bool TrackContentWidget::dragEnter(const QByteArray &itemData)
|
||||
|
||||
m_selected.clear();
|
||||
|
||||
for (const auto &tcw : qAsConst(m_tcwCorresponding))
|
||||
for (const auto &tcw : std::as_const(m_tcwCorresponding))
|
||||
tcw->m_selected.clear();
|
||||
}
|
||||
}
|
||||
@@ -1472,7 +1473,7 @@ bool TrackContentWidget::dragDrop(int pos)
|
||||
|
||||
int firstTeTime = -1;
|
||||
|
||||
for (const TrackEntry *te : qAsConst(m_preview))
|
||||
for (const TrackEntry *te : std::as_const(m_preview))
|
||||
{
|
||||
if (firstTeTime > te->m_startTime || firstTeTime == -1)
|
||||
firstTeTime = te->m_startTime;
|
||||
@@ -1509,7 +1510,7 @@ bool TrackContentWidget::dragDrop(int pos)
|
||||
update();
|
||||
|
||||
|
||||
for (const auto &tcw : qAsConst(m_tcwCorresponding))
|
||||
for (const auto &tcw : std::as_const(m_tcwCorresponding))
|
||||
tcw->removeTrackEntryByTopicId(prevTe);
|
||||
|
||||
m_unselectAllImmune = false;
|
||||
@@ -1520,7 +1521,7 @@ bool TrackContentWidget::dragDrop(int pos)
|
||||
if (m_isMultiLineMultiSelectionMode)
|
||||
{
|
||||
|
||||
for (TrackEntry *oldSel : qAsConst(selectedOld))
|
||||
for (TrackEntry *oldSel : std::as_const(selectedOld))
|
||||
emit signalTrackEntryDeleted(oldSel->m_topicId);
|
||||
qDeleteAll(selectedOld);
|
||||
|
||||
@@ -1540,7 +1541,7 @@ bool TrackContentWidget::dragMove(int pos)
|
||||
checkForCollisions(this, m_preview, dropTime_s, m_dragHandler->m_vecCollisions, true);
|
||||
|
||||
m_dragHandler->m_vecParallel.clear();
|
||||
for (const auto &tcw : qAsConst(m_tcwCorresponding))
|
||||
for (const auto &tcw : std::as_const(m_tcwCorresponding))
|
||||
checkForParallelTopics(tcw, m_preview, dropTime_s, m_dragHandler->m_vecParallel);
|
||||
|
||||
m_moveValid = m_dragHandler->m_vecCollisions.isEmpty() && m_dragHandler->m_vecParallel.isEmpty();
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "track_drag_handler.h"
|
||||
#include <utility>
|
||||
|
||||
#include "track_content_widget.h"
|
||||
#include "track_entry.h"
|
||||
@@ -33,7 +34,7 @@ void DragHandler::dragEnterEvent(QDragEnterEvent *event)
|
||||
}
|
||||
else
|
||||
{
|
||||
for (const auto &tcw : qAsConst(m_tcwCorresponding))
|
||||
for (const auto &tcw : std::as_const(m_tcwCorresponding))
|
||||
tcw->dragEnter(tcw->selectedItemsToData(tcw->m_tools->getTime(m_dragStartPos.x())));
|
||||
}
|
||||
}
|
||||
@@ -53,7 +54,7 @@ void DragHandler::dragLeaveEvent(QDragLeaveEvent *event)
|
||||
if (m_tcw->isMultiLineMultiSelectionMode())
|
||||
{
|
||||
event->ignore();
|
||||
for (const auto &tcw : qAsConst(m_tcwCorresponding))
|
||||
for (const auto &tcw : std::as_const(m_tcwCorresponding))
|
||||
tcw->dragEnd();
|
||||
}
|
||||
|
||||
@@ -68,7 +69,7 @@ void DragHandler::dropEvent(QDropEvent *event)
|
||||
|
||||
|
||||
|
||||
for (const auto &tcw : qAsConst(m_tcwCorresponding))
|
||||
for (const auto &tcw : std::as_const(m_tcwCorresponding))
|
||||
{
|
||||
bool hasParallelTopicsOfSameType = TrackContentWidget::checkForParallelTopics(tcw, m_tcw->m_preview, dropTime);
|
||||
|
||||
|
||||
+3
-2
@@ -1,4 +1,5 @@
|
||||
#include "track_resize_handler.h"
|
||||
#include <utility>
|
||||
#include "track_entry.h"
|
||||
#include "track_widget.h"
|
||||
#include "track_content_widget.h"
|
||||
@@ -40,7 +41,7 @@ void ResizeHandler::mouseReleaseEvent(QMouseEvent *)
|
||||
QVector<TrackEntry *> vecPreviewTrackEntries = {m_trackContentWidget->m_mainSelected};
|
||||
|
||||
bool msg = true;
|
||||
for (TrackContentWidget *tcw : qAsConst(m_tcwCorresponding))
|
||||
for (TrackContentWidget *tcw : std::as_const(m_tcwCorresponding))
|
||||
{
|
||||
if (TrackContentWidget::checkForParallelTopics(tcw, vecPreviewTrackEntries, m_trackContentWidget->m_mainSelected->m_startTime))
|
||||
{
|
||||
@@ -74,7 +75,7 @@ bool ResizeHandler::isCollision(int newLength) const
|
||||
|
||||
|
||||
const QVector<FilterTrackWidget *> &filterTrackWidgets = m_trackContentWidget->trackWidget()->filterLines();
|
||||
for (const FilterTrackWidget *filterTrackWidget : qAsConst(filterTrackWidgets))
|
||||
for (const FilterTrackWidget *filterTrackWidget : std::as_const(filterTrackWidgets))
|
||||
{
|
||||
for (auto iFilterContentWidget = filterTrackWidget->fbw()->filterContentWidgets().begin(); iFilterContentWidget != filterTrackWidget->fbw()->filterContentWidgets().end(); ++iFilterContentWidget)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "track_widget.h"
|
||||
#include <utility>
|
||||
#include "ui_track_widget.h"
|
||||
#include "track_entry.h"
|
||||
#include "filter_track_widget.h"
|
||||
@@ -115,7 +116,7 @@ QVector<TrackEntry *> TrackWidget::getSelectedFilterEntries() const
|
||||
QVector<TrackEntry *> result;
|
||||
const QVector<FilterTrackWidget *> &ftws = filterLines();
|
||||
|
||||
for (const FilterTrackWidget *ftw : qAsConst(ftws))
|
||||
for (const FilterTrackWidget *ftw : std::as_const(ftws))
|
||||
{
|
||||
const FilterBackgroundWidget *fbw = ftw->fbw();
|
||||
const QMap<int , TrackContentWidget *> &fcws = fbw->filterContentWidgets();
|
||||
@@ -197,7 +198,7 @@ void TrackWidget::slotTrackEntryAdded(TrackEntry *te)
|
||||
{
|
||||
|
||||
|
||||
for (FilterTrackWidget *ftw : qAsConst(m_filterLines))
|
||||
for (FilterTrackWidget *ftw : std::as_const(m_filterLines))
|
||||
ftw->fbw()->trackEntryAdded(te);
|
||||
|
||||
emit signalTrackEntryAdded(te);
|
||||
@@ -208,7 +209,7 @@ void TrackWidget::slotTrackEntryDeleted(const int topicId)
|
||||
{
|
||||
|
||||
|
||||
for (FilterTrackWidget *ftw : qAsConst(m_filterLines))
|
||||
for (FilterTrackWidget *ftw : std::as_const(m_filterLines))
|
||||
ftw->fbw()->trackEntryDeleted(topicId);
|
||||
|
||||
emit signalTrackEntryDeleted(topicId);
|
||||
@@ -291,7 +292,7 @@ QVector<TrackEntry *> TrackWidget::getTrackEntriesWithFilters(bool selectedEntri
|
||||
QJsonArray jsonFilterLines;
|
||||
|
||||
|
||||
for (const FilterTrackWidget *ftw : qAsConst(m_filterLines))
|
||||
for (const FilterTrackWidget *ftw : std::as_const(m_filterLines))
|
||||
{
|
||||
const FilterBackgroundWidget *fbw = ftw->fbw();
|
||||
const QMap<int , TrackContentWidget *> &filterContentWidgets = fbw->filterContentWidgets();
|
||||
@@ -381,7 +382,7 @@ void TrackWidget::setBaseWidth(int width)
|
||||
ui->mainLeft->setMinimumWidth(width);
|
||||
ui->mainLeft->setMaximumWidth(width);
|
||||
|
||||
for (FilterTrackWidget *ftw : qAsConst(m_filterLines))
|
||||
for (FilterTrackWidget *ftw : std::as_const(m_filterLines))
|
||||
ftw->setBaseWidth(m_baseWidth);
|
||||
}
|
||||
|
||||
@@ -493,7 +494,7 @@ void TrackWidget::unselectAll()
|
||||
{
|
||||
ui->mainTrack->unselectAll();
|
||||
|
||||
for (FilterTrackWidget *ftw : qAsConst(m_filterLines))
|
||||
for (FilterTrackWidget *ftw : std::as_const(m_filterLines))
|
||||
{
|
||||
const auto fcw = ftw->fbw()->filterContentWidgets();
|
||||
for (TrackContentWidget *tcw : fcw)
|
||||
@@ -514,7 +515,7 @@ void TrackWidget::setIndicatorTime(int time)
|
||||
{
|
||||
ui->mainTrack->setIndicatorTime(time);
|
||||
|
||||
for (FilterTrackWidget *ftw : qAsConst(m_filterLines))
|
||||
for (FilterTrackWidget *ftw : std::as_const(m_filterLines))
|
||||
{
|
||||
const auto filterContentWidgets = ftw->fbw()->filterContentWidgets();
|
||||
|
||||
|
||||
@@ -27,5 +27,5 @@ NGL_TARGET_LINK_LIBRARIES(LtsSerialPortQuerry
|
||||
PRIVATE
|
||||
PUBLIC
|
||||
NGLLogger
|
||||
Qt5::SerialPort
|
||||
Qt6::SerialPort
|
||||
)
|
||||
@@ -23,7 +23,7 @@ NGL_TARGET_LINK_LIBRARIES(LtsSessionDataDds
|
||||
PUBLIC
|
||||
ddscore
|
||||
NGLLogger
|
||||
Qt5::Core
|
||||
Qt6::Core
|
||||
)
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ NGL_TARGET_INCLUDE_DIRECTORIES(LtsSession
|
||||
|
||||
NGL_TARGET_LINK_LIBRARIES(LtsSession
|
||||
PRIVATE
|
||||
Qt5::Network
|
||||
Qt6::Network
|
||||
LtsMultiMonitor
|
||||
LtsSessionData
|
||||
ddsconnector
|
||||
@@ -54,11 +54,11 @@ NGL_TARGET_LINK_LIBRARIES(LtsSession
|
||||
LtsNotification
|
||||
svcCoreClient # Core Ftc - for TLH
|
||||
OhpOnlineHelpViewerGuiPluginInterface
|
||||
Qt5::Svg
|
||||
Qt6::Svg
|
||||
PUBLIC
|
||||
LtsWidgets
|
||||
LtsSessionDataDds
|
||||
Qt5::Core
|
||||
Qt6::Core
|
||||
GuiPluginInterface
|
||||
DataPluginInterface
|
||||
NGLLogger
|
||||
@@ -81,7 +81,7 @@ NGL_TARGET_INCLUDE_DIRECTORIES(LtsSessionData
|
||||
|
||||
NGL_TARGET_LINK_LIBRARIES(LtsSessionData
|
||||
PUBLIC
|
||||
Qt5::Core
|
||||
Qt5::Gui # QPixmap as Storage for Profile Picture
|
||||
Qt6::Core
|
||||
Qt6::Gui # QPixmap as Storage for Profile Picture
|
||||
ddscore
|
||||
)
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "lts_session.h"
|
||||
#include <utility>
|
||||
#include "lts_session_manager.h"
|
||||
#include "lts_session_data_dds.h"
|
||||
#include "lts_session_lock_handler.h"
|
||||
@@ -1138,7 +1139,7 @@ void LtsSession::createBaseLayout()
|
||||
addDeveloperActions();
|
||||
|
||||
|
||||
for (LtsNotification::LtsNotificationController *ctl : qAsConst(m_notiCtlList))
|
||||
for (LtsNotification::LtsNotificationController *ctl : std::as_const(m_notiCtlList))
|
||||
{
|
||||
if (!m_baseLayout->notificationExists(ctl->identifier()))
|
||||
m_baseLayout->addNotification(ctl->createWidget());
|
||||
|
||||
@@ -55,9 +55,9 @@ NGL_TARGET_LINK_LIBRARIES(LtsTimeline
|
||||
NGLLogger
|
||||
ngltools # DTG
|
||||
LtsWidgets # LtsMessageDialogNew for remove filter track
|
||||
Qt5::Core
|
||||
Qt5::Gui
|
||||
Qt5::Widgets
|
||||
Qt6::Core
|
||||
Qt6::Gui
|
||||
Qt6::Widgets
|
||||
)
|
||||
NGL_INSTALL_TARGET(LtsTimeline)
|
||||
|
||||
@@ -68,7 +68,7 @@ NGL_TARGET_LINK_LIBRARIES(LtsTimelineTest
|
||||
LtsTimeline
|
||||
nglapplication
|
||||
NGLLogger
|
||||
Qt5::Core
|
||||
Qt5::Gui
|
||||
Qt5::Widgets
|
||||
Qt6::Core
|
||||
Qt6::Gui
|
||||
Qt6::Widgets
|
||||
)
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "timeline_header_view.h"
|
||||
#include <utility>
|
||||
#include "timeline_view.h"
|
||||
|
||||
#include <QGuiApplication>
|
||||
@@ -400,7 +401,7 @@ void TimelineHeaderView::paintSection(QPainter *painter, const QRect &rect, int
|
||||
int height = (bottom - rect.top()) / 2;
|
||||
|
||||
|
||||
for (const Tick &tick : qAsConst(m_majorTicks))
|
||||
for (const Tick &tick : std::as_const(m_majorTicks))
|
||||
{
|
||||
painter->setPen(QPen(QGuiApplication::palette().color(QPalette::Text), 1));
|
||||
painter->drawText(QRect(tick.pos - 160 / 2, rect.top(), 160, height), Qt::AlignCenter, tick.label);
|
||||
@@ -413,11 +414,11 @@ void TimelineHeaderView::paintSection(QPainter *painter, const QRect &rect, int
|
||||
painter->setPen(QPen(QGuiApplication::palette().color(QPalette::Text), 1));
|
||||
|
||||
|
||||
for (const Tick &tick : qAsConst(m_mediumTicks))
|
||||
for (const Tick &tick : std::as_const(m_mediumTicks))
|
||||
painter->drawLine(tick.pos, bottom - static_cast<int>(double(height) * 2 / 3), tick.pos, bottom);
|
||||
|
||||
|
||||
for (const Tick &tick : qAsConst(m_minorTicks))
|
||||
for (const Tick &tick : std::as_const(m_minorTicks))
|
||||
painter->drawLine(tick.pos, bottom - static_cast<int>(double(height) / 3), tick.pos, bottom);
|
||||
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "timeline_model.h"
|
||||
#include <utility>
|
||||
#include "timeline_view_drag_handler.h"
|
||||
#include "track.h"
|
||||
|
||||
@@ -159,7 +160,7 @@ const QVector<int> TimelineModel::_copyItemIdsBetween(Track &t, qint64 start, qi
|
||||
itemIds.reserve(t.itemCount());
|
||||
|
||||
|
||||
for (const int itemId : qAsConst(t.copyItemIds()))
|
||||
for (const int itemId : std::as_const(t.copyItemIds()))
|
||||
{
|
||||
const Item &i = item(itemId);
|
||||
if (Track::isItemBetween(i, start, end, strict, complete, minimumDuration))
|
||||
@@ -167,7 +168,7 @@ const QVector<int> TimelineModel::_copyItemIdsBetween(Track &t, qint64 start, qi
|
||||
}
|
||||
|
||||
if (recursive)
|
||||
for (const TrackPtr &trackPtr : qAsConst(t.tracks()))
|
||||
for (const TrackPtr &trackPtr : std::as_const(t.tracks()))
|
||||
itemIds += _copyItemIdsBetween(*trackPtr.get(), start, end, strict, complete, true, false, minimumDuration);
|
||||
|
||||
|
||||
@@ -197,7 +198,7 @@ const QVector<int> TimelineModel::_itemIdsBetween(Track &t, qint64 start, qint64
|
||||
QVector<int> itemIds;
|
||||
itemIds.reserve(t.itemCount());
|
||||
|
||||
for (const ItemPtr &itemPtr : qAsConst(t.items()))
|
||||
for (const ItemPtr &itemPtr : std::as_const(t.items()))
|
||||
{
|
||||
const Item &i = *itemPtr;
|
||||
if (Track::isItemBetween(i, start, end, strict, complete, minimumDuration))
|
||||
@@ -205,7 +206,7 @@ const QVector<int> TimelineModel::_itemIdsBetween(Track &t, qint64 start, qint64
|
||||
}
|
||||
|
||||
if (recursive)
|
||||
for (const TrackPtr &trackPtr : qAsConst(t.tracks()))
|
||||
for (const TrackPtr &trackPtr : std::as_const(t.tracks()))
|
||||
itemIds += _itemIdsBetween(*trackPtr.get(), start, end, strict, complete, true, false, minimumDuration);
|
||||
|
||||
|
||||
@@ -232,7 +233,7 @@ const QVector<int> TimelineModel::_itemIdsBetween(Track &t, qint64 start, qint64
|
||||
|
||||
bool TimelineModel::_isItemsBetween(const Track &t, qint64 start, qint64 end, const QVector<int> &ignoreIds, bool strict, bool complete, bool recursive, qint64 minimumDuration) const
|
||||
{
|
||||
for (const ItemPtr &itemPtr : qAsConst(t.items()))
|
||||
for (const ItemPtr &itemPtr : std::as_const(t.items()))
|
||||
{
|
||||
const Item &i = *itemPtr;
|
||||
if (!ignoreIds.contains(i.id()))
|
||||
@@ -243,7 +244,7 @@ bool TimelineModel::_isItemsBetween(const Track &t, qint64 start, qint64 end, co
|
||||
if (!recursive)
|
||||
return false;
|
||||
|
||||
for (const TrackPtr &trackPtr : qAsConst(t.tracks()))
|
||||
for (const TrackPtr &trackPtr : std::as_const(t.tracks()))
|
||||
if (_isItemsBetween(*trackPtr.get(), start, end, ignoreIds, strict, complete, true, minimumDuration))
|
||||
return true;
|
||||
|
||||
@@ -360,7 +361,7 @@ int TimelineModel::rowOfTrackId(int id) const noexcept(false)
|
||||
|
||||
int row = 0;
|
||||
|
||||
for (const TrackPtr &trackPtr : qAsConst(parent.tracks()))
|
||||
for (const TrackPtr &trackPtr : std::as_const(parent.tracks()))
|
||||
{
|
||||
if (trackPtr->id() == id)
|
||||
return row;
|
||||
@@ -527,7 +528,7 @@ void TimelineModel::copyToClipboard(const QVector<int> &ids) noexcept(false)
|
||||
m_clipboard.clear();
|
||||
m_clipboard.reserve(ids.size());
|
||||
qint64 tStartMin = LLONG_MAX;
|
||||
for (int itemId : qAsConst(ids))
|
||||
for (int itemId : std::as_const(ids))
|
||||
{
|
||||
const Item &i = item(itemId);
|
||||
ItemPtr iPtr = std::make_unique<Item>(Item(i.startTime(), i.duration(), i.color()));
|
||||
@@ -542,7 +543,7 @@ void TimelineModel::copyToClipboard(const QVector<int> &ids) noexcept(false)
|
||||
void TimelineModel::cutToClipboard(const QVector<int> &ids) noexcept(false)
|
||||
{
|
||||
copyToClipboard(ids);
|
||||
for (int itemId : qAsConst(ids))
|
||||
for (int itemId : std::as_const(ids))
|
||||
removeItem(itemId);
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "timeline_view.h"
|
||||
#include <utility>
|
||||
#include "item_delegate.h"
|
||||
|
||||
#include <NGLLogger/NGLLoggerBootstrap.h>
|
||||
@@ -340,7 +341,7 @@ void TimelineView::selectItems(const QVector<int> &itemIds, bool reset)
|
||||
{
|
||||
if (reset)
|
||||
m_selectedItemIds.clear();
|
||||
for (const int &itemId : qAsConst(itemIds))
|
||||
for (const int &itemId : std::as_const(itemIds))
|
||||
if (!m_selectedItemIds.contains(itemId))
|
||||
m_selectedItemIds.append(itemId);
|
||||
emit selectedItemsChanged(m_selectedItemIds);
|
||||
|
||||
+2
-1
@@ -1,5 +1,6 @@
|
||||
#include "timeline_view_drag_handler.h"
|
||||
#include "item.h"
|
||||
#include <utility>
|
||||
#include "track.h"
|
||||
|
||||
#include <QApplication>
|
||||
@@ -79,7 +80,7 @@ void TimelineViewDragHandler::dropEvent(QDropEvent *e)
|
||||
qint64 dt = deltaTime();
|
||||
try
|
||||
{
|
||||
for (const int &itemId : qAsConst(m_dragItemIds))
|
||||
for (const int &itemId : std::as_const(m_dragItemIds))
|
||||
{
|
||||
const Item &item = m_view->timelineModel()->item(itemId);
|
||||
m_view->timelineModel()->moveItemToTrack(itemId, dragItemTrackId(item), item.startTime() + dt);
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
#include "timeline_view_selection_handler.h"
|
||||
#include <utility>
|
||||
#include "item_delegate.h"
|
||||
|
||||
#include <QApplication>
|
||||
@@ -197,7 +198,7 @@ void TimelineViewSelectHandler::keyPressEvent(QKeyEvent *e)
|
||||
{
|
||||
if (!m_view->m_selectedItemIds.isEmpty())
|
||||
{
|
||||
for (const int &itemId : qAsConst(m_view->m_selectedItemIds))
|
||||
for (const int &itemId : std::as_const(m_view->m_selectedItemIds))
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "timeline_widget.h"
|
||||
#include <utility>
|
||||
#include "ui_timeline_widget.h"
|
||||
#include "timeline_view.h"
|
||||
#include "timeline_header_view.h"
|
||||
@@ -317,7 +318,7 @@ void TimelineWidget::populateZoomFactorComboBox()
|
||||
this, &TimelineWidget::onZoomSelected);
|
||||
m_ui->cbZoom->clear();
|
||||
QVector<ZoomFactor> availableZooms = Zoom::availableZoomFactors(m_ui->view->minimumZoomFactor(), m_ui->view->upperZoomFactor());
|
||||
for (ZoomFactor factor : qAsConst(availableZooms))
|
||||
for (ZoomFactor factor : std::as_const(availableZooms))
|
||||
{
|
||||
m_ui->cbZoom->addItem(Zoom::toString(factor), QVariant(factor));
|
||||
if (factor == zoomFactor())
|
||||
@@ -392,7 +393,7 @@ void TimelineWidget::onUpdateDebugInfo()
|
||||
m_ui->lblDebugSlider->setText(DateTime::toString(qint64(m_ui->slider->value()) * 1000, DateTimeFormat::DTG));
|
||||
m_ui->lblDebugZoom->setText(Zoom::toString(m_ui->view->zoomFactor()));
|
||||
QString selection;
|
||||
for (int itemId : qAsConst(m_ui->view->selectedItemIds()))
|
||||
for (int itemId : std::as_const(m_ui->view->selectedItemIds()))
|
||||
selection += QString::number(itemId) + QStringLiteral(", ");
|
||||
if (selection.size() > 1)
|
||||
selection.chop(2);
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "track.h"
|
||||
#include <utility>
|
||||
|
||||
namespace LtsTimeline
|
||||
{
|
||||
@@ -19,7 +20,7 @@ const Track &Track::track(int id) const noexcept(false)
|
||||
return **it;
|
||||
|
||||
|
||||
for (const TrackPtr &track : qAsConst(m_childrenTracks))
|
||||
for (const TrackPtr &track : std::as_const(m_childrenTracks))
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -48,7 +49,7 @@ bool Track::hasTrack(int id, bool recursive) const
|
||||
if (!recursive)
|
||||
return false;
|
||||
|
||||
for (const TrackPtr &trackPtr : qAsConst(m_childrenTracks))
|
||||
for (const TrackPtr &trackPtr : std::as_const(m_childrenTracks))
|
||||
{
|
||||
if (trackPtr->hasTrack(id, true))
|
||||
return true;
|
||||
@@ -95,7 +96,7 @@ void Track::addCopyItemId(int id)
|
||||
|
||||
const Track &Track::parentOf(int id) const noexcept(false)
|
||||
{
|
||||
for (const TrackPtr &trackPtr : qAsConst(m_childrenTracks))
|
||||
for (const TrackPtr &trackPtr : std::as_const(m_childrenTracks))
|
||||
{
|
||||
if (trackPtr->hasTrack(id))
|
||||
return *trackPtr;
|
||||
@@ -170,7 +171,7 @@ const QVector<int> Track::copyItemIdsBetween(qint64 start, qint64 end, bool stri
|
||||
|
||||
if (recursive)
|
||||
{
|
||||
for (const TrackPtr &trackPtr : qAsConst(m_childrenTracks))
|
||||
for (const TrackPtr &trackPtr : std::as_const(m_childrenTracks))
|
||||
{
|
||||
auto itemPtrRefs2 = trackPtr->_copyItems();
|
||||
itemPtrRefs.insert(itemPtrRefs.end(), itemPtrRefs2.begin(), itemPtrRefs2.end());
|
||||
@@ -215,7 +216,7 @@ const QVector<int> Track::itemIdsBetween(qint64 start, qint64 end, bool strict,
|
||||
QVector<int> itemIds;
|
||||
itemIds.reserve(m_items.size());
|
||||
|
||||
for (const ItemPtr &itemPtr : qAsConst(m_items))
|
||||
for (const ItemPtr &itemPtr : std::as_const(m_items))
|
||||
{
|
||||
const Item &item = *itemPtr;
|
||||
if (isItemBetween(item, start, end, strict, complete, minimumDuration))
|
||||
@@ -228,7 +229,7 @@ const QVector<int> Track::itemIdsBetween(qint64 start, qint64 end, bool strict,
|
||||
return itemIds;
|
||||
}
|
||||
|
||||
for (const TrackPtr &trackPtr : qAsConst(m_childrenTracks))
|
||||
for (const TrackPtr &trackPtr : std::as_const(m_childrenTracks))
|
||||
itemIds += trackPtr->itemIdsBetween(start, end, strict, complete, true, minimumDuration);
|
||||
|
||||
return itemIds;
|
||||
@@ -237,7 +238,7 @@ const QVector<int> Track::itemIdsBetween(qint64 start, qint64 end, bool strict,
|
||||
|
||||
bool Track::isItemsBetween(qint64 start, qint64 end, const QVector<int> &ignoreIds, bool strict, bool complete, bool recursive, qint64 minimumDuration) const
|
||||
{
|
||||
for (const ItemPtr &itemPtr : qAsConst(m_items))
|
||||
for (const ItemPtr &itemPtr : std::as_const(m_items))
|
||||
{
|
||||
const Item &i = *itemPtr;
|
||||
if (!ignoreIds.contains(i.id()))
|
||||
@@ -246,7 +247,7 @@ bool Track::isItemsBetween(qint64 start, qint64 end, const QVector<int> &ignoreI
|
||||
}
|
||||
|
||||
|
||||
for (const int itemId : qAsConst(m_copyItemIds))
|
||||
for (const int itemId : std::as_const(m_copyItemIds))
|
||||
{
|
||||
const Item &i = item(itemId);
|
||||
if (!ignoreIds.contains(i.id()))
|
||||
@@ -258,7 +259,7 @@ bool Track::isItemsBetween(qint64 start, qint64 end, const QVector<int> &ignoreI
|
||||
if (!recursive)
|
||||
return false;
|
||||
|
||||
for (const TrackPtr &trackPtr : qAsConst(m_childrenTracks))
|
||||
for (const TrackPtr &trackPtr : std::as_const(m_childrenTracks))
|
||||
if (trackPtr->isItemsBetween(start, end, ignoreIds, strict, complete, true, minimumDuration))
|
||||
return true;
|
||||
|
||||
@@ -281,7 +282,7 @@ ItemPtrRefs Track::_items(bool recursive) const
|
||||
x.reserve(x.size() + m_copyItemIds.count());
|
||||
|
||||
|
||||
for (const int itemId : qAsConst(m_copyItemIds))
|
||||
for (const int itemId : std::as_const(m_copyItemIds))
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -297,7 +298,7 @@ ItemPtrRefs Track::_items(bool recursive) const
|
||||
return x;
|
||||
|
||||
|
||||
for (const TrackPtr &t : qAsConst(m_childrenTracks))
|
||||
for (const TrackPtr &t : std::as_const(m_childrenTracks))
|
||||
{
|
||||
const ItemPtrRefs x2(t->_items(true));
|
||||
x.insert(x.end(), x2.begin(), x2.end());
|
||||
@@ -315,7 +316,7 @@ ItemPtrRefs Track::_copyItems() const
|
||||
|
||||
ItemPtrRefs x;
|
||||
|
||||
for (int id : qAsConst(m_copyItemIds))
|
||||
for (int id : std::as_const(m_copyItemIds))
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -361,7 +362,7 @@ const QVector<int> Track::_itemIds(bool recursive) const
|
||||
return itemIds;
|
||||
|
||||
|
||||
for (const TrackPtr &trackPtr : qAsConst(m_childrenTracks))
|
||||
for (const TrackPtr &trackPtr : std::as_const(m_childrenTracks))
|
||||
itemIds += trackPtr->_itemIds(true);
|
||||
|
||||
return itemIds;
|
||||
@@ -381,7 +382,7 @@ ItemPtrRef Track::_item(int id) const noexcept(false)
|
||||
return *it;
|
||||
|
||||
|
||||
for (const TrackPtr &track : qAsConst(m_childrenTracks))
|
||||
for (const TrackPtr &track : std::as_const(m_childrenTracks))
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -405,7 +406,7 @@ void Track::printTrackIds(bool withItems, int level) const
|
||||
if (withItems)
|
||||
{
|
||||
fprintf(stderr, " ( ");
|
||||
for (const ItemPtr &itemPtr : qAsConst(m_items))
|
||||
for (const ItemPtr &itemPtr : std::as_const(m_items))
|
||||
{
|
||||
fprintf(stderr, "%d ", itemPtr->id());
|
||||
}
|
||||
@@ -415,7 +416,7 @@ void Track::printTrackIds(bool withItems, int level) const
|
||||
fprintf(stderr, "\n");
|
||||
|
||||
|
||||
for (const TrackPtr &trackPtr : qAsConst(m_childrenTracks))
|
||||
for (const TrackPtr &trackPtr : std::as_const(m_childrenTracks))
|
||||
trackPtr->printTrackIds(level + 1);
|
||||
}
|
||||
|
||||
@@ -446,7 +447,7 @@ QVector<int> Track::itemIds(bool recursive, bool sorted) const
|
||||
return itemIds;
|
||||
|
||||
|
||||
for (const TrackPtr &trackPtr : qAsConst(m_childrenTracks))
|
||||
for (const TrackPtr &trackPtr : std::as_const(m_childrenTracks))
|
||||
itemIds += trackPtr->_itemIds(true);
|
||||
|
||||
return itemIds;
|
||||
@@ -640,7 +641,7 @@ const Item &Track::item(int id) const noexcept(false)
|
||||
return **it;
|
||||
|
||||
|
||||
for (const TrackPtr &track : qAsConst(m_childrenTracks))
|
||||
for (const TrackPtr &track : std::as_const(m_childrenTracks))
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -762,7 +763,7 @@ Item &Track::next(int id) noexcept(false)
|
||||
int Track::rowOfTrack(int id) const noexcept(false)
|
||||
{
|
||||
int row = 0;
|
||||
for (const TrackPtr &trackPtr : qAsConst(m_childrenTracks))
|
||||
for (const TrackPtr &trackPtr : std::as_const(m_childrenTracks))
|
||||
{
|
||||
if (trackPtr->id() == id)
|
||||
return row;
|
||||
|
||||
+2
-1
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "AbstractTimelineModel.h"
|
||||
#include <utility>
|
||||
|
||||
#include <NGLLogger/NGLLoggerBootstrap.h>
|
||||
|
||||
@@ -107,7 +108,7 @@ void AbstractTimelineModel::addEvent(Event *event)
|
||||
Item *currentItem = m_rootItem;
|
||||
QModelIndex currentIndex = QModelIndex();
|
||||
|
||||
for (const QString &curPath : qAsConst(actuatorPath))
|
||||
for (const QString &curPath : std::as_const(actuatorPath))
|
||||
{
|
||||
Item *oldItem = currentItem;
|
||||
const ItemList *itemList = currentItem->getChildren();
|
||||
|
||||
@@ -56,9 +56,9 @@ NGL_TARGET_LINK_LIBRARIES(LtsTimelineClassic
|
||||
PRIVATE
|
||||
NGLLogger
|
||||
ngltools # DTG
|
||||
Qt5::Core
|
||||
Qt5::Gui
|
||||
Qt5::Widgets
|
||||
Qt6::Core
|
||||
Qt6::Gui
|
||||
Qt6::Widgets
|
||||
LtsSessionDataDds
|
||||
)
|
||||
|
||||
@@ -68,9 +68,9 @@ IF(NEVER)
|
||||
NGL_TARGET_LINK_LIBRARIES(LtsTimelineClassicTest
|
||||
nglapplication
|
||||
NGLLogger
|
||||
Qt5::Core
|
||||
Qt5::Gui
|
||||
Qt5::Widgets
|
||||
Qt6::Core
|
||||
Qt6::Gui
|
||||
Qt6::Widgets
|
||||
LtsTimelineClassic
|
||||
svcEemCommon
|
||||
svcEemClient
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
|
||||
#include "EventGraphic.h"
|
||||
#include <utility>
|
||||
|
||||
#include <QPainter>
|
||||
#include <QPen>
|
||||
@@ -59,7 +60,7 @@ qint64 EventGraphic::getDuration()
|
||||
qint64 highestDuration = 0;
|
||||
qint64 lowest = lowestTime();
|
||||
|
||||
for (Event *event : qAsConst(m_eventList))
|
||||
for (Event *event : std::as_const(m_eventList))
|
||||
{
|
||||
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include <QDebug>
|
||||
#include <utility>
|
||||
|
||||
#include "Item.h"
|
||||
#include "EventTools.h"
|
||||
@@ -215,7 +216,7 @@ EventList Item::getFullEventList(bool recursive, bool getHiddenEvents) const
|
||||
if (!m_children || !recursive)
|
||||
return el;
|
||||
|
||||
for (const Item *item : qAsConst(*m_children))
|
||||
for (const Item *item : std::as_const(*m_children))
|
||||
el += item->getFullEventList(recursive, getHiddenEvents);
|
||||
|
||||
return el;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "TimelineView.h"
|
||||
#include <utility>
|
||||
#include "TimelineHeaderView.h"
|
||||
#include "TimelineWidget.h"
|
||||
#include "EventDelegate.h"
|
||||
@@ -335,7 +336,7 @@ void TimelineView::paintEvent(QPaintEvent *event)
|
||||
painter.setBrush(QBrush("white"));
|
||||
int h = height();
|
||||
|
||||
for (const auto &range : qAsConst(m_knownRanges))
|
||||
for (const auto &range : std::as_const(m_knownRanges))
|
||||
{
|
||||
int start = EventTools::getEventPosition(range.start);
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ NGL_TARGET_INCLUDE_DIRECTORIES(LtsUtilsCore
|
||||
)
|
||||
NGL_TARGET_LINK_LIBRARIES(LtsUtilsCore
|
||||
PUBLIC
|
||||
Qt5::Core
|
||||
Qt6::Core
|
||||
LtsUtilsCoreHeaderOnly
|
||||
)
|
||||
|
||||
@@ -60,8 +60,8 @@ IF((BUILD_WS OR BUILD_SV) AND BUILD_TESTING)
|
||||
)
|
||||
TARGET_LINK_LIBRARIES(utils_test
|
||||
LtsUtilsCore
|
||||
Qt5::Core
|
||||
Qt5::Test
|
||||
Qt6::Core
|
||||
Qt6::Test
|
||||
ddscore
|
||||
)
|
||||
ADD_TEST(NAME utils_test COMMAND $<TARGET_FILE:utils_test>)
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "pgarray.h"
|
||||
#include <QVector>
|
||||
#include <QDebug>
|
||||
#include <QStringView>
|
||||
|
||||
#include <functional>
|
||||
#include <LtsUtilsCore/ltsutilscore_export.h>
|
||||
@@ -37,7 +38,7 @@ LTSUTILSCORE_EXPORT QString BigintArray::toPgString() const
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
static inline T convertFromPgString(const QString &str, const std::function<typename T::Type(const QStringRef &val, bool *bOk)> &convertFunc)
|
||||
static inline T convertFromPgString(const QString &str, const std::function<typename T::Type(QStringView val, bool *bOk)> &convertFunc)
|
||||
{
|
||||
typename T::ContainerType result;
|
||||
|
||||
@@ -52,10 +53,10 @@ static inline T convertFromPgString(const QString &str, const std::function<type
|
||||
idxEnd = str.length() + 1;
|
||||
}
|
||||
|
||||
const QStringRef strRef = str.midRef(idxStart + 1, idxEnd - idxStart - 1);
|
||||
const QVector<QStringRef> vec = strRef.split(QLatin1Char(','), QString::SkipEmptyParts);
|
||||
const QStringView strRef = QStringView(str).mid(idxStart + 1, idxEnd - idxStart - 1);
|
||||
const QVector<QStringView> vec = strRef.split(QLatin1Char(','), Qt::SkipEmptyParts);
|
||||
result.reserve(vec.size());
|
||||
for (const QStringRef &s : vec)
|
||||
for (const QStringView &s : vec)
|
||||
{
|
||||
bool ok = false;
|
||||
const typename T::Type i = convertFunc(s, &ok);
|
||||
@@ -70,14 +71,14 @@ template<>
|
||||
LTSUTILSCORE_EXPORT IntArray IntArray::fromPgString(const QString &str)
|
||||
{
|
||||
return convertFromPgString<IntArray>(str,
|
||||
[](const QStringRef & val, bool * bOk) { return val.toInt(bOk);});
|
||||
[](QStringView val, bool * bOk) { return val.toString().toInt(bOk);});
|
||||
}
|
||||
|
||||
template<>
|
||||
LTSUTILSCORE_EXPORT BigintArray BigintArray::fromPgString(const QString &str)
|
||||
{
|
||||
return convertFromPgString<BigintArray>(str,
|
||||
[](const QStringRef & val, bool * bOk) { return val.toLongLong(bOk);});
|
||||
[](QStringView val, bool * bOk) { return val.toString().toLongLong(bOk);});
|
||||
}
|
||||
|
||||
|
||||
@@ -115,7 +116,7 @@ LTSUTILSCORE_EXPORT QString BigintArray2D::toPgString() const
|
||||
|
||||
|
||||
template<typename T>
|
||||
static inline T convertFromPgString2D(const QString &str, const std::function<typename T::Type(const QStringRef &val)> &convertFunc)
|
||||
static inline T convertFromPgString2D(const QString &str, const std::function<typename T::Type(QStringView val)> &convertFunc)
|
||||
{
|
||||
typename T::ContainerType ret;
|
||||
int idxStart = str.indexOf(QLatin1Char('{'));
|
||||
@@ -129,7 +130,7 @@ static inline T convertFromPgString2D(const QString &str, const std::function<ty
|
||||
idxEnd = str.length() + 1;
|
||||
}
|
||||
|
||||
const QStringRef strRef = str.midRef(idxStart + 1, idxEnd - idxStart - 1);
|
||||
const QStringView strRef = QStringView(str).mid(idxStart + 1, idxEnd - idxStart - 1);
|
||||
idxStart = strRef.indexOf(QLatin1Char('{'));
|
||||
while (idxStart >= 0)
|
||||
{
|
||||
@@ -137,8 +138,8 @@ static inline T convertFromPgString2D(const QString &str, const std::function<ty
|
||||
if (idxEnd < 0)
|
||||
break;
|
||||
|
||||
const QStringRef keyValueStr = strRef.mid(idxStart + 1, idxEnd - idxStart - 1);
|
||||
const QVector<QStringRef> keyValuePair = keyValueStr.split(QLatin1Char(','), QString::SkipEmptyParts);
|
||||
const QStringView keyValueStr = strRef.mid(idxStart + 1, idxEnd - idxStart - 1);
|
||||
const QVector<QStringView> keyValuePair = keyValueStr.split(QLatin1Char(','), Qt::SkipEmptyParts);
|
||||
if (keyValuePair.size() != 2)
|
||||
break;
|
||||
const typename T::Type key = convertFunc(keyValuePair.at(0).trimmed());
|
||||
@@ -156,14 +157,14 @@ template<>
|
||||
LTSUTILSCORE_EXPORT IntArray2D IntArray2D::fromPgString(const QString &str)
|
||||
{
|
||||
return convertFromPgString2D<IntArray2D>(str,
|
||||
[](const QStringRef & val) { return val.toInt();});
|
||||
[](QStringView val) { return val.toString().toInt();});
|
||||
}
|
||||
|
||||
template<>
|
||||
LTSUTILSCORE_EXPORT BigintArray2D BigintArray2D::fromPgString(const QString &str)
|
||||
{
|
||||
return convertFromPgString2D<BigintArray2D>(str,
|
||||
[](const QStringRef & val) { return val.toLongLong();});
|
||||
[](QStringView val) { return val.toString().toLongLong();});
|
||||
}
|
||||
|
||||
}
|
||||
+1
-1
@@ -23,6 +23,6 @@ NGL_TARGET_INCLUDE_DIRECTORIES(LtsUtilsGuiConnectDialog
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../
|
||||
)
|
||||
NGL_TARGET_LINK_LIBRARIES(LtsUtilsGuiConnectDialog
|
||||
Qt5::Widgets
|
||||
Qt6::Widgets
|
||||
LtsWidgets
|
||||
)
|
||||
+5
-5
@@ -22,11 +22,11 @@ NGL_TARGET_LINK_LIBRARIES(LtsUtilsGuiDds
|
||||
PRIVATE
|
||||
LtsUtilsCoreHeaderOnly
|
||||
LtsWidgets
|
||||
Qt5::Gui
|
||||
Qt5::Widgets
|
||||
Qt5::Svg
|
||||
Qt6::Gui
|
||||
Qt6::Widgets
|
||||
Qt6::Svg
|
||||
PUBLIC
|
||||
Qt5::Core
|
||||
Qt6::Core
|
||||
ddscore
|
||||
)
|
||||
NGL_TARGET_COMPILE_DEFINITIONS(LtsUtilsGuiDds
|
||||
@@ -44,6 +44,6 @@ NGL_TARGET_LINK_LIBRARIES(LtsUtilsDds
|
||||
PRIVATE
|
||||
LtsUtilsCoreHeaderOnly
|
||||
PUBLIC
|
||||
Qt5::Core
|
||||
Qt6::Core
|
||||
ddscore
|
||||
)
|
||||
+1
-1
@@ -17,6 +17,6 @@ NGL_TARGET_INCLUDE_DIRECTORIES(LtsUtilsGuiStyleManager
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../
|
||||
)
|
||||
NGL_TARGET_LINK_LIBRARIES(LtsUtilsGuiStyleManager
|
||||
Qt5::Core
|
||||
Qt6::Core
|
||||
LtsPluginLoader
|
||||
)
|
||||
@@ -17,5 +17,5 @@ NGL_TARGET_INCLUDE_DIRECTORIES(LtsUtilsSettings
|
||||
|
||||
NGL_TARGET_LINK_LIBRARIES(LtsUtilsSettings
|
||||
PUBLIC
|
||||
Qt5::Core
|
||||
Qt6::Core
|
||||
)
|
||||
@@ -248,9 +248,9 @@ QStringList Settings::identifiers(const QString &group) const
|
||||
QStringList result;
|
||||
for (auto it = m_data.begin(); it != m_data.end(); ++it)
|
||||
{
|
||||
QVector<QStringRef> decrafted = it.key().splitRef(QLatin1Char('.'));
|
||||
if (decrafted.size() > 1 && group.compare(decrafted.at(0)) == 0)
|
||||
result.append(decrafted.at(1).toString());
|
||||
const QStringList decrafted = QString(it.key()).split(QLatin1Char('.'));
|
||||
if (decrafted.size() > 1 && QStringView(group).compare(decrafted.at(0)) == 0)
|
||||
result.append(decrafted.at(0).mid(1));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -31,6 +31,6 @@ NGL_TARGET_LINK_LIBRARIES(LtsVirtualKeyboard
|
||||
LtsWidgets
|
||||
LtsSession
|
||||
LtsAppManager
|
||||
Qt5::Widgets
|
||||
Qt5::Gui
|
||||
Qt6::Widgets
|
||||
Qt6::Gui
|
||||
)
|
||||
@@ -29,8 +29,8 @@ NGL_TARGET_INCLUDE_DIRECTORIES(LtsWebSocketCommon
|
||||
)
|
||||
|
||||
NGL_TARGET_LINK_LIBRARIES(LtsWebSocketCommon
|
||||
Qt5::Core
|
||||
Qt5::WebSockets
|
||||
Qt6::Core
|
||||
Qt6::WebSockets
|
||||
NGLLogger
|
||||
)
|
||||
|
||||
@@ -54,7 +54,7 @@ NGL_TARGET_INCLUDE_DIRECTORIES(LtsWebSocketServer
|
||||
)
|
||||
|
||||
NGL_TARGET_LINK_LIBRARIES(LtsWebSocketServer
|
||||
Qt5::Core
|
||||
Qt6::Core
|
||||
LtsWebSocketCommon
|
||||
)
|
||||
|
||||
@@ -74,6 +74,6 @@ NGL_TARGET_INCLUDE_DIRECTORIES(LtsWebSocketClient
|
||||
)
|
||||
|
||||
NGL_TARGET_LINK_LIBRARIES(LtsWebSocketClient
|
||||
Qt5::Core
|
||||
Qt6::Core
|
||||
LtsWebSocketCommon
|
||||
)
|
||||
@@ -1,6 +1,7 @@
|
||||
|
||||
|
||||
#include "connection_handler.h"
|
||||
#include <utility>
|
||||
|
||||
#include "client_connection.h"
|
||||
|
||||
@@ -16,7 +17,7 @@ ConnectionHandler::ConnectionHandler(QObject *parent)
|
||||
|
||||
ConnectionHandler::~ConnectionHandler()
|
||||
{
|
||||
for (auto connection : qAsConst(m_connections))
|
||||
for (auto connection : std::as_const(m_connections))
|
||||
connection->disconnect(this);
|
||||
}
|
||||
|
||||
@@ -46,7 +47,7 @@ bool ConnectionHandler::init(const QString &serviceName, unsigned short port)
|
||||
|
||||
void ConnectionHandler::sendToAllClients(ReplyMessage *message)
|
||||
{
|
||||
for (auto connection : qAsConst(m_connections))
|
||||
for (auto connection : std::as_const(m_connections))
|
||||
connection->addReply(new ReplyMessage(*message));
|
||||
|
||||
delete message;
|
||||
|
||||
@@ -155,8 +155,8 @@ NGL_TARGET_INCLUDE_DIRECTORIES(LtsWidgets
|
||||
|
||||
NGL_TARGET_LINK_LIBRARIES(LtsWidgets
|
||||
PRIVATE
|
||||
Qt5::Network # for QHostInfo - for portability
|
||||
Qt5::Svg
|
||||
Qt6::Network # for QHostInfo - for portability
|
||||
Qt6::Svg
|
||||
ngltools
|
||||
ngltranslator
|
||||
TabBarTabStyle
|
||||
@@ -164,9 +164,9 @@ NGL_TARGET_LINK_LIBRARIES(LtsWidgets
|
||||
LtsUtilsSettings
|
||||
PUBLIC
|
||||
LtsUtilsCore
|
||||
Qt5::Core
|
||||
Qt5::Widgets
|
||||
Qt5::Gui
|
||||
Qt6::Core
|
||||
Qt6::Widgets
|
||||
Qt6::Gui
|
||||
)
|
||||
|
||||
NGL_INSTALL_TARGET(LtsWidgets)
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "lts_angle_edit.h"
|
||||
#include <utility>
|
||||
#include "ui_lts_angle_edit.h"
|
||||
|
||||
#include <cmath>
|
||||
@@ -194,7 +195,7 @@ QString LtsAngleEdit::toString(LtsAngleEdit::AngleUnitType t)
|
||||
void LtsAngleEdit::onCBoxAngleUnitChanged()
|
||||
{
|
||||
AngleUnitType newUnit = static_cast<AngleUnitType>(m_ui->cBoxAngleUnit->currentData().toInt());
|
||||
for(auto dbox : qAsConst(m_sBoxMap))
|
||||
for(auto dbox : std::as_const(m_sBoxMap))
|
||||
{
|
||||
const double value = getAngleConverted(dbox->value(), newUnit, m_currAngleUnit);
|
||||
auto mapVal = m_dboxLimitMap.value(newUnit);
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "lts_base_layout_widget.h"
|
||||
#include <utility>
|
||||
#include "ui_lts_base_layout.h"
|
||||
|
||||
#include "lts_dialog.h"
|
||||
@@ -629,7 +630,7 @@ void LtsBaseLayoutWidget::slotOperatorMenuClicked()
|
||||
operatorMenu->setTerminalButton(m_showTerminalButton);
|
||||
|
||||
bool hasOperatorSettings = false;
|
||||
for (const PluginData &pd : qAsConst(m_mapButtons))
|
||||
for (const PluginData &pd : std::as_const(m_mapButtons))
|
||||
{
|
||||
if (pd.identifier == QStringLiteral("_OpmShowOperatorSettings"))
|
||||
{
|
||||
@@ -1794,7 +1795,7 @@ bool LtsBaseLayoutWidget::messageIdentifierExists(const QString &identifier) con
|
||||
return true;
|
||||
}
|
||||
|
||||
for (const Message &m : qAsConst(m_messageQueue))
|
||||
for (const Message &m : std::as_const(m_messageQueue))
|
||||
{
|
||||
if (m.identifier == identifier)
|
||||
{
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "lts_date_time_edit.h"
|
||||
#include <utility>
|
||||
#include "lts_date_time_edit_p.h"
|
||||
|
||||
#include "ui_lts_date_time_edit_touch.h"
|
||||
@@ -1413,7 +1414,7 @@ void LtsDateTimeEdit::onCheckBoxChanged()
|
||||
}
|
||||
|
||||
bEnable = checkBox()->isChecked();
|
||||
for (auto w : qAsConst(widgets))
|
||||
for (auto w : std::as_const(widgets))
|
||||
{
|
||||
if (w)
|
||||
w->setEnabled(bEnable);
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "lts_grid_layout.h"
|
||||
#include <utility>
|
||||
#include <QResizeEvent>
|
||||
|
||||
namespace LtsWidgets
|
||||
@@ -57,10 +58,10 @@ void LtsGridLayout::setMaxColumn(int max)
|
||||
|
||||
m_colSize = 0;
|
||||
|
||||
for (QWidget *wid : qAsConst(m_widgetList))
|
||||
for (QWidget *wid : std::as_const(m_widgetList))
|
||||
removeWidget(wid);
|
||||
|
||||
for (QWidget *wid : qAsConst(m_widgetList))
|
||||
for (QWidget *wid : std::as_const(m_widgetList))
|
||||
addWidgetInternal(wid);
|
||||
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "lts_multi_range_spinbox.h"
|
||||
#include <utility>
|
||||
|
||||
#include <QEvent>
|
||||
#include <QWheelEvent>
|
||||
@@ -63,7 +64,7 @@ void LtsMultiRangeSpinBox::fixup(QString &str) const
|
||||
|
||||
QValidator::State LtsMultiRangeSpinBox::validateAll(QString &input, int &pos)
|
||||
{
|
||||
for(QPair<int,int> range : qAsConst(m_rangesList))
|
||||
for(QPair<int,int> range : std::as_const(m_rangesList))
|
||||
{
|
||||
QIntValidator validator(range.first, range.second);
|
||||
QValidator::State valState = validator.validate(input, pos);
|
||||
@@ -112,7 +113,7 @@ void LtsMultiRangeSpinBox::setRanges(const QVector<QPair<int, int>> &ranges)
|
||||
|
||||
QStringList rangeStrings;
|
||||
rangeStrings.reserve(m_rangesList.size());
|
||||
for (const QPair<int,int> &range : qAsConst(m_rangesList))
|
||||
for (const QPair<int,int> &range : std::as_const(m_rangesList))
|
||||
rangeStrings << tr("%1-%2%3").arg(range.first).arg(range.second).arg(suffix());
|
||||
setToolTip(tr("Ranges:\n%1").arg(rangeStrings.join(QStringLiteral(",\n"))));
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "lts_tool_bar_area.h"
|
||||
#include <utility>
|
||||
#include "ui_lts_tool_bar_area.h"
|
||||
#include "lts_drag_icon.h"
|
||||
|
||||
@@ -259,7 +260,7 @@ bool LtsToolBarArea::setFunctionKey(int fkey, const QString &action)
|
||||
|
||||
|
||||
LtsDragIcon *icon = nullptr;
|
||||
for (LtsDragIcon *ic : qAsConst(m_buttonMap))
|
||||
for (LtsDragIcon *ic : std::as_const(m_buttonMap))
|
||||
{
|
||||
if (ic->identifier() == action)
|
||||
{
|
||||
@@ -275,7 +276,7 @@ bool LtsToolBarArea::setFunctionKey(int fkey, const QString &action)
|
||||
ShortCut &shorty = m_functionKeys[fkey];
|
||||
|
||||
|
||||
for (LtsDragIcon *ic : qAsConst(m_buttonMap))
|
||||
for (LtsDragIcon *ic : std::as_const(m_buttonMap))
|
||||
if (ic->identifier() == shorty.identifier)
|
||||
ic->removeModification();
|
||||
|
||||
@@ -322,7 +323,7 @@ void LtsToolBarArea::removeMenuAction(LtsDragIcon *icon)
|
||||
if (itShortcut.identifier == icon->identifier())
|
||||
itShortcut.clear();
|
||||
}
|
||||
for (LtsDragIcon *ic : qAsConst(m_foreignButtonMap))
|
||||
for (LtsDragIcon *ic : std::as_const(m_foreignButtonMap))
|
||||
{
|
||||
if(ic->identifier() == icon->identifier())
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ ADD_INTERFACE_LIBRARY(
|
||||
DataPluginInterface
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/data_plugin_interface.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/..
|
||||
Qt5::Core
|
||||
Qt6::Core
|
||||
)
|
||||
|
||||
# GuiPluginInterface
|
||||
@@ -17,7 +17,7 @@ ADD_INTERFACE_LIBRARY(
|
||||
GuiPluginInterface
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/gui_plugin_interface.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/..
|
||||
Qt5::Core LtsWidgets ProjectConfig LtsAppDescriptor LtsUtilsCore
|
||||
Qt6::Core LtsWidgets ProjectConfig LtsAppDescriptor LtsUtilsCore
|
||||
)
|
||||
|
||||
# projectPluginInterface
|
||||
@@ -25,7 +25,7 @@ ADD_INTERFACE_LIBRARY(
|
||||
ProjectPluginInterface
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/project_plugin_interface.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/..
|
||||
Qt5::Core
|
||||
Qt6::Core
|
||||
)
|
||||
|
||||
# stylePluginInterface
|
||||
@@ -33,7 +33,7 @@ ADD_INTERFACE_LIBRARY(
|
||||
StylePluginInterface
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/style_plugin_interface.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/..
|
||||
Qt5::Core
|
||||
Qt6::Core
|
||||
)
|
||||
|
||||
# record_replay_plugin
|
||||
@@ -41,7 +41,7 @@ ADD_INTERFACE_LIBRARY(
|
||||
RecordReplayPlugin
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/record_replay_plugin.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/..
|
||||
Qt5::Core
|
||||
Qt6::Core
|
||||
)
|
||||
|
||||
# Topic Replay Interface
|
||||
@@ -49,5 +49,5 @@ ADD_INTERFACE_LIBRARY(
|
||||
TopicReplayInterface
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/topic_replay_interface.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/..
|
||||
Qt5::Core
|
||||
Qt6::Core
|
||||
)
|
||||
@@ -12,7 +12,7 @@ ADD_INTERFACE_LIBRARY(
|
||||
TopicEditorInterface
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/topic_editor_interface.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/..
|
||||
Qt5::Core
|
||||
Qt6::Core
|
||||
)
|
||||
|
||||
# Library
|
||||
@@ -41,8 +41,8 @@ NGL_TARGET_INCLUDE_DIRECTORIES(TopicEditorBase
|
||||
|
||||
NGL_TARGET_LINK_LIBRARIES(TopicEditorBase
|
||||
LtsScriptTimeline
|
||||
Qt5::Widgets
|
||||
Qt5::Core
|
||||
Qt6::Widgets
|
||||
Qt6::Core
|
||||
LtsWidgets
|
||||
LtsUtilsCore
|
||||
)
|
||||
@@ -24,9 +24,9 @@ NGL_TARGET_INCLUDE_DIRECTORIES(httq
|
||||
)
|
||||
|
||||
NGL_TARGET_LINK_LIBRARIES(httq
|
||||
Qt5::Core
|
||||
Qt5::Network
|
||||
Qt5::WebSockets
|
||||
Qt6::Core
|
||||
Qt6::Network
|
||||
Qt6::WebSockets
|
||||
)
|
||||
|
||||
NGL_INSTALL_TARGET(httq)
|
||||
@@ -2,9 +2,6 @@
|
||||
|
||||
#ifndef http_parser_h
|
||||
#define http_parser_h
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define HTTP_PARSER_VERSION_MAJOR 2
|
||||
#define HTTP_PARSER_VERSION_MINOR 9
|
||||
@@ -34,11 +31,19 @@ typedef unsigned __int64 uint64_t;
|
||||
#define HTTP_MAX_HEADER_SIZE (80 * 1024)
|
||||
#endif
|
||||
|
||||
using http_parser = struct http_parser;
|
||||
using http_parser_settings = struct http_parser_settings;
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
using http_data_cb = int (*)(http_parser *, const char *, size_t);
|
||||
using http_cb = int (*)(http_parser *);
|
||||
/* Forward declarations */
|
||||
struct http_parser;
|
||||
struct http_parser_settings;
|
||||
|
||||
typedef struct http_parser http_parser;
|
||||
typedef struct http_parser_settings http_parser_settings;
|
||||
|
||||
typedef int (*http_data_cb)(http_parser *, const char *, size_t);
|
||||
typedef int (*http_cb)(http_parser *);
|
||||
|
||||
#define HTTP_STATUS_MAP(XX) \
|
||||
XX(100, CONTINUE, Continue) \
|
||||
|
||||
@@ -4,21 +4,29 @@
|
||||
# $Author$
|
||||
#
|
||||
|
||||
ADD_SUBDIRECTORY(DDSConnector)
|
||||
IF(BUILD_RTI)
|
||||
ADD_SUBDIRECTORY(DDSConnector)
|
||||
ENDIF()
|
||||
|
||||
ADD_SUBDIRECTORY(DTC)
|
||||
ADD_SUBDIRECTORY(DTS)
|
||||
ADD_SUBDIRECTORY(FTC)
|
||||
IF(BUILD_RTI)
|
||||
ADD_SUBDIRECTORY(FTC)
|
||||
ENDIF()
|
||||
ADD_SUBDIRECTORY(FTS)
|
||||
ADD_SUBDIRECTORY(Generic)
|
||||
ADD_SUBDIRECTORY(Routing)
|
||||
|
||||
ADD_SUBDIRECTORY(Core)
|
||||
ADD_SUBDIRECTORY(QosProfile)
|
||||
IF(BUILD_RTI)
|
||||
ADD_SUBDIRECTORY(QosProfile)
|
||||
ENDIF()
|
||||
|
||||
# During stepwise migration, add placeholder CTest entries before the
|
||||
# real DdsUnitTests subdir so the test-suite shows migration status even
|
||||
# when internal codegen targets are not yet available.
|
||||
ADD_SUBDIRECTORY(DdsUnitTestsPlaceholder)
|
||||
|
||||
ADD_SUBDIRECTORY(DdsUnitTests)
|
||||
IF(BUILD_RTI)
|
||||
ADD_SUBDIRECTORY(DdsUnitTests)
|
||||
ENDIF()
|
||||
@@ -4,6 +4,8 @@
|
||||
# $Author$
|
||||
#
|
||||
|
||||
IF(BUILD_RTI)
|
||||
|
||||
INCLUDE(MacroRTIDDSGen)
|
||||
INCLUDE(MacroCodeGenIdl)
|
||||
|
||||
@@ -42,7 +44,7 @@ NGL_TARGET_LINK_LIBRARIES(ddscore
|
||||
PUBLIC
|
||||
LtsUtilsCoreHeaderOnly
|
||||
ddsdts
|
||||
Qt5::Core
|
||||
Qt6::Core
|
||||
RTI::nddsc # DDS_GroupDataQosPolicy_initialize (wo auch immer das herkommt)
|
||||
RTI::nddscore # RTI_LOG_ANY_FAILURE_s (wo auch immer das herkommt)
|
||||
RTI::nddscpp2
|
||||
@@ -95,3 +97,5 @@ NGL_INSTALL_TARGET(svcCoreClient)
|
||||
# --- Topic Type Plugin --------------------------------------------------------------
|
||||
#
|
||||
CREATE_TOPIC_TYPE_PLUGIN(${xml_FILE})
|
||||
|
||||
ENDIF(BUILD_RTI)
|
||||
@@ -21,6 +21,7 @@ NGL_TARGET_INCLUDE_DIRECTORIES(
|
||||
INTERFACE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../
|
||||
)
|
||||
IF(BUILD_RTI)
|
||||
NGL_TARGET_LINK_LIBRARIES(ddsconnector
|
||||
PRIVATE
|
||||
NGLLogger
|
||||
@@ -32,5 +33,17 @@ NGL_TARGET_LINK_LIBRARIES(ddsconnector
|
||||
ddsdtc
|
||||
ddsdts
|
||||
ProjectConfig
|
||||
Qt5::Core
|
||||
Qt6::Core
|
||||
)
|
||||
ELSE()
|
||||
NGL_TARGET_LINK_LIBRARIES(ddsconnector
|
||||
PRIVATE
|
||||
NGLLogger
|
||||
PUBLIC
|
||||
ddsQoS
|
||||
ddsdtc
|
||||
ddsdts
|
||||
ProjectConfig
|
||||
Qt6::Core
|
||||
)
|
||||
ENDIF()
|
||||
@@ -11,7 +11,7 @@ TARGET_INCLUDE_DIRECTORIES(ddsdtc
|
||||
)
|
||||
TARGET_LINK_LIBRARIES(ddsdtc
|
||||
INTERFACE
|
||||
Qt5::Core
|
||||
Qt6::Core
|
||||
ddsgen
|
||||
NGLLogger
|
||||
LtsUtilsCoreHeaderOnly
|
||||
|
||||
@@ -11,7 +11,7 @@ TARGET_INCLUDE_DIRECTORIES(ddsdts
|
||||
)
|
||||
TARGET_LINK_LIBRARIES(ddsdts
|
||||
INTERFACE
|
||||
Qt5::Core
|
||||
Qt6::Core
|
||||
ddsgen
|
||||
NGLLogger
|
||||
)
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# $Author$
|
||||
#
|
||||
|
||||
IF(BUILD_TESTING AND TARGET ddsgen AND TARGET ddsdtc AND TARGET ddsfts AND TARGET ddsQoS)
|
||||
IF(BUILD_TESTING AND BUILD_RTI AND TARGET ddsgen AND TARGET ddsdtc AND TARGET ddsfts AND TARGET ddsQoS)
|
||||
|
||||
SET(xml_FILE ddsut.xml)
|
||||
|
||||
@@ -27,7 +27,7 @@ NGL_TARGET_LINK_LIBRARIES(ddsut_common
|
||||
NGLLogger
|
||||
PUBLIC
|
||||
LtsUtilsCoreHeaderOnly
|
||||
Qt5::Core
|
||||
Qt6::Core
|
||||
RTI::nddsc
|
||||
RTI::nddscore
|
||||
RTI::nddscpp2
|
||||
@@ -77,8 +77,8 @@ TARGET_LINK_LIBRARIES(ddsGenericDataTests
|
||||
nglcoreapplication
|
||||
NGLLogger
|
||||
ProjectConfig
|
||||
Qt5::Core
|
||||
Qt5::Test
|
||||
Qt6::Core
|
||||
Qt6::Test
|
||||
ddsut_common
|
||||
)
|
||||
ADD_TEST(NAME ddsGenericDataTests COMMAND $<TARGET_FILE:ddsGenericDataTests>)
|
||||
@@ -94,8 +94,8 @@ TARGET_LINK_LIBRARIES(ddsDataTopicTests
|
||||
ddsdtc
|
||||
ddsQoS
|
||||
ProjectConfig
|
||||
Qt5::Core
|
||||
Qt5::Test
|
||||
Qt6::Core
|
||||
Qt6::Test
|
||||
ddsut_common
|
||||
)
|
||||
ADD_TEST(NAME ddsDataTopicTests COMMAND $<TARGET_FILE:ddsDataTopicTests>)
|
||||
@@ -111,8 +111,8 @@ TARGET_LINK_LIBRARIES(ddsFunctionTopicTests
|
||||
nglcoreapplication
|
||||
NGLLogger
|
||||
ngltools
|
||||
Qt5::Core
|
||||
Qt5::Test
|
||||
Qt6::Core
|
||||
Qt6::Test
|
||||
ddsut_common
|
||||
)
|
||||
ADD_TEST(NAME ddsFunctionTopicTests COMMAND $<TARGET_FILE:ddsFunctionTopicTests>)
|
||||
|
||||
@@ -23,21 +23,21 @@ if(BUILD_TESTING)
|
||||
# Generic data tests smoke (QtTest)
|
||||
if(BUILD_SMOKE_TESTS OR NOT TARGET ddsGenericDataTests)
|
||||
add_executable(ddsGenericDataTests_smoke ddsGenericDataTests_smoke.cpp mocks/MockDDS.cpp)
|
||||
target_link_libraries(ddsGenericDataTests_smoke PRIVATE Qt5::Core Qt5::Test)
|
||||
target_link_libraries(ddsGenericDataTests_smoke PRIVATE Qt6::Core Qt6::Test)
|
||||
add_test(NAME ddsGenericDataTests COMMAND $<TARGET_FILE:ddsGenericDataTests_smoke>)
|
||||
endif()
|
||||
|
||||
# Data topic tests smoke (QtTest)
|
||||
if(BUILD_SMOKE_TESTS OR NOT TARGET ddsDataTopicTests)
|
||||
add_executable(ddsDataTopicTests_smoke ddsDataTopicTests_smoke.cpp mocks/MockDDS.cpp)
|
||||
target_link_libraries(ddsDataTopicTests_smoke PRIVATE Qt5::Core Qt5::Test)
|
||||
target_link_libraries(ddsDataTopicTests_smoke PRIVATE Qt6::Core Qt6::Test)
|
||||
add_test(NAME ddsDataTopicTests COMMAND $<TARGET_FILE:ddsDataTopicTests_smoke>)
|
||||
endif()
|
||||
|
||||
# Function topic tests smoke (QtTest)
|
||||
if(BUILD_SMOKE_TESTS OR NOT TARGET ddsFunctionTopicTests)
|
||||
add_executable(ddsFunctionTopicTests_smoke ddsFunctionTopicTests_smoke.cpp mocks/MockDDS.cpp)
|
||||
target_link_libraries(ddsFunctionTopicTests_smoke PRIVATE Qt5::Core Qt5::Test)
|
||||
target_link_libraries(ddsFunctionTopicTests_smoke PRIVATE Qt6::Core Qt6::Test)
|
||||
add_test(NAME ddsFunctionTopicTests COMMAND $<TARGET_FILE:ddsFunctionTopicTests_smoke>)
|
||||
endif()
|
||||
|
||||
|
||||
@@ -11,9 +11,10 @@ TARGET_INCLUDE_DIRECTORIES(ddsftc
|
||||
INTERFACE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../
|
||||
)
|
||||
IF(BUILD_RTI)
|
||||
TARGET_LINK_LIBRARIES(ddsftc
|
||||
INTERFACE
|
||||
Qt5::Core
|
||||
Qt6::Core
|
||||
ddsfts_connext
|
||||
ddscore # due to the usage of Core::FtReplyState inside generic_ftc_impl.h, only on core.hpp - fixme :/
|
||||
ddsgen
|
||||
@@ -23,6 +24,17 @@ TARGET_LINK_LIBRARIES(ddsftc
|
||||
ddsftccore
|
||||
LtsUtilsCoreHeaderOnly
|
||||
)
|
||||
ELSE()
|
||||
TARGET_LINK_LIBRARIES(ddsftc
|
||||
INTERFACE
|
||||
Qt6::Core
|
||||
ddscore
|
||||
ddsgen
|
||||
ddsQoS
|
||||
ddsftccore
|
||||
LtsUtilsCoreHeaderOnly
|
||||
)
|
||||
ENDIF()
|
||||
SET(SRCS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/generic_ftc.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/generic_ftc.cpp
|
||||
@@ -42,7 +54,7 @@ NGL_TARGET_INCLUDE_DIRECTORIES(ddsftccore
|
||||
)
|
||||
NGL_TARGET_LINK_LIBRARIES(ddsftccore
|
||||
PUBLIC
|
||||
Qt5::Core
|
||||
Qt6::Core
|
||||
ddscore
|
||||
)
|
||||
NGL_INSTALL_TARGET(ddsftccore)
|
||||
@@ -4,6 +4,7 @@
|
||||
# $Author$
|
||||
#
|
||||
|
||||
IF(BUILD_RTI)
|
||||
ADD_LIBRARY(ddsfts_connext INTERFACE)
|
||||
TARGET_INCLUDE_DIRECTORIES(ddsfts_connext
|
||||
INTERFACE
|
||||
@@ -17,7 +18,7 @@ SET(SRCS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/connext.h
|
||||
)
|
||||
TARGET_SOURCES(ddsfts_connext INTERFACE ${SRCS})
|
||||
|
||||
ENDIF()
|
||||
|
||||
SET(SRCS
|
||||
generic_fts.h ;# Interface
|
||||
@@ -31,15 +32,26 @@ NGL_TARGET_INCLUDE_DIRECTORIES(
|
||||
INTERFACE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../
|
||||
)
|
||||
IF(BUILD_RTI)
|
||||
NGL_TARGET_LINK_LIBRARIES(ddsfts
|
||||
PRIVATE
|
||||
RTI::nddscore
|
||||
ProjectConfig
|
||||
ddsQoS
|
||||
PUBLIC
|
||||
Qt5::Core
|
||||
Qt6::Core
|
||||
RTI::nddsc
|
||||
RTI::nddscpp2
|
||||
ddsgen
|
||||
ddsfts_connext
|
||||
)
|
||||
ELSE()
|
||||
NGL_TARGET_LINK_LIBRARIES(ddsfts
|
||||
PRIVATE
|
||||
ProjectConfig
|
||||
ddsQoS
|
||||
PUBLIC
|
||||
Qt6::Core
|
||||
ddsgen
|
||||
)
|
||||
ENDIF()
|
||||
@@ -4,6 +4,8 @@
|
||||
# $Author$
|
||||
#
|
||||
|
||||
IF(BUILD_RTI)
|
||||
|
||||
FIND_PACKAGE(Threads REQUIRED)
|
||||
|
||||
SET(ddsgen_SRCS
|
||||
@@ -30,7 +32,7 @@ NGL_TARGET_INCLUDE_DIRECTORIES(ddsgen
|
||||
NGL_TARGET_LINK_LIBRARIES(ddsgen
|
||||
PUBLIC
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
Qt5::Core
|
||||
Qt6::Core
|
||||
RTI::nddscpp2
|
||||
NGLLogger
|
||||
LtsUtilsCoreHeaderOnly
|
||||
@@ -40,4 +42,6 @@ NGL_TARGET_LINK_LIBRARIES(ddsgen
|
||||
ADD_LIBRARY(topic_type_plugin INTERFACE)
|
||||
TARGET_SOURCES(topic_type_plugin INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/topic_type_plugin.h)
|
||||
TARGET_INCLUDE_DIRECTORIES(topic_type_plugin INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/../../)
|
||||
TARGET_LINK_LIBRARIES(topic_type_plugin INTERFACE ddsgen Qt5::Core)
|
||||
TARGET_LINK_LIBRARIES(topic_type_plugin INTERFACE ddsgen Qt6::Core)
|
||||
|
||||
ENDIF(BUILD_RTI)
|
||||
@@ -4,6 +4,8 @@
|
||||
# $Author$
|
||||
#
|
||||
|
||||
IF(BUILD_RTI)
|
||||
|
||||
SET(SRCS
|
||||
DDS_DefaultQos.h
|
||||
DDS_DefaultQos.cpp
|
||||
@@ -31,5 +33,7 @@ NGL_TARGET_LINK_LIBRARIES(ddsQoS
|
||||
NGLLogger
|
||||
ngltools
|
||||
PUBLIC
|
||||
Qt5::Core
|
||||
Qt6::Core
|
||||
)
|
||||
|
||||
ENDIF(BUILD_RTI)
|
||||
@@ -26,7 +26,7 @@ ADD_INTERFACE_LIBRARY(AsbGuiPluginInterface
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/asb_gui_plugin_interface.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/..
|
||||
GuiPluginInterface
|
||||
Qt5::Core
|
||||
Qt6::Core
|
||||
)
|
||||
|
||||
#
|
||||
@@ -36,5 +36,5 @@ ADD_INTERFACE_LIBRARY(AsbSymbolProxyGuiPluginInterface
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/asb_symbol_proxy_gui_plugin_interface.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/..
|
||||
GuiPluginInterface
|
||||
Qt5::Gui
|
||||
Qt6::Gui
|
||||
)
|
||||
@@ -33,7 +33,7 @@ NGL_ADD_LIBRARY(WS AsbDataPlugin MODULE
|
||||
|
||||
NGL_TARGET_LINK_LIBRARIES(AsbDataPlugin
|
||||
AsbData
|
||||
Qt5::Core
|
||||
Qt6::Core
|
||||
AsbDataPluginInterface
|
||||
GimDataPluginInterface
|
||||
svcAesCommon
|
||||
@@ -51,7 +51,7 @@ NGL_ADD_LIBRARY(WS AsbForeignDataPluginThp STATIC
|
||||
)
|
||||
NGL_TARGET_LINK_LIBRARIES(AsbForeignDataPluginThp
|
||||
AsbData
|
||||
Qt5::Core
|
||||
Qt6::Core
|
||||
AsbDataPluginInterface
|
||||
GimDataPluginInterface
|
||||
svcAesCommon
|
||||
|
||||
+3
-3
@@ -47,8 +47,8 @@ NGL_TARGET_LINK_LIBRARIES(AsbSymEditGuiPlugin
|
||||
LtsSession
|
||||
LtsSessionData
|
||||
LtsUtilsGuiDds
|
||||
Qt5::Core
|
||||
Qt5::Gui
|
||||
Qt5::Widgets
|
||||
Qt6::Core
|
||||
Qt6::Gui
|
||||
Qt6::Widgets
|
||||
)
|
||||
NGL_INSTALL_TARGET(AsbSymEditGuiPlugin)
|
||||
Loaded 100 of 2395 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user