File indexing completed on 2024-06-16 07:34:04

0001 /*
0002     SPDX-FileCopyrightText: 2019 Stefan BrĂ¼ns <stefan.bruens@rwth-aachen.de>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #include <KFileMetaData/Properties>
0008 #include <QDataStream>
0009 
0010 /*
0011  * Deserialize prop from QDataStream
0012  */
0013 static inline QDataStream &operator>>(QDataStream &stream, KFileMetaData::Property::Property &prop)
0014 {
0015     quint16 intProp;
0016     stream >> intProp;
0017     prop = static_cast<KFileMetaData::Property::Property>(intProp);
0018     return stream;
0019 }
0020 
0021 /*
0022  * Serialize prop for QDataStream
0023  */
0024 static inline QDataStream &operator<<(QDataStream &stream, const KFileMetaData::Property::Property prop)
0025 {
0026     stream << static_cast<quint16>(prop);
0027     return stream;
0028 }