Adds Q_OBJECT and generated includes to flm custom impls

This commit is contained in:
berrux-dev committed 2026-09-18 17:47:34 +02:00
1 parent d79d89c352
commit e156fbb5e4
5 files changed
+27 -29

No files matched your search

@@ -35,7 +35,7 @@ bool DtcImplCustom::getAllTemplates(QList<FileContent> &allTemplates)
waitForHistoricalDataFileContent(4000);
}
for (const auto &fc : m_dtcFileContent->readAlive())
if (fc.data().isTemplate())
if (fc.data().isTemplate)
allTemplates.append(fc);
return true;
}
@@ -49,10 +49,10 @@ bool DtcImplCustom::getAllFiles(const FileType &fileType, int folderId, QStringL
waitForHistoricalDataFileContent(4000);
}
for (const auto &fc : m_dtcFileContent->readAlive())
if (fc.data().fileType() == fileType && fc.data().folderId() == folderId)
if (fc.data().fileType == fileType && fc.data().folderId == folderId)
{
if (showHidden || !fc.data().isHidden())
allFiles << QString::fromStdString(fc.data().name());
if (showHidden || !fc.data().isHidden)
allFiles << QString::fromStdString(fc.data().name);
}
return true;
}
@@ -66,8 +66,8 @@ bool DtcImplCustom::getFilesOperator(const FileType &fileType, int folderId, int
waitForHistoricalDataFileContent(4000);
}
for (const auto &fc : m_dtcFileContent->readAlive())
if (fc.data().fileType() == fileType && fc.data().folderId() == folderId && fc.data().operatorId() == operatorId)
allFiles << QString::fromStdString(fc.data().name());
if (fc.data().fileType == fileType && fc.data().folderId == folderId && fc.data().operatorId == operatorId)
allFiles << QString::fromStdString(fc.data().name);
return true;
}
@@ -82,7 +82,7 @@ bool DtcImplCustom::getFile(const FileType &fileType, int folderId, const QStrin
const auto stdFileName = fileName.toStdString();
for (const auto &fc : m_dtcFileContent->readAlive())
{
if (fc.data().fileType() == fileType && fc.data().folderId() == folderId && fc.data().name() == stdFileName)
if (fc.data().fileType == fileType && fc.data().folderId == folderId && fc.data().name == stdFileName)
{
fileMetadata = fc;
return true;
@@ -99,12 +99,12 @@ int DtcImplCustom::findFolder(int parentId, const QString &name) const
std::string stdName = name.toStdString();
for (const auto &fld : m_dtcFolder->readAlive())
{
if (fld.data().parentId() == parentId)
if (fld.data().parentId == parentId)
{
if (fld.data().name() == stdName)
return fld.data().id();
if (fld.data().name == stdName)
return fld.data().id;
else
foldersVec.append(fld.data().id());
foldersVec.append(fld.data().id);
}
}
@@ -152,9 +152,9 @@ int DtcImplCustom::getExerciseId(int folderId)
}
for (const auto &fld : m_dtcFolder->readAlive())
{
if (fld.data().id() == folderId)
if (fld.data().id == folderId)
{
int exId = QString::fromStdString(fld.data().name()).remove(0,4).toInt();
int exId = QString::fromStdString(fld.data().name).remove(0,4).toInt();
// can be "$EX_" or "$PH_"
if (exId > 0)
return exId;
@@ -176,16 +176,16 @@ int DtcImplCustom::getFileId(const FileType &fileType, const QString &fileName,
for (const auto &fc : m_dtcFileContent->readAlive())
{
const FileContent &content = fc.data();
bool cond = (content.fileType() == fileType && content.name() == strFileName);
if (content.exerciseId().is_set())
cond &= (content.exerciseId() == exerciseId);
if (content.phaseId().is_set())
cond &= (content.phaseId() == phaseId);
bool cond = (content.fileType == fileType && content.name == strFileName);
if (content.exerciseId.is_set())
cond &= (content.exerciseId == exerciseId);
if (content.phaseId.is_set())
cond &= (content.phaseId == phaseId);
if (cond)
{
DEBUG_LOG(m_logger) << "Found file content id = " << content.id();
return content.id();
DEBUG_LOG(m_logger) << "Found file content id = " << content.id;
return content.id;
}
}
return 0;