Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qcomptr_p.h
Go to the documentation of this file.
1// Copyright (C) 2021 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QCOMPTR_P_H
5#define QCOMPTR_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <qt_windows.h>
19#include <wrl/client.h>
20
22
23template<typename T, typename... Args>
24ComPtr<T> makeComObject(Args &&...args)
25{
26 ComPtr<T> p;
27 // Don't use Attach because of MINGW64 bug
28 // #892 Microsoft::WRL::ComPtr::Attach leaks references
29 *p.GetAddressOf() = new T(std::forward<Args>(args)...);
30 return p;
31}
32
33#endif
ComPtr< T > makeComObject(Args &&...args)
Definition qcomptr_p.h:24
GLfloat GLfloat p
[1]
QJSValueList args