mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-22 01:56:44 +00:00
feat(GODT-3121): suggestions are transferred to QML.
This commit is contained in:
@ -1315,6 +1315,7 @@ void QMLBackend::connectGrpcEvents() {
|
||||
connect(client, &GRPCClient::certificateInstallCanceled, this, &QMLBackend::certificateInstallCanceled);
|
||||
connect(client, &GRPCClient::certificateInstallFailed, this, &QMLBackend::certificateInstallFailed);
|
||||
connect(client, &GRPCClient::showMainWindow, [&]() { this->showMainWindow("gRPC showMainWindow event"); });
|
||||
connect(client, &GRPCClient::knowledgeBasSuggestionsReceived, this, &QMLBackend::receivedKnowledgeBaseSuggestions);
|
||||
|
||||
// cache events
|
||||
connect(client, &GRPCClient::cantMoveDiskCache, this, &QMLBackend::cantMoveDiskCache);
|
||||
|
||||
@ -279,6 +279,7 @@ signals: // Signals received from the Go backend, to be forwarded to QML
|
||||
void selectUser(QString const& userID, bool forceShowWindow); ///< Signal emitted in order to selected a user with a given ID in the list.
|
||||
void genericError(QString const &title, QString const &description); ///< Signal for the 'genericError' gRPC stream event.
|
||||
void imapLoginWhileSignedOut(QString const& username); ///< Signal for the notification of IMAP login attempt on a signed out account.
|
||||
void receivedKnowledgeBaseSuggestions(QList<bridgepp::KnowledgeBaseSuggestion> const& suggestions); ///< Signal for the reception of knowledgebase article suggestions.
|
||||
|
||||
// This signal is emitted when an exception is intercepted is calls triggered by QML. QML engine would intercept the exception otherwise.
|
||||
void fatalError(bridgepp::Exception const& e) const; ///< Signal emitted when an fatal error occurs.
|
||||
|
||||
@ -155,7 +155,12 @@ SettingsView {
|
||||
function onReportBugFinished() {
|
||||
sendButton.loading = false;
|
||||
}
|
||||
|
||||
function onReceivedKnowledgeBaseSuggestions(suggestions) {
|
||||
console.error("QML: onReceivedKnowledgeBaseSuggestions() - len = %1".arg(suggestions.length))
|
||||
console.error("QML: %1: %2".arg(suggestions[0].title).arg(suggestions[0].url))
|
||||
console.error("QML: %1: %2".arg(suggestions[1].title).arg(suggestions[1].url))
|
||||
console.error("QML: %1: %2".arg(suggestions[2].title).arg(suggestions[2].url))
|
||||
}
|
||||
target: Backend
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user