Q*ValueRef: suppress MSVC warning on deriving from non-exported base

Warning C4275 non dll-interface class 'QJsonValueConstRef' used as base for dll-interface class 'QJsonValueRef' UniRemoteAdapter C:\qt\Qt6.5.1\6.5.1\msvc2019_64\include\QtCore\qjsonvalue.h 219

Pick-to: 6.5 6.6
Fixes: QTBUG-114629
Change-Id: I443cf0c8a76243eead33fffd176930f96c43eb47
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit is contained in:
Thiago Macieira 2023-06-16 09:36:23 -07:00
parent 7779400ba6
commit 674aa084c2
2 changed files with 6 additions and 0 deletions

View File

@ -428,6 +428,8 @@ protected:
qsizetype i;
};
QT_WARNING_PUSH
QT6_ONLY(QT_WARNING_DISABLE_MSVC(4275)) // non dll-interface class 'QJsonValueConstRef' used as base for dll-interface class 'QJsonValueRef'
class QT6_ONLY(Q_CORE_EXPORT) QCborValueRef : public QCborValueConstRef
{
public:
@ -582,6 +584,7 @@ private:
QT7_ONLY(Q_CORE_EXPORT) static void assign(QCborValueRef that, QCborValue &&other);
QT7_ONLY(Q_CORE_EXPORT) static void assign(QCborValueRef that, const QCborValueRef other);
};
QT_WARNING_POP
Q_DECLARE_OPERATORS_FOR_FLAGS(QCborValue::EncodingOptions)
Q_DECLARE_OPERATORS_FOR_FLAGS(QCborValue::DiagnosticNotationOptions)

View File

@ -215,6 +215,8 @@ protected:
friend class QJsonPrivate::Value;
};
QT_WARNING_PUSH
QT6_ONLY(QT_WARNING_DISABLE_MSVC(4275)) // non dll-interface class 'QJsonValueConstRef' used as base for dll-interface class 'QJsonValueRef'
class QT6_ONLY(Q_CORE_EXPORT) QJsonValueRef : public QJsonValueConstRef
{
public:
@ -273,6 +275,7 @@ private:
friend class QJsonArray;
friend class QJsonObject;
};
QT_WARNING_POP
inline QJsonValue QCborValueConstRef::toJsonValue() const
{