Qt
6.x
The Qt SDK
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
21
using
Microsoft::WRL::ComPtr
;
22
23
template
<
typename
T,
typename
... Args>
24
ComPtr<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
Microsoft::WRL::ComPtr
Definition
qbluetoothsocket_winrt_p.h:34
makeComObject
ComPtr< T > makeComObject(Args &&...args)
Definition
qcomptr_p.h:24
p
GLfloat GLfloat p
[1]
Definition
qopenglext.h:12698
qt_windows.h
args
QJSValueList args
Definition
src_script_qjsengine.cpp:12
qtmultimedia
src
multimedia
windows
qcomptr_p.h
Generated by
1.9.7