Work around MSVC ABI stupidity in exporting inline members of base class
In this case, the issue was ICC, when compiling QtQml: qv4sequenceobject.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __cdecl QList<class QItemSelectionRange>::replace(int,class QItemSelectionRange const &)" (__imp_?replace@?$QList@VQItemSelectionRange@@@@QEAAXHAEBVQItemSelectionRange@@@Z) referenced in function "public: static bool __cdecl QV4::QQmlSequence<class QItemSelection>::deleteIndexedProperty(struct QV4::Managed *,unsigned int)" (?deleteIndexedProperty@?$QQmlSequence@VQItemSelection@@@QV4@@SA_NPEAUManaged@2@I@Z) This applies the same fix as qvector.h has had for ages due to QPolygon. Change-Id: I15b62e0f9cec482fbb40fffd1490d791db5056bc Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>bb10
parent
f55db6738b
commit
39e80062d0
|
|
@ -251,6 +251,24 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(QItemSelectionModel::SelectionFlags)
|
|||
// dummy implentation of qHash() necessary for instantiating QList<QItemSelectionRange>::toSet() with MSVC
|
||||
inline uint qHash(const QItemSelectionRange &) { return 0; }
|
||||
|
||||
#ifdef Q_CC_MSVC
|
||||
|
||||
/*
|
||||
### Qt 6:
|
||||
### This needs to be removed for next releases of Qt. It is a workaround for vc++ because
|
||||
### Qt exports QItemSelection that inherits QList<QItemSelectionRange>.
|
||||
*/
|
||||
|
||||
# ifndef Q_TEMPLATE_EXTERN
|
||||
# if defined(QT_BUILD_CORE_LIB)
|
||||
# define Q_TEMPLATE_EXTERN
|
||||
# else
|
||||
# define Q_TEMPLATE_EXTERN extern
|
||||
# endif
|
||||
# endif
|
||||
Q_TEMPLATE_EXTERN template class Q_CORE_EXPORT QList<QItemSelectionRange>;
|
||||
#endif // Q_CC_MSVC
|
||||
|
||||
class Q_CORE_EXPORT QItemSelection : public QList<QItemSelectionRange>
|
||||
{
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -982,11 +982,13 @@ QT_BEGIN_INCLUDE_NAMESPACE
|
|||
#include <QtCore/qpoint.h>
|
||||
QT_END_INCLUDE_NAMESPACE
|
||||
|
||||
#ifndef Q_TEMPLATE_EXTERN
|
||||
#if defined(QT_BUILD_CORE_LIB)
|
||||
#define Q_TEMPLATE_EXTERN
|
||||
#else
|
||||
#define Q_TEMPLATE_EXTERN extern
|
||||
#endif
|
||||
#endif
|
||||
Q_TEMPLATE_EXTERN template class Q_CORE_EXPORT QVector<QPointF>;
|
||||
Q_TEMPLATE_EXTERN template class Q_CORE_EXPORT QVector<QPoint>;
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in New Issue