[Qt-creator] Overzealous autocomplete

Christian Stenger Christian.Stenger at qt.io
Thu Jan 24 09:28:09 CET 2019


Hi,

This is basically a different issue that came with some special re-ordering inside the proposal widget (done for the C++/Clang side of QC) and the QmlJSEditor uses the same infrastructure but the re-ordering broke there several stuff...

See https://bugreports.qt.io/browse/QTCREATORBUG-21527

Kind regards,
Christian

________________________________________
From: Qt-creator <qt-creator-bounces at qt-project.org> on behalf of Eike Ziller <Eike.Ziller at qt.io>
Sent: Thursday, January 24, 2019 9:10:55 AM
To: Jason H
Cc: qt-creator
Subject: Re: [Qt-creator] Overzealous autocomplete



> On 23. Jan 2019, at 20:33, Jason H <jhihn at gmx.com> wrote:
>
> Camera {
>    id: camera[enter]
>
> becomes
> Camera {
>    id: cameraStateChanged()
>
>
>
> This is very clearly wrong. Since when did enter start being autocomplete key? So I did some digging... Autocomplete was set to "always" with a timeout of 400ms. It seems the max is 500ms, which is waaaay not enough time.
> I also don't know how "when triggered" or "manually" works. But in my version of autocomplete, [tab] is what I'm used to.
>
> 1. How do I "trigger" autocomplete, what is "manual" and what is the difference?

I think “when triggered” includes automatic completion popup when certain characters are typed in the right context, like “.” after a variable name in case of C++,
while “Manually” only pops up completion when pressing the shortcut.

> 2. Why is the timeout limited to 500ms? I'd like at least a full second.

Looks like the configuration was added in 2014 after complains that the delay is too long. I don’t see a reason why to disallow longer timeouts too.
https://codereview.qt-project.org/250787

> 3. Is there anyway to use [tab] to complete?

Well, you can set the shortcut for “Trigger completion” in Options > Environment > Keyboard.
But since completion is offered everywhere, you’ll no longer be able to indent with tab, which is probably not what you want.

Br, Eike

--
Eike Ziller
Principal Software Engineer

The Qt Company GmbH
Rudower Chaussee 13
D-12489 Berlin
eike.ziller at qt.io
http://qt.io
Geschäftsführer: Mika Pälsi,
Juha Varelius, Mika Harjuaho
Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B

_______________________________________________
Qt-creator mailing list
Qt-creator at qt-project.org
https://lists.qt-project.org/listinfo/qt-creator



More information about the Qt-creator mailing list