mirror of https://github.com/qt/qtbase.git
QFileSystemModelPrivate: de-inline ctor and dtor
This class is dllexport'ed and has members that refer to classes that are only forward-declared in the header (such as QRegularExpression, used in std::vector). GCC and MSVC appear to emit the destructor at the point where it is used, which I guess is the vtable, which probably means where the constructor was inlined because I don't see any virtual overrides. Clang (at least in the form of ICX) appears to emit it at the class declaration point. C:\Qt\qt-everywhere-src-6.3.0\qtbase\src\gui\itemmodels/qfilesystemmodel_p.h(94,20): note: in instantiation of member function 'std::vector<QRegularExpression>::~vector' requested here class Q_GUI_EXPORT QFileSystemModelPrivate : public QAbstractItemModelPrivate ^ C:\Qt\qt-everywhere-src-6.3.0\qtbase\src\gui\itemmodels/qfilesystemmodel_p.h(94,20): note: in implicit destructor for 'QFileSystemModelPrivate' first required here C:\Qt\qt-everywhere-src-6.3.0\qtbase\src\gui\itemmodels/qfilesystemmodel_p.h(94,7): note: due to 'QFileSystemModelPrivate' being dllexported Fix by defining both the default ctor and the dtor out-of-line. Task-number: QTBUG-45582 Fixes: QTBUG-103605 Pick-to: 5.15 6.2 6.3 Change-Id: I77c8221eb2824c369feffffd16f08ee39004a825 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
613b52bfee
commit
845491ed3b
|
@ -2036,6 +2036,10 @@ QStringList QFileSystemModelPrivate::unwatchPathsAt(const QModelIndex &index)
|
|||
}
|
||||
#endif // filesystemwatcher && Q_OS_WIN
|
||||
|
||||
QFileSystemModelPrivate::QFileSystemModelPrivate() = default;
|
||||
|
||||
QFileSystemModelPrivate::~QFileSystemModelPrivate() = default;
|
||||
|
||||
/*!
|
||||
\internal
|
||||
*/
|
||||
|
|
|
@ -179,7 +179,8 @@ public:
|
|||
bool isVisible = false;
|
||||
};
|
||||
|
||||
QFileSystemModelPrivate() = default;
|
||||
QFileSystemModelPrivate();
|
||||
~QFileSystemModelPrivate();
|
||||
void init();
|
||||
/*
|
||||
\internal
|
||||
|
|
Loading…
Reference in New Issue