RTI Target-Kollisionen behoben, QDebug operator<< für FileStatus
- CMakeLists.txt: ALIAS Targets nur für existierende RTI-Libraries (Zeilen 254-285) - Keine INTERFACE-Placeholder für ddsftc/ddsfts/ddsconnector (Module definieren eigene Targets) - flm_enums.hpp: QDebug operator<< für FileStatus enum class implementiert BUILD_RTI=ON: Configure erfolgreich nach Target-Fix
This commit is contained in:
1 parent
851d47e114
commit
a9c5b2181e
2 files changed
+24
-16
No files matched your search
@@ -4,18 +4,22 @@
|
||||
// Für die Migration erstellen wir minimale Typ-Definitionen basierend auf flm_service.xml
|
||||
|
||||
#include <QtCore/QString>
|
||||
#include <QtCore/QDebug>
|
||||
|
||||
namespace FileManagement
|
||||
{
|
||||
// Enums aus flm_service.xml
|
||||
// Für BUILD_RTI=OFF: FileStatus als int, um direkte Vergleiche zu ermöglichen
|
||||
#ifndef BUILD_RTI
|
||||
using FileStatus = int;
|
||||
constexpr int FileStatus_Valid = 0;
|
||||
constexpr int FileStatus_Deleted = 1;
|
||||
#else
|
||||
// FileStatus als enum class für beide Build-Varianten (BUILD_RTI=ON/OFF)
|
||||
enum class FileStatus : int { Valid = 0, Deleted = 1 };
|
||||
#endif
|
||||
|
||||
// QDebug-Operator für FileStatus
|
||||
inline QDebug operator<<(QDebug debug, FileStatus status)
|
||||
{
|
||||
QDebugStateSaver saver(debug);
|
||||
debug.nospace() << "FileStatus::"
|
||||
<< (status == FileStatus::Valid ? "Valid" : "Deleted");
|
||||
return debug;
|
||||
}
|
||||
|
||||
enum class FileCategory : int { Global = 1, Exercise = 2, User = 3 };
|
||||
|
||||
|
||||
Reference in new issue
Block a user