5#ifndef QFACTORYCACHEREGISTRATION_P_H
6#define QFACTORYCACHEREGISTRATION_P_H
19#include <QtCore/qglobal.h>
21#if !defined(QT_BOOTSTRAPPED) && QT_CONFIG(cpp_winrt)
22# define QT_USE_FACTORY_CACHE_REGISTRATION
25#ifdef QT_USE_FACTORY_CACHE_REGISTRATION
27#include "qt_winrtbase_p.h"
33class QWinRTFactoryCacheRegistration
36 Q_CORE_EXPORT
explicit QWinRTFactoryCacheRegistration(QFunctionPointer clearFunction);
37 Q_CORE_EXPORT ~QWinRTFactoryCacheRegistration();
38 Q_CORE_EXPORT
static void clearAllCaches();
40 Q_DISABLE_COPY_MOVE(QWinRTFactoryCacheRegistration)
42 QWinRTFactoryCacheRegistration **m_prevNext =
nullptr;
43 QWinRTFactoryCacheRegistration *m_next =
nullptr;
44 QFunctionPointer m_clearFunction;
47inline QWinRTFactoryCacheRegistration reg([]()
noexcept { winrt::clear_factory_cache(); });