5#ifndef QSCOPEDPOINTER_H
6#define QSCOPEDPOINTER_H
8#include <QtCore/qglobal.h>
15struct QScopedPointerDeleter
17 static inline void cleanup(T *pointer)
noexcept
22 typedef char IsIncompleteType[
sizeof(T) ? 1 : -1 ];
23 (
void)
sizeof(IsIncompleteType);
27 void operator()(T *pointer)
const noexcept
36 static inline void cleanup(T *pointer)
noexcept
41 typedef char IsIncompleteType[
sizeof(T) ? 1 : -1 ];
42 (
void)
sizeof(IsIncompleteType);
54 static inline void cleanup(
void *pointer)
noexcept { free(pointer); }
62 static inline void cleanup(T *pointer) {
if (pointer) pointer->deleteLater(); }
70template <
typename T,
typename Cleanup = QScopedPointerDeleter<T> >
84 Cleanup::cleanup(oldD);
127 T *oldD = std::exchange(d, other);
128 Cleanup::cleanup(oldD);
131#if QT_DEPRECATED_SINCE(6
, 1
)
140#if QT_DEPRECATED_SINCE(6
, 2
)
180#if QT_DEPRECATED_SINCE(6
, 2
)
193template <
typename T,
typename Cleanup = QScopedPointerArrayDeleter<T> >
196 template <
typename Ptr>
220#if QT_DEPRECATED_SINCE(6
, 2
)
227 explicit inline QScopedArrayPointer(
void *)
242#if QT_DEPRECATED_SINCE(6
, 2
)
243template <
typename T,
typename Cleanup>
244QT_DEPRECATED_VERSION_X_6_2(
"Use std::unique_ptr instead of QScopedArrayPointer.")
245inline void swap(QScopedArrayPointer<T, Cleanup> &lhs, QScopedArrayPointer<T, Cleanup> &rhs)
noexcept
QPlatformFontDatabase * fontDatabase() const override
Accessor for the platform integration's fontdatabase.
QAbstractEventDispatcher * createEventDispatcher() const override
Factory function for the GUI event dispatcher.
QPlatformBackingStore * createPlatformBackingStore(QWindow *window) const override
Factory function for QPlatformBackingStore.
QMinimalIntegration(const QStringList ¶meters)
QPlatformNativeInterface * nativeInterface() const override
static QMinimalIntegration * instance()
bool hasCapability(QPlatformIntegration::Capability cap) const override
QPlatformWindow * createPlatformWindow(QWindow *window) const override
Factory function for QPlatformWindow.
QRect geometry() const override
Reimplement in subclass to return the pixel geometry of the screen.
int depth() const override
Reimplement in subclass to return current depth of the screen.
QImage::Format format() const override
Reimplement in subclass to return the image format which corresponds to the screen format.
~QScopedArrayPointer()=default
const T & operator[](qsizetype i) const
T & operator[](qsizetype i)
friend bool operator==(std::nullptr_t, const QScopedPointer< T, Cleanup > &rhs) noexcept
bool operator!() const noexcept
friend bool operator==(const QScopedPointer< T, Cleanup > &lhs, std::nullptr_t) noexcept
std::add_lvalue_reference_t< T > operator*() const
T * operator->() const noexcept
bool isNull() const noexcept
void reset(T *other=nullptr) noexcept(noexcept(Cleanup::cleanup(std::declval< T * >())))
friend bool operator!=(std::nullptr_t, const QScopedPointer< T, Cleanup > &rhs) noexcept
friend bool operator!=(const QScopedPointer< T, Cleanup > &lhs, std::nullptr_t) noexcept
T * data() const noexcept
friend bool operator!=(const QScopedPointer< T, Cleanup > &lhs, const QScopedPointer< T, Cleanup > &rhs) noexcept
friend bool operator==(const QScopedPointer< T, Cleanup > &lhs, const QScopedPointer< T, Cleanup > &rhs) noexcept
Combined button and popup list for selecting options.
QScopedPointerObjectDeleteLater< QObject > QScopedPointerDeleteLater
static void cleanup(T *pointer) noexcept
void operator()(T *pointer) const noexcept
void operator()(T *pointer) const
static void cleanup(T *pointer)
void operator()(void *pointer) const noexcept
static void cleanup(void *pointer) noexcept