Skip to content

Commit

Permalink
ControllerEngine: add warning/debug logging when module functions are…
Browse files Browse the repository at this point in the history
… missing
  • Loading branch information
Be-ing committed Jun 14, 2020
1 parent 880f316 commit e33df5c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/controllers/engine/controllerengine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.";
}
}

Expand Down

0 comments on commit e33df5c

Please sign in to comment.