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
qwindowsmimeconverter.cpp
Go to the documentation of this file.
1// Copyright (C) 2022 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
5
6#include <QtCore/qt_windows.h>
7
8#include <QtGui/private/qguiapplication_p.h>
9#include <QtGui/qpa/qplatformintegration.h>
10
12
135{
137 auto nativeWindowsApp = dynamic_cast<QWindowsApplication *>(QGuiApplicationPrivate::platformIntegration());
138 Q_ASSERT(nativeWindowsApp);
139 nativeWindowsApp->registerMime(this);
140}
141
148{
150 auto nativeWindowsApp = dynamic_cast<QWindowsApplication *>(QGuiApplicationPrivate::platformIntegration());
151 Q_ASSERT(nativeWindowsApp);
152 nativeWindowsApp->unregisterMime(this);
153}
154
163{
165 auto nativeWindowsApp = dynamic_cast<QWindowsApplication *>(QGuiApplicationPrivate::platformIntegration());
166 Q_ASSERT(nativeWindowsApp);
167 return nativeWindowsApp->registerMimeType(mimeType);
168}
169
static QPlatformIntegration * platformIntegration()
Native interface to QGuiApplication, to be retrieved from QPlatformIntegration. \inmodule QtGui.
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
QWindowsMimeConverter()
Constructs a QWindowsMimeConverter instance.
static int registerMimeType(const QString &mimeType)
Registers the MIME type mimeType, and returns an ID number identifying the format on Windows.
virtual ~QWindowsMimeConverter()
Constructs a QWindowsMimeConverter instance.
Combined button and popup list for selecting options.
const char * mimeType
#define Q_ASSERT(cond)
Definition qrandom.cpp:47