Skip to content

Commit

Permalink
Sweep Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6 -> Q_DECLARE_SHARED
Browse files Browse the repository at this point in the history
This is Qt 6, so Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6 is the same as
Q_DECLARE_SHARED.

Let's hope we'll collectively get better at detecting missing
Q_DECLARE_SHARED so we won't need a
Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT7 in the future.

Change-Id: I3da9faff4c66b64a3b257309012a2a10a6c6d027
Reviewed-by: Lars Knoll <[email protected]>
  • Loading branch information
marc-kdab committed May 19, 2020
1 parent 857722e commit 7c070ac
Show file tree
Hide file tree
Showing 21 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion src/corelib/itemmodels/qitemselectionmodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ class Q_CORE_EXPORT QItemSelection : public QList<QItemSelectionRange>
const QItemSelectionRange &other,
QItemSelection *result);
};
Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6(QItemSelection)
Q_DECLARE_SHARED(QItemSelection)

#ifndef QT_NO_DEBUG_STREAM
Q_CORE_EXPORT QDebug operator<<(QDebug, const QItemSelectionRange &);
Expand Down
2 changes: 1 addition & 1 deletion src/corelib/serialization/qjsonarray.h
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ class Q_CORE_EXPORT QJsonArray
QExplicitlySharedDataPointer<QCborContainerPrivate> a;
};

Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6(QJsonArray)
Q_DECLARE_SHARED(QJsonArray)

Q_CORE_EXPORT size_t qHash(const QJsonArray &array, size_t seed = 0);

Expand Down
2 changes: 1 addition & 1 deletion src/corelib/serialization/qjsondocument.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ class Q_CORE_EXPORT QJsonDocument
std::unique_ptr<QJsonDocumentPrivate> d;
};

Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6(QJsonDocument)
Q_DECLARE_SHARED(QJsonDocument)

#if !defined(QT_NO_DEBUG_STREAM) && !defined(QT_JSON_READONLY)
Q_CORE_EXPORT QDebug operator<<(QDebug, const QJsonDocument &);
Expand Down
2 changes: 1 addition & 1 deletion src/corelib/serialization/qjsonobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ class Q_CORE_EXPORT QJsonObject
QExplicitlySharedDataPointer<QCborContainerPrivate> o;
};

Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6(QJsonObject)
Q_DECLARE_SHARED(QJsonObject)

Q_CORE_EXPORT size_t qHash(const QJsonObject &object, size_t seed = 0);

Expand Down
2 changes: 1 addition & 1 deletion src/corelib/serialization/qjsonvalue.h
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ class QJsonValueRefPtr
QJsonValueRef* operator->() { return &valueRef; }
};

Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6(QJsonValue)
Q_DECLARE_SHARED(QJsonValue)

Q_CORE_EXPORT size_t qHash(const QJsonValue &value, size_t seed = 0);

Expand Down
2 changes: 1 addition & 1 deletion src/corelib/serialization/qxmlstream.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class Q_CORE_EXPORT QXmlStreamStringRef {
inline int position() const { return m_position; }
inline int size() const { return m_size; }
};
Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6(QXmlStreamStringRef)
Q_DECLARE_SHARED(QXmlStreamStringRef)


class QXmlStreamReaderPrivate;
Expand Down
2 changes: 1 addition & 1 deletion src/dbus/qdbusargument.h
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ class Q_DBUS_EXPORT QDBusArgument
friend class QDBusArgumentPrivate;
mutable QDBusArgumentPrivate *d;
};
Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6(QDBusArgument)
Q_DECLARE_SHARED(QDBusArgument)

QT_END_NAMESPACE
Q_DECLARE_METATYPE(QDBusArgument)
Expand Down
2 changes: 1 addition & 1 deletion src/dbus/qdbusconnection.h
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ class Q_DBUS_EXPORT QDBusConnection
friend class QDBusConnectionPrivate;
QDBusConnectionPrivate *d;
};
Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6(QDBusConnection)
Q_DECLARE_SHARED(QDBusConnection)

Q_DECLARE_OPERATORS_FOR_FLAGS(QDBusConnection::RegisterOptions)
Q_DECLARE_OPERATORS_FOR_FLAGS(QDBusConnection::VirtualObjectRegisterOptions)
Expand Down
2 changes: 1 addition & 1 deletion src/dbus/qdbuserror.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ class Q_DBUS_EXPORT QDBusError
// so the following field cannot be used:
void *unused;
};
Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6(QDBusError)
Q_DECLARE_SHARED(QDBusError)

#ifndef QT_NO_DEBUG_STREAM
Q_DBUS_EXPORT QDebug operator<<(QDebug, const QDBusError &);
Expand Down
6 changes: 3 additions & 3 deletions src/dbus/qdbusextratypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class Q_DBUS_EXPORT QDBusObjectPath
private:
void doCheck();
};
Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6(QDBusObjectPath)
Q_DECLARE_SHARED(QDBusObjectPath)

inline QDBusObjectPath::QDBusObjectPath(const char *objectPath)
: m_path(QString::fromLatin1(objectPath))
Expand Down Expand Up @@ -132,7 +132,7 @@ class Q_DBUS_EXPORT QDBusSignature
private:
void doCheck();
};
Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6(QDBusSignature)
Q_DECLARE_SHARED(QDBusSignature)

inline QDBusSignature::QDBusSignature(const char *dBusSignature)
: m_signature(QString::fromLatin1(dBusSignature))
Expand Down Expand Up @@ -179,7 +179,7 @@ class QDBusVariant
inline QVariant variant() const
{ return m_variant; }
};
Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6(QDBusVariant)
Q_DECLARE_SHARED(QDBusVariant)

inline QDBusVariant::QDBusVariant(const QVariant &dBusVariant)
: m_variant(dBusVariant) { }
Expand Down
2 changes: 1 addition & 1 deletion src/dbus/qdbusmessage.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ class Q_DBUS_EXPORT QDBusMessage
friend class QDBusMessagePrivate;
QDBusMessagePrivate *d_ptr;
};
Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6(QDBusMessage)
Q_DECLARE_SHARED(QDBusMessage)

#ifndef QT_NO_DEBUG_STREAM
Q_DBUS_EXPORT QDebug operator<<(QDebug, const QDBusMessage &);
Expand Down
2 changes: 1 addition & 1 deletion src/gui/image/qpixmapcache.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class Q_GUI_EXPORT QPixmapCache
static int totalUsed();
#endif
};
Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6(QPixmapCache::Key)
Q_DECLARE_SHARED(QPixmapCache::Key)

QT_END_NAMESPACE

Expand Down
2 changes: 1 addition & 1 deletion src/gui/kernel/qcursor.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ class Q_GUI_EXPORT QCursor
friend Q_GUI_EXPORT bool operator==(const QCursor &lhs, const QCursor &rhs) noexcept;
QCursorData *d;
};
Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6(QCursor)
Q_DECLARE_SHARED(QCursor)

Q_GUI_EXPORT bool operator==(const QCursor &lhs, const QCursor &rhs) noexcept;
inline bool operator!=(const QCursor &lhs, const QCursor &rhs) noexcept { return !(lhs == rhs); }
Expand Down
2 changes: 1 addition & 1 deletion src/gui/painting/qpainterpath.h
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ class Q_GUI_EXPORT QPainterPath
#endif
};

Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6(QPainterPath)
Q_DECLARE_SHARED(QPainterPath)
Q_DECLARE_TYPEINFO(QPainterPath::Element, Q_PRIMITIVE_TYPE);

#ifndef QT_NO_DATASTREAM
Expand Down
4 changes: 2 additions & 2 deletions src/gui/painting/qpolygon.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class Q_GUI_EXPORT QPolygon : public QVector<QPoint>

bool intersects(const QPolygon &r) const;
};
Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6(QPolygon)
Q_DECLARE_SHARED(QPolygon)

inline QPolygon::QPolygon(int asize) : QVector<QPoint>(asize) {}

Expand Down Expand Up @@ -170,7 +170,7 @@ class Q_GUI_EXPORT QPolygonF : public QVector<QPointF>

bool intersects(const QPolygonF &r) const;
};
Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6(QPolygonF)
Q_DECLARE_SHARED(QPolygonF)

inline QPolygonF::QPolygonF(int asize) : QVector<QPointF>(asize) {}

Expand Down
2 changes: 1 addition & 1 deletion src/gui/painting/qregion.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ Q_GUI_EXPORT
static const struct QRegionData shared_empty;
static void cleanUp(QRegionData *x);
};
Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6(QRegion)
Q_DECLARE_SHARED(QRegion)

/*****************************************************************************
QRegion stream functions
Expand Down
2 changes: 1 addition & 1 deletion src/network/kernel/qhostaddress.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ class Q_NETWORK_EXPORT QHostAddress
QExplicitlySharedDataPointer<QHostAddressPrivate> d;
};
Q_DECLARE_OPERATORS_FOR_FLAGS(QHostAddress::ConversionMode)
Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6(QHostAddress)
Q_DECLARE_SHARED(QHostAddress)

inline bool operator ==(QHostAddress::SpecialAddress address1, const QHostAddress &address2)
{ return address2 == address1; }
Expand Down
2 changes: 1 addition & 1 deletion src/network/kernel/qhostinfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ class Q_NETWORK_EXPORT QHostInfo
QtPrivate::QSlotObjectBase *slotObj);
};

Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6(QHostInfo)
Q_DECLARE_SHARED(QHostInfo)

QT_END_NAMESPACE

Expand Down
2 changes: 1 addition & 1 deletion src/sql/kernel/qsqlerror.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class Q_SQL_EXPORT QSqlError
};
};

Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6(QSqlError)
Q_DECLARE_SHARED(QSqlError)

#ifndef QT_NO_DEBUG_STREAM
Q_SQL_EXPORT QDebug operator<<(QDebug, const QSqlError &);
Expand Down
2 changes: 1 addition & 1 deletion src/sql/models/qsqlrelationaltablemodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class Q_SQL_EXPORT QSqlRelation
private:
QString tName, iColumn, dColumn;
};
Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6(QSqlRelation)
Q_DECLARE_SHARED(QSqlRelation)

class QSqlRelationalTableModelPrivate;

Expand Down
2 changes: 1 addition & 1 deletion src/xml/sax/qxml.h
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ class Q_XML_EXPORT QXmlAttributes
};

Q_DECLARE_TYPEINFO(QXmlAttributes::Attribute, Q_MOVABLE_TYPE);
Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6(QXmlAttributes)
Q_DECLARE_SHARED(QXmlAttributes)

//
// SAX Input Source
Expand Down

0 comments on commit 7c070ac

Please sign in to comment.