diff options
Diffstat (limited to 'src/corelib/plugin/qlibrary_p.h')
-rw-r--r-- | src/corelib/plugin/qlibrary_p.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/corelib/plugin/qlibrary_p.h b/src/corelib/plugin/qlibrary_p.h index e3bbbe104b..87d36ee5c8 100644 --- a/src/corelib/plugin/qlibrary_p.h +++ b/src/corelib/plugin/qlibrary_p.h @@ -28,6 +28,8 @@ # include "QtCore/qt_windows.h" #endif +#include <memory> + QT_REQUIRE_CONFIG(library); QT_BEGIN_NAMESPACE @@ -54,6 +56,12 @@ public: #endif enum UnloadFlag { UnloadSys, NoUnloadSys }; + struct Deleter { + // QLibraryPrivate::release() is not, yet, and cannot easily be made, noexcept: + void operator()(QLibraryPrivate *p) const { p->release(); } + }; + using UniquePtr = std::unique_ptr<QLibraryPrivate, Deleter>; + const QString fileName; const QString fullVersion; |