aboutsummaryrefslogtreecommitdiffstats
path: root/src/geniviextras/qdltregistration.cpp
diff options
context:
space:
mode:
authorDominik Holland <dominik.holland@pelagicore.com>2015-08-07 11:04:00 +0200
committerDominik Holland <dominik.holland@pelagicore.com>2015-08-07 11:09:51 +0200
commit193cd0c3e18d24c9f472fc4bd3c6080b95ceb4e9 (patch)
treec41fd9b82fe4f2d1ca595b948ebb21223d70c977 /src/geniviextras/qdltregistration.cpp
parent69d6850fe13b80703fec6f34d04623491a132d71 (diff)
Added version detection of the installed dlt library
Only use DLT_REGISTER_LOG_LEVEL_CHANGED_CALLBACK when the dlt version is atleast 2.11.0
Diffstat (limited to 'src/geniviextras/qdltregistration.cpp')
-rw-r--r--src/geniviextras/qdltregistration.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/geniviextras/qdltregistration.cpp b/src/geniviextras/qdltregistration.cpp
index 724328d..3d51257 100644
--- a/src/geniviextras/qdltregistration.cpp
+++ b/src/geniviextras/qdltregistration.cpp
@@ -62,8 +62,11 @@ void QDltRegistrationPrivate::registerCategory(const QLoggingCategory* category,
DLT_REGISTER_CONTEXT(*dltContext, dltCtxName, dltCtxDescription);
m_categoryName2DltContext.insert(QString::fromLatin1(category->categoryName()), dltContext);
m_ctxName2Category.insert(QString::fromLatin1(dltCtxName), const_cast<QLoggingCategory*>(category));
+
+#ifdef DLT_VERSION_2_11
//TODO move to lamda once c++11 is ok to be used
DLT_REGISTER_LOG_LEVEL_CHANGED_CALLBACK(*dltContext, &qtGeniviLogLevelChangedHandler);
+#endif
}
void QDltRegistrationPrivate::setDefaultContext(DltContext *dltContext)