Index: sources/view/VAdjustmentResponseBase.cpp =================================================================== diff -u -r7a3067893b8133d0f47bbdddd3268439e722d37d -rb794e2e09c4a06e6faaa722f2dc35f50e5f2e8e0 --- sources/view/VAdjustmentResponseBase.cpp (.../VAdjustmentResponseBase.cpp) (revision 7a3067893b8133d0f47bbdddd3268439e722d37d) +++ sources/view/VAdjustmentResponseBase.cpp (.../VAdjustmentResponseBase.cpp) (revision b794e2e09c4a06e6faaa722f2dc35f50e5f2e8e0) @@ -27,15 +27,10 @@ * \brief View::VAdjustmentResponseBase::text * \details The slot to get the Reason Description * \return Reason description as string + * \note thid method is kept to be consistent with the qml implementation. + * it returns the same value as title method. */ -QString View::VAdjustmentResponseBase::text() -{ - QString text; - if (_adjustment_Reason != GuiRequestReasons::REQUEST_REJECT_REASON_NONE) { - text = title(); - } - return text; -} +QString View::VAdjustmentResponseBase::text() { return title(); } /*! * \brief View::VAdjustmentResponseBase::title @@ -44,15 +39,10 @@ */ QString View::VAdjustmentResponseBase::title () { - if ( ! _adjustment_Reason ) - return {}; - + if ( ! _adjustment_Reason ) return {}; QString s = _rejects[_adjustment_Reason].title; - - if ( ! s.isEmpty()) - return s; - else - return tr("Rejected") ; + if ( ! s.isEmpty()) return s; + else return tr("[%1] Unknown Error").arg(_adjustment_Reason); } /*! @@ -71,15 +61,9 @@ if ( ! ok ) { LOG_DEBUG(QString("Invalid Reject ID [%1]").arg(group)); continue; } RejectData rejectData; - InstructionData instructionData; for (const QString &key : _Settings.keys(category, group)) { if (Storage::Settings::isKeyTitle ( key ) ) { rejectData.title = _Settings.value(category, group, key).toString(); - } else if (Storage::Settings::isKeyMessage ( key ) ) { - rejectData.message = _Settings.value(category, group, key).toString(); - } else { - instructionData[key] = _Settings.value(category, group, key).toString(); - rejectData.instructions = instructionData; } } _rejects[id] = rejectData;