It only works with the old, Qt4 string/macro-based syntax (using the
SLOT and SIGNAL macros.) Which is totally unsafe and I don't use it
anymore (I wouldn't even recommend it to anyone.) The new syntax, which
is statically checked (compile time) and thus type-safe, even though
it's the recommended one by Qt, is not supported in Creator using the
clang model. This does not auto-complete:
connect(this, &MyWidget::mySignal, control, &MyControl::mySlot);
This is not the end of the world, but still it's unpleasant to work with.
The clang code model will get better in the future, I'm sure of it. But
right now, it's pain all the way down.
The lacking auto-completion might not even be the worst of it. In the
end, that's "just" a productivity and convenience issue. The lack of
reliable "find all uses" in the clang model is actually a more serious
problem, since if you trust it you're left with the false sense of
security that you caught all the places in your code where a symbol was
used and made whatever changes you needed to make to fix an issue. But
it doesn't find all uses. Which is *dangerous*. So I have to do a
text-based, project-wide search for a string instead to actually get to
all uses of the symbol and update my code.
On 04/04/16 11:42, Alexey Rusakov wrote:
Not sure what I'm doing wrong but auto-completion for connect() does
work for me. Moreover, I don't expect CLion to be able to work with
SIGNAL() and SLOT() notation without Qt-aware plugin.
I might expect CLion to rule them all in some indefinite future but very
hardly at the moment. Disclaimer: I am a switch-over from CLion to Qt
Creator, exactly because Qt Creator worked for me much better than CLion
for CMake-based Qt-using projects.
On Mon, Apr 4, 2016 at 1:13 AM -0700, "Nikos Chantziaras"
<rea...@gmail.com <mailto:rea...@gmail.com>> wrote:
On 03/04/16 22:00, Thiago Macieira wrote:
> On domingo, 3 de abril de 2016 21:07:00 PDT Emre Besirik wrote:
>> Do you also find it a littlebit unpleasent to code in QtCreator like me?
>> Does Qt plan to do something about this?
> It would be more constructive if you explained what your issues are and
> you findto be unpleasant. Without that, nothing is ever going to happen.
I assume the same things as the rest of us, perhaps:
* Lack of auto-completion for connect().
* Very slow auto-completion.
* Generally auto-completion sometimes work, sometimes doesn't.
* "Find uses" doesn't work, so you have to grep to find uses.
* It gets very confused with smart pointers and templates in general.
* Sometimes doesn't highlight local uses.
This is the clang code model, and these things are a major PITA.
The Creator code model was excellent for C++98. The last few months, I
complete switched my projects to C++14, and that code model is now
useless, so clang is the only choice. And it's not very pleasant to work
with. In fact, I'd say it's very unpleasant.
Interest mailing list
Interest mailing list