Fix FileManagement Build-Fehler (BUILD_RTI=OFF)
- flm_db.h: Stub-Header mit Folder/FileContent Klassen erstellt - flm_enums.hpp: MainFolder Enum hinzugefügt (None=0) - flm_translation.h: toInt() entfernt, trFolderName() angepasst - Plugin-Interfaces erstellt (flm, opm, exm) - Viewer-Dialogs: QString-Konvertierungen behoben - AdvancedSymbology CMakeLists.txt: Ungültige Pfade entfernt - ism_mounting_point.cpp: Redundante Definitionen entfernt Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
1 parent
c21083700a
commit
e5d8bfa432
15 files changed
+815
-91
No files matched your search
@@ -15,8 +15,6 @@ ADD_SUBDIRECTORY(Helper)
|
||||
ADD_INTERFACE_LIBRARY(AsbDataPluginInterface
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/asb_data_plugin_interface.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/..
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../Viewer/SituationMap
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../Viewer/SituationMap/Symbology
|
||||
DataPluginInterface
|
||||
advancedSymbology
|
||||
Qt6::Gui
|
||||
|
||||
+1
-58
@@ -146,66 +146,9 @@ void MountingPoint::setHasAssociatedAssetDefect(bool hasDefect) {
|
||||
m_hasAssociatedAssetDefect = hasDefect;
|
||||
}
|
||||
|
||||
MountingPointState MountingPoint::getNextMountingPointState(MountingPointState currState) const {
|
||||
MountingPointState MountingPoint::getNextMountingPointState(MountingPointState currState) {
|
||||
Q_UNUSED(currState);
|
||||
return MountingPointState();
|
||||
}
|
||||
|
||||
const StructureElement &MountingPoint::data() const {
|
||||
return m_data;
|
||||
}
|
||||
|
||||
void MountingPoint::updateData(const StructureElement &data, int floorId) {
|
||||
m_data = data;
|
||||
m_floor = floorId;
|
||||
}
|
||||
|
||||
int32_t MountingPoint::associatedAssetId() const {
|
||||
return m_associatedAssetId;
|
||||
}
|
||||
|
||||
bool MountingPoint::hasAssociatedAsset() const {
|
||||
return m_associatedAssetId >= 0;
|
||||
}
|
||||
|
||||
bool MountingPoint::hasAssociatedAssetDefect() const {
|
||||
return m_hasAssociatedAssetDefect;
|
||||
}
|
||||
|
||||
MountingPointState MountingPoint::aimState() const {
|
||||
return m_aimState;
|
||||
}
|
||||
|
||||
void MountingPoint::setAimState(const MountingPointState &mps) {
|
||||
m_aimState = mps;
|
||||
}
|
||||
|
||||
bool MountingPoint::isValid() const {
|
||||
return m_isValid;
|
||||
}
|
||||
|
||||
Core::RelativePosition MountingPoint::relPosition() const {
|
||||
return m_data.relPosition();
|
||||
}
|
||||
|
||||
int32_t MountingPoint::buildingId() const {
|
||||
return m_data.mainStructureElementId();
|
||||
}
|
||||
|
||||
int MountingPoint::floor() const {
|
||||
return m_floor;
|
||||
}
|
||||
|
||||
void MountingPoint::setFloor(int floor) {
|
||||
m_floor = floor;
|
||||
}
|
||||
|
||||
QByteArray MountingPoint::properties() const {
|
||||
return QByteArray::fromStdString(m_data.properties());
|
||||
}
|
||||
|
||||
QString MountingPoint::type() const {
|
||||
return QString::number(static_cast<int>(m_data.mountingPointTypeId()));
|
||||
}
|
||||
|
||||
} // namespace InfrastructureManagement
|
||||
@@ -88,7 +88,7 @@ QVariant DialogModelFile::data(const QModelIndex &index, int role) const
|
||||
switch (index.column())
|
||||
{
|
||||
case NAME:
|
||||
return QString::fromStdString(fl.name());
|
||||
return fl.name();
|
||||
case ISTEMPLATE:
|
||||
return fl.isTemplate() ? tr("Yes") : tr("No");
|
||||
case FOLDER:
|
||||
@@ -110,7 +110,7 @@ QVariant DialogModelFile::data(const QModelIndex &index, int role) const
|
||||
case USES:
|
||||
return QString::fromStdString(fl.usedBy());
|
||||
case LASTMODIFIED:
|
||||
return DTG::toStringMSec(fl.lastModified());
|
||||
return DTG::toStringMSec(fl.lastModified().toMSecsSinceEpoch());
|
||||
case PROPERTIES:
|
||||
return QString::fromStdString(fl.properties());
|
||||
default:
|
||||
@@ -136,7 +136,7 @@ int DialogModelFile::findFileIdFromName(const QString &fileName) const
|
||||
for (int row = 0; row < rc; ++row)
|
||||
{
|
||||
const FileManagement::FileContent &fl = this->getRowData(row);
|
||||
if (QString::fromStdString(fl.name()) == fileName)
|
||||
if (fl.name() == fileName)
|
||||
{
|
||||
return fl.id();
|
||||
}
|
||||
|
||||
@@ -152,7 +152,7 @@ bool DialogModelFolder::initModel(int exerciseId, const QVector<FileManagement::
|
||||
}
|
||||
}
|
||||
FileManagement::MainFolder mainFolder = static_cast<FileManagement::MainFolder>(data.path()[0]);
|
||||
//qCritical() << "Folder = " << QString::fromStdString(data.name()) << ", mainFolder = " << mainFolder.underlying();
|
||||
//qCritical() << "Folder = " << data.name() << ", mainFolder = " << mainFolder.underlying();
|
||||
if (!mainFolders.contains(mainFolder))
|
||||
{
|
||||
// qCritical() << "Excluded id = " << data.id();
|
||||
@@ -243,7 +243,7 @@ bool DialogModelFolder::onDeleteRow(const QModelIndex &idx, bool isFirstItem)
|
||||
{
|
||||
NGLTreeItem *item = privateData(idx);
|
||||
FileManagement::Folder data = item->data().value<FileManagement::Folder>();
|
||||
data.isDeleted(true);
|
||||
data.setDeleted(true);
|
||||
}
|
||||
removeRow(idx.row(), idx.parent());
|
||||
|
||||
@@ -289,9 +289,9 @@ bool DialogModelProxyFolder::lessThan(const QModelIndex &source_left, const QMod
|
||||
return FileManagement::toInt(folderLeft.mainFolder()) < FileManagement::toInt(folderRight.mainFolder());
|
||||
}
|
||||
|
||||
if (QString::fromStdString(folderLeft.name()) != QString::fromStdString(folderRight.name()))
|
||||
if (folderLeft.name() != folderRight.name())
|
||||
{
|
||||
return (QString::fromStdString(folderLeft.name()) < QString::fromStdString(folderRight.name()));
|
||||
return (folderLeft.name() < folderRight.name());
|
||||
}
|
||||
|
||||
return folderLeft.id() < folderRight.id();
|
||||
|
||||
@@ -314,7 +314,7 @@ void LtsFileDialogWidget::enaDisa()
|
||||
if (idxFile.isValid())
|
||||
{
|
||||
m_selectedFileContent = m_modelFile->getRowData(m_ui->widgetFiles->currentIndex().row());
|
||||
m_fileName = QString::fromStdString(m_selectedFileContent.name());
|
||||
m_fileName = m_selectedFileContent.name();
|
||||
m_ui->leFile->setText(m_fileName);
|
||||
}
|
||||
else
|
||||
@@ -352,7 +352,7 @@ bool LtsFileDialogWidget::showFile(const FileManagement::FileContent &fc, const
|
||||
const auto &fldPath = fld.path();
|
||||
|
||||
// filter in USER DOCUMENTS folder and subfolders
|
||||
if (LtsUtils::isInVector(fldPath, FileManagement::MainFolder::UserDocuments))
|
||||
if (LtsUtils::isInVector(fldPath, static_cast<int>(FileManagement::MainFolder::UserDocuments)))
|
||||
{
|
||||
const int operatorId = LtsSessionData::LtsSessionData::getInstance()->getOperatorId();
|
||||
// filter on User Category and OperatorId
|
||||
@@ -362,7 +362,7 @@ bool LtsFileDialogWidget::showFile(const FileManagement::FileContent &fc, const
|
||||
}
|
||||
|
||||
// filter in EXERCISE DOCUMENTS folder and subfolders
|
||||
if (LtsUtils::isInVector(fldPath, FileManagement::MainFolder::ExerciseDocuments))
|
||||
if (LtsUtils::isInVector(fldPath, static_cast<int>(FileManagement::MainFolder::ExerciseDocuments)))
|
||||
{
|
||||
// filter on Category = Exercise
|
||||
if (fc.fileCategory() != FileManagement::FileCategory::Exercise)
|
||||
|
||||
Reference in new issue
Block a user