<p><br>
On Apr 29, 2011 6:26 PM, "David Faure" <<a href="mailto:faure@kde.org">faure@kde.org</a>> wrote:<br>
><br>
> On Friday 29 April 2011, Jeremy Whiting wrote:<br>
> > Since David added QT_USE_FAST_OPERATOR_PLUS to our build rules for kdelibs,<br>
> > it wont build here.<br>
><br>
> Oops?<br>
><br>
> > I've got a commit on the whiting/fixQByteArrays that<br>
> > fixes this, but I'd like someone to review it before I merge to master.<br>
> > Anyone got a moment to test and review it?<br>
><br>
> Reviewboard is a better tool for this, but okay, I'm not in a position to<br>
> complain, as the guy with the hat of shame for breaking the build :)<br>
></p>
<p>It could be because arch recently switched to gcc 4.6. Could also be because I'm trying to use qt 4.8 from git. I'll take a try at your suggestions when I get up in the morning.</p>
<p>Jeremy</p>
<p>> - QString testpath = "file://" + path + "/kdelibs/khtml/test/";<br>
> + QString testpath = QString("file://" + path + "/kdelibs/khtml/test/");<br>
> Can be done simpler as<br>
> QString testpath("file://" + path + "/kdelibs/khtml/test/");<br>
><br>
> Surprisingly (or rather unsurprisingly, since I did test before committing),<br>
> it compiles without this change. gcc-4.4.5 here, kubuntu; which compiler do<br>
> you use?<br>
><br>
> This is a case of an explicit conversion to QString so in theory it should<br>
> just work (unlike all the template cases I fixed in my commit), but maybe it<br>
> breaks on some compilers because the first arg is a char litteral.<br>
><br>
> I guess a more logical change, then, could be<br>
> QString testpath = QString("file://") + path + "...";<br>
><br>
> The other changes are related to QByteArray, which leaves me completely<br>
> stumped. Fast operator plus is for QString only. How can m_tokens[id+uuid]<br>
> break, when id and uuid are bytearrays? Oh, m_tokens takes a QString as key,<br>
> blah.<br>
> Please test and apply the real fix:<br>
> - QMap<QString, QByteArray> m_tokens;<br>
> + QMap<QByteArray, QByteArray> m_tokens;<br>
> AFAICS the key is used as a bytearray everywhere in<br>
> kdelibs/plasnma/private/serviceprovider.cpp<br>
><br>
> For the last change:<br>
> - removeDir(QLatin1String("packageRoot/" + dir.toLatin1() +<br>
> "/contents/code"));<br>
> + removeDir(QLatin1String(QByteArray("packageRoot/" + dir.toLatin1() +<br>
> "/contents/code")));<br>
><br>
> I think it would be simpler to write<br>
> removeDir(QLatin1String("packageRoot/") + dir + "/contents/code"));<br>
> (or QString::fromLatin1 instead of QLatin1String, if necessary)<br>
> (and maybe with a QLatin1String around the last arg, if this code uses "no<br>
> cast from ascii". The compiler will tell you ;) ).<br>
><br>
> --<br>
> David Faure, <a href="mailto:faure@kde.org">faure@kde.org</a>, <a href="http://www.davidfaure.fr">http://www.davidfaure.fr</a><br>
> Sponsored by Nokia to work on KDE, incl. Konqueror (<a href="http://www.konqueror.org">http://www.konqueror.org</a>).<br>
</p>