From 7e48662cf11b5be7d062b082a9a1970419921a08 Mon Sep 17 00:00:00 2001 From: Aaron Seigo Date: Mon, 28 Dec 2015 20:20:16 +0100 Subject: pass the state object into the completer allows completion to use an eventloop e.g. --- akonadish/repl/replStates.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'akonadish/repl/replStates.cpp') diff --git a/akonadish/repl/replStates.cpp b/akonadish/repl/replStates.cpp index 62888d0..55fdf39 100644 --- a/akonadish/repl/replStates.cpp +++ b/akonadish/repl/replStates.cpp @@ -156,7 +156,7 @@ static char *akonadi2_cli_next_tab_complete_match(const char *text, int state) if (nearest.isEmpty()) { SyntaxTree::Command command = SyntaxTree::self()->match(tab_completion_full_state); if (command.first && command.first->completer) { - QStringList commandCompletions = command.first->completer(tab_completion_full_state, fragment); + QStringList commandCompletions = command.first->completer(tab_completion_full_state, fragment, SyntaxTree::self()->state()); if (commandCompletions.size() > state) { return qstrdup(commandCompletions[state].toUtf8()); } -- cgit v1.2.3