Fixed build errors

+ Fixed a test-related issue in desktopApp.qml
+ Fixed issues in main.cpp
+ Fixed macro-related issues in the DeviceManager class