Index: sources/gui/guicontroller.cpp =================================================================== diff -u -rb9c5b0b3afc3b34d4980ecc4f023f498f80dafbc -r805119c460b4a266d6401c8705f4427e7fbe270f --- sources/gui/guicontroller.cpp (.../guicontroller.cpp) (revision b9c5b0b3afc3b34d4980ecc4f023f498f80dafbc) +++ sources/gui/guicontroller.cpp (.../guicontroller.cpp) (revision 805119c460b4a266d6401c8705f4427e7fbe270f) @@ -1,6 +1,6 @@ /*! * - * Copyright (c) 2019-2019 Diality Inc. - All Rights Reserved. + * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. * \copyright \n * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, \n * IN PART OR IN WHOLE, \n @@ -25,8 +25,10 @@ using namespace Gui; /*! - * \brief GuiController Constructor - * \param parent + * \brief GuiController::GuiController + * \details Constructor + * \param parent - QObject parent owner object. + * Qt handles the children destruction by their parent objects life-cycle. */ GuiController::GuiController(QObject *parent) : QObject(parent) {} @@ -52,8 +54,11 @@ */ void GuiController::quit() { + // coco begin validated: Application termination is not correctly done in coco!!! + // it has been tested and works perfectly fine in normal run. quitThread(); } +// coco end /*! * \brief GuiController::initConnections @@ -86,6 +91,8 @@ */ void GuiController::initThread(QThread &vThread) { + // coco begin validated: Application termination is not correctly done in coco!!! + // it has been tested and works perfectly fine in normal run. // runs in main thread Q_ASSERT_X(QThread::currentThread() == qApp->thread() , __func__, "The Class initialization must be done in Main Thread" ); _thread = &vThread; @@ -94,6 +101,7 @@ _thread->start(); moveToThread(_thread); } +// coco end /*! * \brief GuiController::quitThread @@ -102,11 +110,14 @@ */ void GuiController::quitThread() { + // coco begin validated: Application termination is not correctly done in coco!!! + // it has been tested and works perfectly fine in normal run. if ( ! _thread ) return; // runs in thread moveToThread(qApp->thread()); } +// coco end /*! * \brief GuiController initializer @@ -124,13 +135,14 @@ } /*! - * \brief An Action has been requested - * \details This method Confirmed that if the action is accepted or not,\n - * Regarding the current state and the action.\n - * These actions are only user actions and there is only one user interaction,\n - * So no need to capture from which screen this action comes since we have the current state.\n - * Sometimes GuiController requires to investigate with the ApplicationController to get approval from HD device.\n - * \param vAction - User requested Action + * \brief An Action has been requested + * \details This method Confirmed that if the action is accepted or not, + * Regarding the current state and the action. + * These actions are only user actions and there is only one user interaction, + * So no need to capture from which screen this action comes since we have the current state. + * Sometimes GuiController requires to investigate with the ApplicationController to get approval from HD device. + * \param vAction - User requested Action + * \param vData - Message data to be transmitted. */ void GuiController::doActionTransmit(GuiActionType vAction, const QVariantList &vData) { @@ -150,10 +162,11 @@ */ bool GuiController::handleTransmit(GuiActionType vAction, const QVariantList &vData) { + // coco begin validated: This is a sample code and currently does nothing Q_UNUSED(vAction) Q_UNUSED(vData) - // This is an example implementation of how to handle + // This is an example implementation of how to handle actions // which does not require HD approval in GuiController // Process the GuiView Request. // It can be processed in GuiController take action and notify GuiView @@ -176,12 +189,14 @@ } return false; } +// coco end /*! - * \brief Action commanded by HD + * \brief Action commanded by HD * \details An action has been commanded by HD, - * Gui requires to be notified to perform the action. - * \param vAction + * Gui requires to be notified to perform the action. + * \param vAction - Message Action + * \param vData - The data to be translated. */ void GuiController::onActionReceive (GuiActionType vAction, const QVariantList &vData) { @@ -197,8 +212,11 @@ */ void GuiController::onUSBDriveMount() { + // coco begin validated: This needs user interaction to plug-in USB device + // has been tested manually emit didUSBDriveMount(); } +// coco end /*! * \brief GuiController::doUSBDriveUmount @@ -207,8 +225,11 @@ */ void GuiController::doUSBDriveUmount() { + // coco begin validated: This needs user interaction to plug-out the USB device + // has been tested manually emit didUSBDriveUmount(); } +// coco end /*! * \brief GuiController::onUSBDriveRemove @@ -217,8 +238,11 @@ */ void GuiController::onUSBDriveRemove() { + // coco begin validated: This needs user interaction to plug-out the USB device + // has been tested manually emit didUSBDriveRemove(); } +// coco end /*! * \brief GuiController::onExport @@ -227,8 +251,11 @@ */ void GuiController::onExport() { + // coco begin validated: This needs user interaction to export to USB device + // has been tested manually emit didExport(); } +// coco end /*! * \brief GuiController::doExportLog @@ -237,6 +264,8 @@ */ void GuiController::doExportLog() { + // coco begin validated: This needs user interaction to export to USB device + // has been tested manually emit didExportLog(); } - +// coco end