abumq / qmllogging

Lightweight advanced QML Logging (unmaintained)
Other
22 stars 10 forks source link

macro "assert" passed 2 arguments, but takes just 1 #4

Open hstig opened 2 years ago

hstig commented 2 years ago

Simply used easylogging v9.89 and followed instruction. But I get following

qmllogging.h:184:70: error: macro "assert" passed 2 arguments, but takes just 1

  184 |     Q_INVOKABLE inline void assert(bool condition, const QString& msg) {
hstig commented 2 years ago

After undefined assert and defined ELPP_FEATURE_PERFORMANCE_TRACKING it results in

undefined reference to `vtable for el::qml::QmlLogging'

Resolved this by implementing virtual destructor in qmllogging.cpp

 #include "qmllogging.h"

 el::qml::TimeTracker::~TimeTracker(void) {

        m_timedBlocks.clear();

 }

and replaced in qmllogging.h

    virtual ~TimeTracker(void)
    {
        m_timedBlocks.clear();
    }

with

virtual ~TimeTracker(void); 

May there is a better way?