[Qt-interest] Where is the mistake ?

Martin Hofius Martin at hofius-online.com
Mon Nov 16 10:49:13 CET 2009


Am Montag, 16. November 2009 schrieb rafal:
> Hi,
> I have some problem for this code:
...
>
> if ( !key.isEmpty() && !key.isNull())
>
> {
>
>  qFatal("empty this->key!!!!");
>
>  return;
>
...
> Problem:
...
> next i run getAllIndex(QString text),
> this method get all index of "key" value on "text" . ....  But this
> method always return error "empty this->key!!!!"
>
> I don't have any idea where I make mistake.  All this method operate on
> this same object (this same class)
you trigger this error if
-- key is not empty .. and
-- key is not null

or summarized: you trigger an error if your key is set...

maybe your error condition isn' really correct?
>
> TIA for any reply
>
Martin



More information about the Qt-interest-old mailing list