From e33df5ca45cd4871b56feeda1726aee2540b6a55 Mon Sep 17 00:00:00 2001 From: Be Date: Sun, 14 Jun 2020 15:14:05 -0500 Subject: [PATCH] ControllerEngine: add warning/debug logging when module functions are missing --- src/controllers/engine/controllerengine.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/controllers/engine/controllerengine.cpp b/src/controllers/engine/controllerengine.cpp index b5b705bf5d32..890a48fd82f3 100644 --- a/src/controllers/engine/controllerengine.cpp +++ b/src/controllers/engine/controllerengine.cpp @@ -243,11 +243,15 @@ void ControllerEngine::loadModule(QFileInfo moduleFileInfo) { QJSValue receiveDataFunction = mod.property("receiveData"); if (receiveDataFunction.isCallable()) { m_receiveDataFunction = receiveDataFunction; + } else { + qWarning() << "Module exports no receiveData function."; } QJSValue shutdownFunction = mod.property("shutdown"); if (shutdownFunction.isCallable()) { m_shutdownFunction = shutdownFunction; + } else { + qDebug() << "Module exports no shutdown function."; } }