[Digikam-devel] IPTC
Andi Clemens
andi.clemens at gmx.net
Mon Dec 1 10:43:40 GMT 2008
Yes, that' why I removed all calls to fromBase64() and toBase64().
Andi
On Monday 01 December 2008 11:39:26 Gilles Caulier wrote:
> 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
More information about the Digikam-devel
mailing list