Fix Qt6 compatibility issues and exclude tests from release build
- tests/CMakeLists.txt: Wrap migration_tests in RELEASE_BUILD conditional - LogViewModels.cpp: Change BackgroundColorRole to BackgroundRole for Qt6 - LogViewField.hpp/cpp: Add m_logger member variable - LogViewInjectionThread.hpp/cpp: Add m_logger member variable - LogViewGui.hpp/cpp: Add m_logger member variable, fix QString::split() usage - LogViewTetraTelegramsParser.hpp: Add m_logger, change QStringRef to QStringView - LogViewTelegramEdit.hpp: Fix QModelIndex include path (QtGui→QtCore) - LogViewModels.hpp: Fix QAbstractTableModel include path (QtGui→QtCore) - PrtCnv/CMakeLists.txt: Add CMAKE_CURRENT_BINARY_DIR for export header, exclude LastTest from release - CoPrtCnv/CMakeLists.txt: Add PrtCnv include paths for prtcnvlib_export.h - Lts/Common/CodeGen/CMakeLists.txt: Add CMAKE_CURRENT_BINARY_DIR for export header - Lts/Proxies/TrainingAreaBase/Plugins/CMakeLists.txt: Exclude WlsTetra from release scope Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
15 files changed
+31
-12
No files matched your search
@@ -39,6 +39,7 @@ NGL_TARGET_LINK_LIBRARIES(codegen_base
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(codegen_base
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
# If RTI target is available, propagate its include dirs/compile defs
|
||||
if (TARGET RTI::nddscpp2)
|
||||
|
||||
@@ -9,7 +9,7 @@ IF (NOT BUILD_RPM AND NOT RELEASE_BUILD)
|
||||
ENDIF()
|
||||
|
||||
#ADD_SUBDIRECTORY(Spu)
|
||||
IF (BUILD_WLS)
|
||||
IF (BUILD_WLS AND NOT RELEASE_BUILD)
|
||||
ADD_SUBDIRECTORY(WlsTetra)
|
||||
ELSE()
|
||||
ADD_SUBDIRECTORY(TetraJson)
|
||||
|
||||
@@ -35,4 +35,6 @@ NGL_TARGET_INCLUDE_DIRECTORIES(CoPrtCnv
|
||||
INTERFACE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../PrtCnv
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../PrtCnv
|
||||
)
|
||||
@@ -22,7 +22,8 @@ namespace N_LogView
|
||||
|
||||
|
||||
LogViewField::LogViewField(const QString& a_name, const E_FieldKind a_kind, const LogViewXdrElement* a_xdrElement)
|
||||
: m_Name(a_name),
|
||||
: m_logger(getLogger("LogViewField")),
|
||||
m_Name(a_name),
|
||||
m_IsRightAligned(false),
|
||||
m_Offset(0),
|
||||
m_Size(0),
|
||||
|
||||
@@ -113,6 +113,8 @@ namespace N_LogView
|
||||
|
||||
protected:
|
||||
|
||||
Logger& m_logger;
|
||||
|
||||
QString m_Name;
|
||||
QString m_type;
|
||||
QStringList m_ValueList;
|
||||
|
||||
@@ -72,6 +72,7 @@ LogViewGui::LogViewGui(QWidget* a_parent)
|
||||
, m_InjectionThread(nullptr)
|
||||
, m_replayTimer(new QTimer(this))
|
||||
, m_currentReplayRow(-1)
|
||||
, m_logger(getLogger("LogViewGui"))
|
||||
{
|
||||
setWindowIcon(QIcon(QLatin1String(":icons/16x16/rde_16x16.png")));
|
||||
|
||||
@@ -655,10 +656,10 @@ void LogViewGui::updateLogfile()
|
||||
|
||||
QString filePath(fileInfo.absolutePath() + QLatin1Char('/'));
|
||||
const QString baseName = fileInfo.baseName();
|
||||
const QVector<QStringView> parts = baseName.splitView(QLatin1Char('_'));
|
||||
const QVector<QString> parts = baseName.split(QLatin1Char('_'));
|
||||
|
||||
for (int iterator = 0; iterator < parts.size() - 2; ++iterator)
|
||||
filePath += parts.at(iterator).toString() + QLatin1Char('_');
|
||||
filePath += parts.at(iterator) + QLatin1Char('_');
|
||||
|
||||
QString nextFile(filePath + nextDate + QLatin1Char('.') + fileInfo.completeSuffix());
|
||||
QString checkFile(filePath + checkDate + QLatin1Char('.') + fileInfo.completeSuffix());
|
||||
@@ -912,9 +913,9 @@ void LogViewGui::startInjectionThread()
|
||||
settings.beginGroup(QLatin1String("LogFiles"));
|
||||
QString filePath = settings.value(QLatin1String("Dir")).toString();
|
||||
QString exerciseName;
|
||||
QVector<QStringView> parts = filePath.splitView(QLatin1Char('/'));
|
||||
QVector<QString> parts = filePath.split(QLatin1Char('/'));
|
||||
if (parts.size() >= 2)
|
||||
exerciseName = QLatin1Char('_') + parts.at(parts.size() - 2).toString();
|
||||
exerciseName = QLatin1Char('_') + parts.at(parts.size() - 2);
|
||||
|
||||
QString portFilePath = QCoreApplication::applicationDirPath() + QDir::separator() + QLatin1String("PrtCnv") + exerciseName + QLatin1String(".dat");
|
||||
QFileInfo checkPortFile(portFilePath);
|
||||
|
||||
@@ -180,6 +180,9 @@ protected slots:
|
||||
|
||||
void onLogTelegramViewDoubleClicked(const QModelIndex &index);
|
||||
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
private slots:
|
||||
void onSettingsChanged(uint32_t changedFlags);
|
||||
};
|
||||
|
||||
@@ -24,7 +24,8 @@
|
||||
namespace N_LogView
|
||||
{
|
||||
LogViewInjectionThread::LogViewInjectionThread()
|
||||
: m_DoStartConnection(false)
|
||||
: m_logger(getLogger("LogViewInjectionThread"))
|
||||
, m_DoStartConnection(false)
|
||||
, m_SendingPossible(false)
|
||||
, m_Socket(nullptr)
|
||||
, m_Timer(nullptr)
|
||||
|
||||
@@ -45,6 +45,7 @@ namespace N_LogView
|
||||
|
||||
protected:
|
||||
|
||||
Logger& m_logger;
|
||||
bool m_DoStartConnection;
|
||||
bool m_SendingPossible;
|
||||
QString m_Hostname;
|
||||
|
||||
@@ -55,7 +55,7 @@ QVariant ParticipantModel::data(const QModelIndex &index, int role) const
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (role == Qt::BackgroundColorRole)
|
||||
if (role == Qt::BackgroundRole)
|
||||
{
|
||||
if (p.first == 0)
|
||||
return QVariant();
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QtGui/QAbstractTableModel>
|
||||
#include <QtCore/QAbstractTableModel>
|
||||
#include <QtCore/QSharedPointer>
|
||||
#include <QtCore/QSortFilterProxyModel>
|
||||
#include <set>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "LogViewTelegram.hpp"
|
||||
#include <QtGui/QModelIndex>
|
||||
#include <QtCore/QModelIndex>
|
||||
|
||||
class QAction;
|
||||
class QTableView;
|
||||
|
||||
@@ -85,5 +85,6 @@ private:
|
||||
QHash<QString, StructInformation> m_structs;
|
||||
QHash<QString, PodInformation> m_pods;
|
||||
QHash<int, QString> m_visibleTelegrams;
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
}
|
||||
@@ -6,8 +6,10 @@
|
||||
|
||||
|
||||
#ADD_SUBDIRECTORY(TetraTestServer)
|
||||
ADD_SUBDIRECTORY(LastTest)
|
||||
ADD_SUBDIRECTORY(LastTestAuswertung)
|
||||
IF(NOT RELEASE_BUILD)
|
||||
ADD_SUBDIRECTORY(LastTest)
|
||||
ADD_SUBDIRECTORY(LastTestAuswertung)
|
||||
ENDIF()
|
||||
|
||||
SET(PrtCnv_SRCS
|
||||
logger.h
|
||||
@@ -63,6 +65,7 @@ NGL_TARGET_LINK_LIBRARIES(PrtCnvLib
|
||||
)
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(PrtCnvLib
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
)
|
||||
|
||||
|
||||
@@ -209,6 +209,8 @@ if(BUILD_TESTING)
|
||||
return()
|
||||
endif()
|
||||
|
||||
# Skip tests in release scope builds
|
||||
if(NOT RELEASE_BUILD)
|
||||
add_executable(migration_tests ${EXISTING_SOURCES})
|
||||
|
||||
# FLM/FLT tests include build-tree generated headers (flm_[dtc|ftc|enums],
|
||||
@@ -457,6 +459,7 @@ endif()
|
||||
gtest_discover_tests(migration_tests)
|
||||
|
||||
message(STATUS "Migration tests enabled: ${EXISTING_SOURCES}")
|
||||
endif() # NOT RELEASE_BUILD
|
||||
else()
|
||||
message(WARNING "No migration test sources found in ${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
endif()
|
||||
|
||||
Reference in new issue
Block a user