feat(GODT-3121): forward user input to bridge.

This commit is contained in:
Xavier Michelon
2023-12-05 15:41:05 +01:00
parent 88c4737ba4
commit 3309137b80
5 changed files with 27 additions and 15 deletions

View File

@ -304,11 +304,11 @@ void QMLBackend::openExternalLink(QString const &url) {
//****************************************************************************************************************************************************
//
/// \param[in] categoryID The ID of the bug report category.
//****************************************************************************************************************************************************
void QMLBackend::requestKnowledgeBaseSuggestions() const {
void QMLBackend::requestKnowledgeBaseSuggestions(qint8 categoryID) const {
HANDLE_EXCEPTION(
app().grpc().requestKnowledgeBaseSuggestions("Test");
app().grpc().requestKnowledgeBaseSuggestions(reportFlow_.collectUserInput(categoryID));
)
}

View File

@ -66,7 +66,7 @@ public: // member functions.
Q_INVOKABLE void clearAnswers(); ///< Clear all collected answers.
Q_INVOKABLE bool isTLSCertificateInstalled(); ///< Check if the bridge certificate is installed in the OS keychain.
Q_INVOKABLE void openExternalLink(QString const & url = QString()); ///< Open a knowledge base article.
Q_INVOKABLE void requestKnowledgeBaseSuggestions() const; ///< Request knowledgebase article suggestions.
Q_INVOKABLE void requestKnowledgeBaseSuggestions(qint8 categoryID) const; ///< Request knowledgebase article suggestions.
public: // Qt/QML properties. Note that the NOTIFY-er signal is required even for read-only properties (QML warning otherwise)
Q_PROPERTY(bool showOnStartup READ showOnStartup NOTIFY showOnStartupChanged)

View File

@ -78,7 +78,7 @@ Item {
root.showBugCategory();
}
onQuestionAnswered: {
Backend.requestKnowledgeBaseSuggestions();
Backend.requestKnowledgeBaseSuggestions(categoryId);
root.showBugReport();
}
}