[Development] Are SiCs through #include cleanups considered acceptable?

André Somers andre at familiesomers.nl
Fri Apr 10 15:03:04 CEST 2015


Olivier Goffart schreef op 10-4-2015 om 14:58:
> If you have a template<typename T> QList<T> returnAListOfThings(); You 
> can do returnAListOfThings<QString>().join("*"); For example, now, 
> QStringList::fromVector(QVector<QString>()) returns a QList<QString> 
> which is not a QStringList (So you can't directly call special method. 
> And when you assign it to a QStringList, it cannot be moved) 
Thank you; that is a good example. You basicaly make the special methods 
available for every instantiation of the base template with the type, 
instead of only for those explicitly instantiated as with the special 
class. Ok, fair enough, that sounds like something useful to have.

I do think it needs a bit of work on the documentation side of things to 
make it clear that really any QList<QByteArray> now behaves as/is a 
QByteArrayList. The documentation still says it is a class.

André




More information about the Development mailing list