Merge feature/qt6-migration-basis-modules-services into feature/qt6-migration-basis-modules
Resolves 17 conflicts against legacy Qt5 semantics; validates with BUILD_RTI=ON BUILD_GRANTLEE=ON.
This commit is contained in:
1200 files changed
+20421
-18259
No files matched your search
+104
@@ -0,0 +1,104 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Stub header for CODEGEN_DATABASE generated code (BUILD_RTI=OFF)
|
||||
* This file is generated by CODEGEN_DATABASE macro when BUILD_RTI=ON
|
||||
* For BUILD_RTI=OFF builds, this stub provides the minimal interface
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <QString>
|
||||
#include <FileManagement/flm_db.h>
|
||||
#include <ngldb/nsqlquery.h>
|
||||
|
||||
// Minimal Logger stub for BUILD_RTI=OFF
|
||||
namespace NGL
|
||||
{
|
||||
enum class LogLevel
|
||||
{
|
||||
Undefined = 0,
|
||||
Trace = 64,
|
||||
Debug = 96,
|
||||
Info = 128,
|
||||
Warning = 150,
|
||||
Error = 182,
|
||||
Fatal = 214,
|
||||
};
|
||||
|
||||
class Logger
|
||||
{
|
||||
public:
|
||||
bool isTraceEnabled() const { return false; }
|
||||
bool isDebugEnabled() const { return true; }
|
||||
bool isInfoEnabled() const { return true; }
|
||||
bool isWarningEnabled() const { return true; }
|
||||
bool isErrorEnabled() const { return true; }
|
||||
bool isFatalEnabled() const { return true; }
|
||||
};
|
||||
}
|
||||
|
||||
// Logger macros (simplified for Qt6) - work with pointer
|
||||
#define LOGFUNCTION Q_FUNC_INFO
|
||||
|
||||
#ifdef LTS_DEBUG
|
||||
#define TRACE_LOG(logger) \
|
||||
for (bool log_level_enabled = (logger)->isDebugEnabled(); log_level_enabled; log_level_enabled = false) \
|
||||
qDebug() << "[TRACE]" << __FILE__ << ":" << __LINE__ << Q_FUNC_INFO
|
||||
#else
|
||||
#define TRACE_LOG(logger) \
|
||||
if (false) qDebug()
|
||||
#endif
|
||||
|
||||
#define DEBUG_LOG(logger) \
|
||||
if (!(logger)->isDebugEnabled()) {} else qDebug() << "[DEBUG]" << __FILE__ << ":" << __LINE__ << Q_FUNC_INFO
|
||||
|
||||
#define INFO_LOG(logger) \
|
||||
if (!(logger)->isInfoEnabled()) {} else qDebug() << "[INFO]" << __FILE__ << ":" << __LINE__ << Q_FUNC_INFO
|
||||
|
||||
#define WARNING_LOG(logger) \
|
||||
if (!(logger)->isWarningEnabled()) {} else qWarning() << "[WARNING]" << __FILE__ << ":" << __LINE__ << Q_FUNC_INFO
|
||||
|
||||
#define ERROR_LOG(logger) \
|
||||
if (!(logger)->isErrorEnabled()) {} else qCritical() << "[ERROR]" << __FILE__ << ":" << __LINE__ << Q_FUNC_INFO
|
||||
|
||||
#define FATAL_LOG(logger) \
|
||||
if (!(logger)->isFatalEnabled()) {} else qCritical() << "[FATAL]" << __FILE__ << ":" << __LINE__ << Q_FUNC_INFO
|
||||
|
||||
namespace FileManagement
|
||||
{
|
||||
|
||||
/**
|
||||
* @brief Base class for database interface implementation
|
||||
*
|
||||
* This class is normally generated by CODEGEN_DATABASE macro.
|
||||
* This stub provides minimal interface for BUILD_RTI=OFF builds.
|
||||
*/
|
||||
class DatabaseInterfaceImpl
|
||||
{
|
||||
public:
|
||||
DatabaseInterfaceImpl()
|
||||
: m_logger(nullptr)
|
||||
, m_query(nullptr)
|
||||
{
|
||||
m_logger = new NGL::Logger();
|
||||
m_query = new NSqlQuery(QSqlDatabase());
|
||||
}
|
||||
virtual ~DatabaseInterfaceImpl()
|
||||
{
|
||||
delete m_logger;
|
||||
delete m_query;
|
||||
}
|
||||
|
||||
// Virtual methods that can be overridden by custom implementations
|
||||
virtual bool updateStatus(int fileId, const FileStatus &status, int operatorId) = 0;
|
||||
virtual bool setUsedBy(int fileId, const bool &usedBy, int usedNo, int operatorId) = 0;
|
||||
|
||||
protected:
|
||||
// Member variables expected by custom implementations
|
||||
NGL::Logger* m_logger;
|
||||
NSqlQuery* m_query;
|
||||
|
||||
// Helper methods expected by custom implementations
|
||||
QString getTableName(const QString &baseName) const { return baseName; }
|
||||
};
|
||||
|
||||
} // namespace FileManagement
|
||||
Reference in new issue
Block a user