[Development] Are SiCs through #include cleanups considered acceptable?
Thiago Macieira
thiago.macieira at intel.com
Thu Apr 9 20:45:20 CEST 2015
On Thursday 09 April 2015 13:20:41 Matthew Woehlke wrote:
> Slightly off-topic: <QStringList> included <QObject>? Ick, that's one
> change I'm glad to see.
Yes, because it had inline operator>>(QDataStream&, const QStringList &) and
qdatastream.h requires qiodevice.h.
However, that operator was useless, since qdatastream.h has template
operator>>(QDataStream&, const QList<T> &).
Since it was useless and inline, I dropped it.
It wasn't a gratuitous change, though. It was required so I could move some
QStringList methods to QList<QString>. Since qlist.h needs to include
qstringlist.h to ensure the full specialisation of
QListSpecialMethods<QString> is present before QList<QString> is ever
instantiated, I had to make sure qstringlist.h didn't include qdatastream.h --
because qdatastream.h includes qlist.h and boom! cyclic includes.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
More information about the Development
mailing list