Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qplatformsurface.cpp
Go to the documentation of this file.
1// Copyright (C) 2016 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// Qt-Security score:significant reason:default
4
6#ifndef QT_NO_DEBUG_STREAM
7#include <QtCore/qdebug.h>
8#include <QtGui/qwindow.h>
9#endif
10
12
13/*!
14 \class QPlatformSurface
15 \since 5.0
16 \internal
17 \preliminary
18 \ingroup qpa
19
20 \brief The QPlatformSurface class provides an abstraction for a surface.
21 */
22QPlatformSurface::~QPlatformSurface()
23{
24
25}
26
27QSurface *QPlatformSurface::surface() const
28{
29 return m_surface;
30}
31
32QPlatformSurface::QPlatformSurface(QSurface *surface) : m_surface(surface)
33{
34}
35
36#ifndef QT_NO_DEBUG_STREAM
37Q_GUI_EXPORT QDebug operator<<(QDebug debug, const QPlatformSurface *surface)
38{
39 QDebugStateSaver saver(debug);
40 debug.nospace();
41 debug << "QPlatformSurface(" << (const void *)surface;
42 if (surface) {
43 QSurface *s = surface->surface();
44 auto surfaceClass = s->surfaceClass();
45 debug << ", class=" << surfaceClass;
46 debug << ", type=" << s->surfaceType();
47 if (surfaceClass == QSurface::Window)
48 debug << ", window=" << static_cast<QWindow *>(s);
49 else
50 debug << ", surface=" << s;
51 }
52 debug << ')';
53 return debug;
54}
55#endif // !QT_NO_DEBUG_STREAM
56
57QT_END_NAMESPACE
Combined button and popup list for selecting options.
Q_CORE_EXPORT QDebug operator<<(QDebug debug, QDir::Filters filters)
Definition qdir.cpp:2582