Update QsLog to 2.1 snapshot 46b643d5bcbc

This commit is contained in:
Felix Kauselmann
2020-07-24 19:05:01 +02:00
parent c13ec618d0
commit 1568a5f253
45 changed files with 2579 additions and 269 deletions

View File

@ -37,19 +37,22 @@ namespace QsLogging
// called from a different thread or even a different binary. You should not access QsLog from
// inside LogFunction and should not perform any time-consuming operations.
// logMessageReady is connected through a queued connection and trace messages are not included
class FunctorDestination : public QObject, public Destination
class QSLOG_SHARED_OBJECT FunctorDestination : public QObject, public Destination
{
Q_OBJECT
public:
explicit FunctorDestination(LogFunction f);
FunctorDestination(QObject *receiver, const char *member);
static const char* const Type;
virtual void write(const QString &message, Level level);
virtual bool isValid();
explicit FunctorDestination(LogFunction f);
FunctorDestination(QObject* receiver, const char* member);
void write(const LogMessage& message) override;
bool isValid() override;
QString type() const override;
protected:
// int used to avoid registering a new enum type
Q_SIGNAL void logMessageReady(const QString &message, int level);
Q_SIGNAL void logMessageReady(const QsLogging::LogMessage& message);
private:
LogFunction mLogFunction;