5#include <QtBluetooth/private/qtbluetoothglobal_p.h>
6#include <QtCore/private/qfunctions_winrt_p.h>
7#include <QtCore/QLoggingCategory>
11#include <winrt/windows.foundation.metadata.h>
12#include <windows.storage.streams.h>
15using namespace Microsoft::WRL::Wrappers;
16using namespace winrt::Windows::Foundation::Metadata;
29 ComPtr<Windows::Storage::Streams::IBufferByteAccess> byteAccess;
31 RETURN_IF_FAILED(
"Could not cast buffer",
return QByteArray())
33 hr = byteAccess->Buffer(
reinterpret_cast<byte **
>(&
data));
34 RETURN_IF_FAILED(
"Could not obtain buffer data",
return QByteArray())
37 RETURN_IF_FAILED(
"Could not obtain buffer size",
return QByteArray())
40 return valueString.
toUtf8();
53 qCWarning(QT_BT_WINDOWS) <<
"Main thread COM init tried from another thread";
58 qCWarning(QT_BT_WINDOWS) <<
"Multiple COM inits by same object";
63 __FUNCTION__,
"QCoreApplication's thread has changed!");
66 if (!SUCCEEDED(CoInitializeEx(NULL, COINIT_APARTMENTTHREADED))) {
67 qCWarning(QT_BT_WINDOWS) <<
"Unexpected COM initialization result";
80 qCWarning(QT_BT_WINDOWS) <<
"COM uninitialization without initialization";
85 qCWarning(QT_BT_WINDOWS) <<
"Main thread COM uninit tried from another thread";
static QCoreApplication * instance() noexcept
Returns a pointer to the application's QCoreApplication (or QGuiApplication/QApplication) instance.
\macro QT_RESTRICTED_CAST_FROM_ASCII
static QString fromUtf16(const char16_t *, qsizetype size=-1)
QByteArray toUtf8() const &
static QThread * currentThread()
void qErrnoWarning(const char *msg,...)
Combined button and popup list for selecting options.
static QThread * mainThread
static QSet< void * > successfulInits
QT_BEGIN_NAMESPACE QByteArray byteArrayFromBuffer(const ComPtr< NativeBuffer > &buffer, bool isWCharString)
void mainThreadCoInit(void *caller)
void mainThreadCoUninit(void *caller)
ABI::Windows::Storage::Streams::IBuffer NativeBuffer
typedef QByteArray(EGLAPIENTRYP PFNQGSGETDISPLAYSPROC)()
#define qCWarning(category,...)
#define Q_DECLARE_LOGGING_CATEGORY(name)
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
#define Q_ASSERT_X(cond, x, msg)