QList
QList copied to clipboard
Where possible, QList member functions should be marked with const
Where possible, QList member functions that do not modify the QList should be marked with const. For example size(), length(). At present, the following simple function prototype will produce a compilation error:
void update(const QList<MyStruct>& myList)
{
...
}
The workaround (removing the const qualifier) is unsafe because the update() function can now modify the list.