[Kde-imaging] flickr / picasaweb?

Vardhman Jain vardhman at gmail.com
Sun Aug 17 22:00:06 CEST 2008


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#

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)

regards
Vardhman

On Wed, Aug 6, 2008 at 8:15 PM, Vardhman Jain <vardhman at gmail.com> wrote:

> On Wed, Aug 6, 2008 at 7:57 PM, Gilles Caulier <caulier.gilles at gmail.com>wrote:
>
>> Jain,
>>
>> Please, take a look into flickr tool for KDE4. the tool can log into
>> account but cannot upload photo. i don't know why ? Perhaps it's my
>> KDE4 port, but i can't find where exactly...
>>
> Hey Caulier,
>       I will check that up as soon as possible, mostly by next weekend.
>
> Vardhman
>
>>
>> Thanks in advance
>>
>> Gilles Caulier
>>
>> 2008/8/6 Vardhman Jain <vardhman at gmail.com>:
>> >>
>> >>
>> >> YES! i've found my mail :D
>> >>
>> http://article.gmane.org/gmane.comp.kde.devel.imaging/5350/match=picasaweb
>> >>
>> >> And if i understood correctly it crash here:
>> >> if(!m_interface->hasFeature(KIPI::HostSupportsTags))
>> >>        m_exportApplicationTags->setEnabled(false); // <======Here
>> >>
>> >> I can see it seems a host application issue, but should the flag
>> disable
>> >> by default
>> >> and enabled by applications that have the asked host support?
>> >
>> > This is strange and if these two lines caused the segfault its
>> definitely a
>> > bug. I will look at the code to see why such a safe condition could lead
>> to
>> > a segfault.
>> >
>> >
>> > Vardhman
>> >>
>> >> _______________________________________________
>> >> Kde-imaging mailing list
>> >> Kde-imaging at kde.org
>> >> https://mail.kde.org/mailman/listinfo/kde-imaging
>> >>
>> >
>> >
>> >
>> > --
>> > Blogs: http://vardhman.blogspot.com
>> >
>> >
>> > _______________________________________________
>> > Kde-imaging mailing list
>> > Kde-imaging at kde.org
>> > https://mail.kde.org/mailman/listinfo/kde-imaging
>> >
>> >
>> _______________________________________________
>> Kde-imaging mailing list
>> Kde-imaging at kde.org
>> https://mail.kde.org/mailman/listinfo/kde-imaging
>>
>
>
>
> --
> Blogs: http://vardhman.blogspot.com
>
>


-- 
Blogs: http://vardhman.blogspot.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kde-imaging/attachments/20080818/403f3b69/attachment.htm 


More information about the Kde-imaging mailing list