Adds latest migration results
This commit is contained in:
5 files changed
+1424
No files matched your search
@@ -0,0 +1,113 @@
|
||||
// Stub log4qt implementation for builds without log4qt library
|
||||
// This provides minimal functionality to allow compilation when log4qt is not available
|
||||
|
||||
#ifndef LOG4QT_STUB_H
|
||||
#define LOG4QT_STUB_H
|
||||
|
||||
#include <QString>
|
||||
#include <QObject>
|
||||
#include <QDebug>
|
||||
|
||||
namespace Log4Qt {
|
||||
|
||||
// Minimal Logger class stub (no Q_OBJECT to avoid MOC requirements)
|
||||
class Logger
|
||||
{
|
||||
public:
|
||||
explicit Logger(QObject *parent = nullptr) { Q_UNUSED(parent); }
|
||||
virtual ~Logger() = default;
|
||||
|
||||
inline void trace(const QString &message) { Q_UNUSED(message); }
|
||||
inline void debug(const QString &message) { qDebug() << message; }
|
||||
inline void info(const QString &message) { qDebug() << message; }
|
||||
inline void warning(const QString &message) { qWarning() << message; }
|
||||
inline void error(const QString &message) { qCritical() << message; }
|
||||
inline void fatal(const QString &message) { qCritical() << message; }
|
||||
|
||||
inline bool isTraceEnabled() const { return true; }
|
||||
inline bool isDebugEnabled() const { return true; }
|
||||
inline bool isInfoEnabled() const { return true; }
|
||||
inline bool isWarnEnabled() const { return true; }
|
||||
inline bool isErrorEnabled() const { return true; }
|
||||
};
|
||||
|
||||
// Minimal RollingFileAppender stub
|
||||
class RollingFileAppender : public Logger
|
||||
{
|
||||
public:
|
||||
explicit RollingFileAppender(QObject *parent = nullptr) : Logger(parent) {}
|
||||
~RollingFileAppender() override = default;
|
||||
|
||||
inline void setFile(const QString &filename) { Q_UNUSED(filename); }
|
||||
inline void setAppendFile(bool append) { Q_UNUSED(append); }
|
||||
virtual void activateOptions() {}
|
||||
};
|
||||
|
||||
// Minimal LogManager stub
|
||||
class LogManager
|
||||
{
|
||||
public:
|
||||
static LogManager *instance() {
|
||||
static LogManager inst;
|
||||
return &inst;
|
||||
}
|
||||
|
||||
Logger *logger(const QString &name) {
|
||||
static Logger dummy;
|
||||
Q_UNUSED(name);
|
||||
return &dummy;
|
||||
}
|
||||
|
||||
void setDefaultLogger(Logger *logger) { Q_UNUSED(logger); }
|
||||
};
|
||||
|
||||
// Minimal PropertyConfigurator stub
|
||||
class PropertyConfigurator
|
||||
{
|
||||
public:
|
||||
static bool doConfigure(const QString &configFile) {
|
||||
Q_UNUSED(configFile);
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
// Minimal LoggerRepository stub
|
||||
class LoggerRepository
|
||||
{
|
||||
public:
|
||||
inline void setThreshold(int level) { Q_UNUSED(level); }
|
||||
};
|
||||
|
||||
// Minimal ConfiguratorHelper stub
|
||||
namespace Helpers {
|
||||
class ConfiguratorHelper {
|
||||
public:
|
||||
static ConfiguratorHelper *instance() {
|
||||
static ConfiguratorHelper inst;
|
||||
return &inst;
|
||||
}
|
||||
};
|
||||
|
||||
class Properties {
|
||||
public:
|
||||
Properties() {}
|
||||
inline void setProperty(const QString &key, const QString &value) {
|
||||
Q_UNUSED(key); Q_UNUSED(value);
|
||||
}
|
||||
};
|
||||
|
||||
class Factory {
|
||||
public:
|
||||
static Factory *instance() {
|
||||
static Factory inst;
|
||||
return &inst;
|
||||
}
|
||||
inline void registerAppender(const QString &name, void *creator) {
|
||||
Q_UNUSED(name); Q_UNUSED(creator);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
} // namespace Log4Qt
|
||||
|
||||
#endif // LOG4QT_STUB_H
|
||||
Reference in new issue
Block a user