summaryrefslogtreecommitdiffstats
path: root/src/gui/vulkan/qplatformvulkaninstance.h
diff options
context:
space:
mode:
authorMartin Smith <martin.smith@qt.io>2018-01-17 11:40:45 +0100
committerMartin Smith <martin.smith@qt.io>2018-01-18 06:32:25 +0000
commit8b9b3e2f29e06106ac6b3bc4cc60bc0a13ec0083 (patch)
tree5a1ebfebb84b9376668e1a8c15dd334c68b4b1d3 /src/gui/vulkan/qplatformvulkaninstance.h
parent20be99dec52d4c6922ec84b3836b549f505738cf (diff)
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>
Diffstat (limited to 'src/gui/vulkan/qplatformvulkaninstance.h')
-rw-r--r--src/gui/vulkan/qplatformvulkaninstance.h61
1 files changed, 61 insertions, 0 deletions
diff --git a/src/gui/vulkan/qplatformvulkaninstance.h b/src/gui/vulkan/qplatformvulkaninstance.h
index 9470e2d0b4..9f34803f7b 100644
--- a/src/gui/vulkan/qplatformvulkaninstance.h
+++ b/src/gui/vulkan/qplatformvulkaninstance.h
@@ -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