Re: simple QString comment
Quote:
calling clear() on is makes it both empty and null.
Should not.
From the docs:
Quote:
void QString::clear ()
Clears the contents of the string and makes it empty.
Quote:
bool QString::isNull () const
Returns true if this string is null; otherwise returns false.
Example:
QString().isNull(); // returns true
QString("").isNull(); // returns false
QString("abc").isNull(); // returns false
Qt makes a distinction between null strings and empty strings for historical reasons. For most applications, what matters is whether or not a string contains any data, and this can be determined using isEmpty().
See also isEmpty().