On 03/27/2010 12:17 PM, Hannu Koivisto wrote:
> "Eric M. Ludlam"<eric@...> writes:
>
>> First, could someone suggest some Ubuntu package names I need to install
>> to get all the Qt4 headers? Thanks.
>
> libqt4-dev should be enough.
Thanks. That eluded me the first time.
>> When you start a completion, Semantic tries to resolve as much as it
>> can. Thus in the second example, it has resolved "Key", but doesn't
>> know what to do with it. In the first example, "Ke" doesn't resolve, so
>> it finds some completions for you.
>
> What do you mean by "doesn't know what to do with it"? What I
> can't quite grasp is how it can find it as a completion but then
> suddenly "doesn't know what to do with it".
Well, if you have "Qt::Key", and that is a complete name, what would it
do with it? If you had "Qt::Key." or "Qt::Key::" then it would know
what to do next, but if it is already complete, then there isn't much
else to do.
The confusing bit is, I assume, that there is also "Qt::Keyboard" or
whatever it was, but Semantic already thinks it is complete, so doesn't
have a next step.
>> When you use semantic-debug-assist, it assumes that you haven't gotten
>> the answer you want. Thus, it tries to provide suggestions about what
>> you can do to find more completions other than the ones in the Possible
>> completions list. If the completions you want are there, then you are ok.
>>
>> Thus, in the first case, it fails to find "Ke" in the Qt namespace,
>> which is true. "Prefix" is the internal name of the text Semantic tries
>> to look up, and it failed to resolve to any single thing.
>>
>> Thus, I think it is doing the right thing, but perhaps the output could
>> be better. Would this change help?
>>
>> "Cannot find prefix " --> "Cannot find symbol"
>
> I guess that would be clearer.
>
>> For the second, the debug assistant appears to have not been setup for
>> type chains. I'll poke into that a bit more later.
>
> I'm going to need Semantic glossary :) What's a type chain? grep
> in the sources and in the documentation didn't produce any hits.
Hmmm. That's ok, I just made that up in the last email. What I mean by
a chain of types is:
Qt -> a namespace
Key -> an enum
so
Qt::Key
is a chain of types. I may refer to it as a sequence or list too
depending on my mood. :) Eventually:
Qt::Key::EnumValue
would be a non-type value. Semantic would treat it as a constant of
type enum Key. The debug assistant was not setup to help when the last
item in a sequence (or chain) of symbols is a type, and not a variable
or function, and thus provides a weird message.
Eric
|