doc: Fix remaining qdoc warmings for Vulkan stuff

Several uses of #if QT_CONFIG(vulkan) were modified to
for classes QVulkanFunctions and QVulkanDeviceFunctions
was added to qplatformvulkaninstance.h, because the
include file that contains them doesn't exist when
vulkan isn't there.

Change-Id: I392202ab5fe9bb4c558a991870e6ebf79254aec0
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
This commit is contained in:
Martin Smith 2018-01-17 11:40:45 +01:00
parent 20be99dec5
commit 8b9b3e2f29
5 changed files with 67 additions and 5 deletions

View File

@ -629,7 +629,7 @@ void QPlatformIntegration::setApplicationIcon(const QIcon &icon) const
Q_UNUSED(icon);
}
#if QT_CONFIG(vulkan)
#if QT_CONFIG(vulkan) || defined(Q_CLANG_QDOC)
/*!
Factory function for QPlatformVulkanInstance. The \a instance parameter is a

View File

@ -192,7 +192,7 @@ public:
virtual void beep() const;
#if QT_CONFIG(vulkan)
#if QT_CONFIG(vulkan) || defined(Q_CLANG_QDOC)
virtual QPlatformVulkanInstance *createPlatformVulkanInstance(QVulkanInstance *instance) const;
#endif

View File

@ -2841,7 +2841,7 @@ QDebug operator<<(QDebug debug, const QWindow *window)
}
#endif // !QT_NO_DEBUG_STREAM
#if QT_CONFIG(vulkan)
#if QT_CONFIG(vulkan) || defined(Q_CLANG_QDOC)
/*!
Associates this window with the specified Vulkan \a instance.

View File

@ -88,7 +88,7 @@ class QWindowContainer;
#ifndef QT_NO_DEBUG_STREAM
class QDebug;
#endif
#if QT_CONFIG(vulkan)
#if QT_CONFIG(vulkan) || defined(Q_CLANG_QDOC)
class QVulkanInstance;
#endif
@ -270,7 +270,7 @@ public:
static QWindow *fromWinId(WId id);
#if QT_CONFIG(vulkan)
#if QT_CONFIG(vulkan) || defined(Q_CLANG_QDOC)
void setVulkanInstance(QVulkanInstance *instance);
QVulkanInstance *vulkanInstance() const;
#endif
@ -378,6 +378,7 @@ private:
};
#ifndef Q_QDOC
// should these be seen by clang-qdoc?
template <> inline QWindow *qobject_cast<QWindow*>(QObject *o)
{
if (!o || !o->isWindowType()) return nullptr;

View File

@ -88,4 +88,65 @@ QT_END_NAMESPACE
#endif // QT_CONFIG(vulkan)
#if defined(Q_CLANG_QDOC)
/*
The following include file did not exist for clang-qdoc running
in macOS, but the classes are documented in qvulkanfunctions.cpp.
clang-qdoc must parse the class declarations in an include file,
or else it can't find a place to put the documentation for the
classes. Apparently these classes are created at build time if
Vulkan is present.
*/
#ifndef QVULKANFUNCTIONS_H
#define QVULKANFUNCTIONS_H
#include <QtGui/qtguiglobal.h>
#if QT_CONFIG(vulkan) || defined(Q_CLANG_QDOC)
#ifndef VK_NO_PROTOTYPES
#define VK_NO_PROTOTYPES
#endif
#include <vulkan/vulkan.h>
#include <QtCore/qscopedpointer.h>
QT_BEGIN_NAMESPACE
class QVulkanInstance;
class QVulkanFunctionsPrivate;
class QVulkanDeviceFunctionsPrivate;
class Q_GUI_EXPORT QVulkanFunctions
{
public:
~QVulkanFunctions();
private:
Q_DISABLE_COPY(QVulkanFunctions)
QVulkanFunctions(QVulkanInstance *inst);
QScopedPointer<QVulkanFunctionsPrivate> d_ptr;
friend class QVulkanInstance;
};
class Q_GUI_EXPORT QVulkanDeviceFunctions
{
public:
~QVulkanDeviceFunctions();
private:
Q_DISABLE_COPY(QVulkanDeviceFunctions)
QVulkanDeviceFunctions(QVulkanInstance *inst, VkDevice device);
QScopedPointer<QVulkanDeviceFunctionsPrivate> d_ptr;
friend class QVulkanInstance;
};
QT_END_NAMESPACE
#endif // QT_CONFIG(vulkan) || defined(Q_CLANG_QDOC)
#endif // QVULKANFUNCTIONS_H;
#endif // Q_CLANG_QDOC
#endif // QPLATFORMVULKANINSTANCE_H