[Kde-imaging] flickr / picasaweb?

Gilles Caulier caulier.gilles at gmail.com
Mon Aug 18 08:20:53 CEST 2008


2008/8/17 Vardhman Jain <vardhman at gmail.com>:
> Hey,
>      I was trying to figure out the problem behind flickr' upload failing on
> KDE4 port for quite a lot of time. I could figure out the root cause but the
> solution probably needs some suggestions from someone with more QT
> knowledge.
>
> The problem is in the POST request that is being sent to the flickr server
> for photo upload. With some ethereal log analysis I cud see that the server
> is responding saying the package size is too large. This is happening
> because of the HTTP post request data not being properly packed up.
>
> The code for packing uses QTextStream which probably changed its behaviour
> from QT3 to 4 or such is my first guess. I tried running this test code to
> undestand if QTextStream should be used to append some data in to a
> QByteArray (Not sure why we need to do this instead of resizing and updating
> the QByteArray, but that aside)
>
> QByteArray qba("test");
> QTextStream qts(qba, QIODevice::Append);
> qts << "ABCD";
> kdDebug() << qba <<"#"<< qts.string() << endl;
> qts << endl;
> kdDebug << qba << "#" << qts.string() << endl;
>
> I get
> test#
> test#

Well, where is "ABCD" string in first debug line ? It's abnormal...


>
> Is this expected behaviour or am I doing something wrong. Also is TextStream
> supposed to resize bytearray automatically in this case ? (The code related
> to these lines is in graphics/kipi-plugins/flickrexport/mpform.cpp)

Yes, i think the bug is here (mpform.cpp). It's duing port to KDE4/Qt4.

Gilles


More information about the Kde-imaging mailing list