Fix greedy completion for qtconsole
Merge pull request #6402 from bergtholdt/master

Fix greedy completion for qtconsole