diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2022-05-19 09:36:11 -0700 |
---|---|---|
committer | Marc Mutz <marc.mutz@qt.io> | 2022-05-27 14:53:03 +0200 |
commit | f7dbca4822c9c5cecdd02cf2c3b28ede5458c680 (patch) | |
tree | 61200b34b5626f38b16f81f837f4374719d7a140 /src/widgets/dialogs | |
parent | 861dcdd2456482cbc4817a0da21d8fa1c6a367ec (diff) |
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
Change-Id: I77c8221eb2824c369feffffd16f08ee39004a825
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 845491ed3b38eb756cd73cf4161f440559c9a6a6)
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/widgets/dialogs')
-rw-r--r-- | src/widgets/dialogs/qfilesystemmodel.cpp | 4 | ||||
-rw-r--r-- | src/widgets/dialogs/qfilesystemmodel_p.h | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/widgets/dialogs/qfilesystemmodel.cpp b/src/widgets/dialogs/qfilesystemmodel.cpp index aac8ac79cd..5f21706e22 100644 --- a/src/widgets/dialogs/qfilesystemmodel.cpp +++ b/src/widgets/dialogs/qfilesystemmodel.cpp @@ -2063,6 +2063,10 @@ QStringList QFileSystemModelPrivate::unwatchPathsAt(const QModelIndex &index) } #endif // filesystemwatcher && Q_OS_WIN +QFileSystemModelPrivate::QFileSystemModelPrivate() = default; + +QFileSystemModelPrivate::~QFileSystemModelPrivate() = default; + /*! \internal */ diff --git a/src/widgets/dialogs/qfilesystemmodel_p.h b/src/widgets/dialogs/qfilesystemmodel_p.h index 73ecd79400..1fca3746bb 100644 --- a/src/widgets/dialogs/qfilesystemmodel_p.h +++ b/src/widgets/dialogs/qfilesystemmodel_p.h @@ -213,7 +213,8 @@ public: bool isVisible = false; }; - QFileSystemModelPrivate() = default; + QFileSystemModelPrivate(); + ~QFileSystemModelPrivate(); void init(); /* \internal |