forked from qt-creator/qt-creator
QmlDesigner: Do not define extra stream operators for QList
This is not required and creates issues with Qt 6. Change-Id: I74e875fe785d5baa4d0688d0ef86a9151750e56c Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -66,8 +66,4 @@ private:
|
||||
mutable QVariant m_value;
|
||||
};
|
||||
|
||||
QMLDESIGNERCORE_EXPORT QDataStream &operator<<(QDataStream &stream, const QList<PropertyContainer> &propertyContainerList);
|
||||
QMLDESIGNERCORE_EXPORT QDataStream &operator>>(QDataStream &stream, QList<PropertyContainer> &propertyContainerList);
|
||||
QMLDESIGNERCORE_EXPORT QDebug operator<<(QDebug debug, QList<PropertyContainer> &propertyContainerList);
|
||||
|
||||
} //namespace QmlDesigner
|
||||
|
||||
@@ -113,37 +113,5 @@ QDebug operator<<(QDebug debug, const PropertyContainer &propertyContainer)
|
||||
return debug.space();
|
||||
}
|
||||
|
||||
QDataStream &operator<<(QDataStream &stream, const QList<PropertyContainer> &propertyContainerList)
|
||||
{
|
||||
stream << propertyContainerList.count();
|
||||
foreach (const PropertyContainer &propertyContainer, propertyContainerList)
|
||||
stream << propertyContainer;
|
||||
|
||||
return stream;
|
||||
}
|
||||
|
||||
QDataStream &operator>>(QDataStream &stream, QList<PropertyContainer> &propertyContainerList)
|
||||
{
|
||||
int count;
|
||||
stream >> count;
|
||||
Q_ASSERT(count >= 0);
|
||||
for ( int i = 0; i < count; i++) {
|
||||
PropertyContainer propertyContainer;
|
||||
stream >> propertyContainer;
|
||||
propertyContainerList.append(propertyContainer);
|
||||
}
|
||||
|
||||
return stream;
|
||||
}
|
||||
|
||||
QDebug operator<<(QDebug debug, QList<PropertyContainer> &propertyContainerList)
|
||||
{
|
||||
foreach (const PropertyContainer &propertyContainer, propertyContainerList)
|
||||
debug << propertyContainer;
|
||||
|
||||
return debug.space();
|
||||
}
|
||||
|
||||
|
||||
} //namespace QmlDesigner
|
||||
|
||||
|
||||
Reference in New Issue
Block a user