[Digikam-devel] IPTC

Gilles Caulier caulier.gilles at gmail.com
Mon Dec 1 11:44:55 CET 2008


2008/12/1 Gilles Caulier <caulier.gilles at gmail.com>

> Note : look code from Qt4.4.3::QSplitter class :
>
> QByteArray QSplitter::saveState() const
> {
>     int version = 0;
>     QByteArray data;
>     QDataStream stream(&data, QIODevice::WriteOnly);
>
>     stream << qint32(SplitterMagic);
>     stream << qint32(version);
>     stream << sizes();
>     stream << childrenCollapsible();
>     stream << qint32(handleWidth());
>     stream << opaqueResize();
>     stream << qint32(orientation());
>     return data;
> }
>
> bool QSplitter::restoreState(const QByteArray &state)
> {
>     Q_D(QSplitter);
>     int version = 0;
>     QByteArray sd = state;
>     QDataStream stream(&sd, QIODevice::ReadOnly);
>     QList<int> list;
>     bool b;
>     qint32 i;
>     qint32 marker;
>     qint32 v;
>
>     stream >> marker;
>     stream >> v;
>     if (marker != SplitterMagic || v != version)
>         return false;
>
>     stream >> list;
>     setSizes(list);
>
>     stream >> b;
>     setChildrenCollapsible(b);
>
>     stream >> i;
>     setHandleWidth(i);
>
>     stream >> b;
>     setOpaqueResize(b);
>
>     stream >> i;
>     setOrientation(Qt::Orientation(i));
>     d->doResize();
>
>     return true;
> }
>
> ==> base64 stuff is never used here.
>
> Gilles
>

To resume : i think to use QByteArray::toBase64() is wrong here...

But we use it too in :

- sidebar.cpp
- lighttablewindow.cpp.
- editorwindow.cpp

I think these entries need to be fixed too in the same way.

Best

Gilles
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/digikam-devel/attachments/20081201/b65c5722/attachment.htm 


More information about the Digikam-devel mailing list