[Qt-creator] Overzealously auto-replacing . with ->

Thorbjørn Lindeijer thorbjorn.lindeijer at nokia.com
Tue Feb 3 11:53:40 CET 2009


ext Adam Higerd wrote:
> Consider the following code:
> 
> ("string literal" + myQString).toUtf8()
> 
> Qt Creator currently will not let you type this. It evaluates the data
> type of (const char* + QString) as const char* and, being a pointer
> type, auto-replaces the . with ->. There doesn't seem to be a way to
> tell it NOT to do that, or to override its decision once it's been made.

Qt Creator will now no longer replace . with -> for primitive types, 
fixing the primary annoyance.

Doing the correct completion would be more tricky, since it requires 
dealing with + operator and implicit type conversion. For the moment Qt 
Creator just takes the first operand of the binary operator.

Thanks for reporting this issue.

Regards,
Bjørn

-- 
Thorbjørn Lindeijer
Software Engineer
Nokia, Qt Software




More information about the Qt-creator-old mailing list