QPermission: unexport, make fully inline

Non-polymorphic classes should not be exported wholesale, because MSVC
exports inline API in such classes, too, which has caused numerous
problems over the years.

Inline the last two remaining out-of-line functions, as they're
trivial.

Pick-to: 6.5
Change-Id: Ibc415b840b93a7350683e02433108270e1bd6bfd
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
Marc Mutz 2023-01-11 09:59:25 +01:00
parent c63f9e81dd
commit afb4e244b0
2 changed files with 6 additions and 12 deletions

View File

@ -247,20 +247,14 @@ Q_LOGGING_CATEGORY(lcPermissions, "qt.permissions", QtWarningMsg);
*/
/*!
\fn Qt::PermissionStatus QPermission::status() const
Returns the status of the permission.
*/
Qt::PermissionStatus QPermission::status() const
{
return m_status;
}
/*!
\fn QMetaType QPermission::type() const
Returns the type of the permission.
*/
QMetaType QPermission::type() const
{
return m_data.metaType();
}
#define QT_DEFINE_PERMISSION_SPECIAL_FUNCTIONS(ClassName) \
ClassName::ClassName() : d(new ClassName##Private) {} \

View File

@ -29,9 +29,9 @@ class QDebug;
struct QMetaObject;
class QCoreApplication;
class Q_CORE_EXPORT QPermission
class QPermission
{
Q_GADGET
Q_GADGET_EXPORT(Q_CORE_EXPORT)
template <typename T, typename Enable = void>
struct is_permission : public std::false_type {};
@ -50,9 +50,9 @@ public:
QPermission(const T &t) : m_data(QVariant::fromValue(t)) {}
#endif
Qt::PermissionStatus status() const;
Qt::PermissionStatus status() const { return m_status; }
QMetaType type() const;
QMetaType type() const { return m_data.metaType(); }
#ifdef Q_QDOC
template <typename Type>