[Interest] QString operator==

Bo Thorsen bo at fioniasoftware.dk
Tue Aug 21 13:14:30 CEST 2012


Den 21-08-2012 13:09, Thomas Meyer skrev:
> Hi,
> I can't find the definition for
> ...
> booloperator==(constQString&s)const;
> ...
> in QString (.h, line 403, Qt v4.8.2 (MS Windows 7)).
>
> I only found it for QLatinString and QByteArray:
> (Where is the declaration for QByteArray?)
> ...
> inlineboolQByteArray::operator==(constQString&s)const
> {returnqStringComparisonHelper(s,constData());}
> ...
>
> Please can somebody help me?

It's in qstring.cpp:

bool QString::operator==(const QString &other) const
{
     if (d->size != other.d->size)
         return false;

     return qMemEquals(d->data, other.d->data, d->size);
}

Bo Thorsen,
Fionia Software.

-- 

Expert Qt and C++ developer for hire
Contact me if you need expert Qt help
http://www.fioniasoftware.dk



More information about the Interest mailing list