summaryrefslogtreecommitdiffstats
path: root/src/gui/itemmodels
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2022-05-19 09:36:11 -0700
committerMarc Mutz <marc.mutz@qt.io>2022-05-25 22:42:26 +0000
commit845491ed3b38eb756cd73cf4161f440559c9a6a6 (patch)
tree9f2576129786c7c514ddadf05bac410ba2266fda /src/gui/itemmodels
parent613b52bfee1876b43829072abb9dfb4423e8357f (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 Pick-to: 5.15 6.2 6.3 Change-Id: I77c8221eb2824c369feffffd16f08ee39004a825 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/gui/itemmodels')
-rw-r--r--src/gui/itemmodels/qfilesystemmodel.cpp4
-rw-r--r--src/gui/itemmodels/qfilesystemmodel_p.h3
2 files changed, 6 insertions, 1 deletions
diff --git a/src/gui/itemmodels/qfilesystemmodel.cpp b/src/gui/itemmodels/qfilesystemmodel.cpp
index ac6d1dca8d..f0dcb6d801 100644
--- a/src/gui/itemmodels/qfilesystemmodel.cpp
+++ b/src/gui/itemmodels/qfilesystemmodel.cpp
@@ -2036,6 +2036,10 @@ QStringList QFileSystemModelPrivate::unwatchPathsAt(const QModelIndex &index)
}
#endif // filesystemwatcher && Q_OS_WIN
+QFileSystemModelPrivate::QFileSystemModelPrivate() = default;
+
+QFileSystemModelPrivate::~QFileSystemModelPrivate() = default;
+
/*!
\internal
*/
diff --git a/src/gui/itemmodels/qfilesystemmodel_p.h b/src/gui/itemmodels/qfilesystemmodel_p.h
index 4be1d49cbf..3cb08d1308 100644
--- a/src/gui/itemmodels/qfilesystemmodel_p.h
+++ b/src/gui/itemmodels/qfilesystemmodel_p.h
@@ -179,7 +179,8 @@ public:
bool isVisible = false;
};
- QFileSystemModelPrivate() = default;
+ QFileSystemModelPrivate();
+ ~QFileSystemModelPrivate();
void init();
/*
\internal