From 9bad3508fccb058261d47e023400868147f2d733 Mon Sep 17 00:00:00 2001 From: Alexander Volkov Date: Thu, 29 Aug 2019 23:32:04 +0300 Subject: Add missing override Change-Id: I88000e82ecbdc55e621dc8e22aff5e8f55cf9d0e Reviewed-by: Friedemann Kleint Reviewed-by: Thiago Macieira --- src/3rdparty/VulkanMemoryAllocator/vk_mem_alloc.h | 140 ++++++++++----------- src/network/ssl/qdtls_openssl_p.h | 2 +- .../eventdispatchers/qunixeventdispatcher_qpa_p.h | 6 +- .../input/integrityhid/qintegrityhidmanager.h | 2 +- .../linuxaccessibility/application_p.h | 2 +- .../linuxaccessibility/atspiadaptor_p.h | 4 +- src/plugins/generic/libinput/main.cpp | 2 +- src/plugins/generic/tuiotouch/main.cpp | 2 +- .../xcb/gl_integrations/xcb_egl/qxcbeglcontext.h | 8 +- .../xcb/gl_integrations/xcb_egl/qxcbeglmain.cpp | 2 +- .../xcb/gl_integrations/xcb_glx/qxcbglxmain.cpp | 2 +- src/plugins/sqldrivers/odbc/main.cpp | 2 +- 12 files changed, 87 insertions(+), 87 deletions(-) diff --git a/src/3rdparty/VulkanMemoryAllocator/vk_mem_alloc.h b/src/3rdparty/VulkanMemoryAllocator/vk_mem_alloc.h index 5d311b750d..696c8f9a17 100644 --- a/src/3rdparty/VulkanMemoryAllocator/vk_mem_alloc.h +++ b/src/3rdparty/VulkanMemoryAllocator/vk_mem_alloc.h @@ -5268,22 +5268,22 @@ class VmaBlockMetadata_Generic : public VmaBlockMetadata public: VmaBlockMetadata_Generic(VmaAllocator hAllocator); virtual ~VmaBlockMetadata_Generic(); - virtual void Init(VkDeviceSize size); + void Init(VkDeviceSize size) override; - virtual bool Validate() const; - virtual size_t GetAllocationCount() const { return m_Suballocations.size() - m_FreeCount; } - virtual VkDeviceSize GetSumFreeSize() const { return m_SumFreeSize; } - virtual VkDeviceSize GetUnusedRangeSizeMax() const; - virtual bool IsEmpty() const; + bool Validate() const override; + size_t GetAllocationCount() const override { return m_Suballocations.size() - m_FreeCount; } + VkDeviceSize GetSumFreeSize() const override { return m_SumFreeSize; } + VkDeviceSize GetUnusedRangeSizeMax() const override; + bool IsEmpty() const override; - virtual void CalcAllocationStatInfo(VmaStatInfo& outInfo) const; - virtual void AddPoolStats(VmaPoolStats& inoutStats) const; + void CalcAllocationStatInfo(VmaStatInfo& outInfo) const override; + void AddPoolStats(VmaPoolStats& inoutStats) const override; #if VMA_STATS_STRING_ENABLED - virtual void PrintDetailedMap(class VmaJsonWriter& json) const; + void PrintDetailedMap(class VmaJsonWriter& json) const override; #endif - virtual bool CreateAllocationRequest( + bool CreateAllocationRequest( uint32_t currentFrameIndex, uint32_t frameInUseCount, VkDeviceSize bufferImageGranularity, @@ -5293,28 +5293,28 @@ public: VmaSuballocationType allocType, bool canMakeOtherLost, uint32_t strategy, - VmaAllocationRequest* pAllocationRequest); + VmaAllocationRequest* pAllocationRequest) override; - virtual bool MakeRequestedAllocationsLost( + bool MakeRequestedAllocationsLost( uint32_t currentFrameIndex, uint32_t frameInUseCount, - VmaAllocationRequest* pAllocationRequest); + VmaAllocationRequest* pAllocationRequest) override; - virtual uint32_t MakeAllocationsLost(uint32_t currentFrameIndex, uint32_t frameInUseCount); + uint32_t MakeAllocationsLost(uint32_t currentFrameIndex, uint32_t frameInUseCount) override; - virtual VkResult CheckCorruption(const void* pBlockData); + VkResult CheckCorruption(const void* pBlockData) override; - virtual void Alloc( + void Alloc( const VmaAllocationRequest& request, VmaSuballocationType type, VkDeviceSize allocSize, bool upperAddress, - VmaAllocation hAllocation); + VmaAllocation hAllocation) override; - virtual void Free(const VmaAllocation allocation); - virtual void FreeAtOffset(VkDeviceSize offset); + void Free(const VmaAllocation allocation) override; + void FreeAtOffset(VkDeviceSize offset) override; - virtual bool ResizeAllocation(const VmaAllocation alloc, VkDeviceSize newSize); + bool ResizeAllocation(const VmaAllocation alloc, VkDeviceSize newSize) override; //////////////////////////////////////////////////////////////////////////////// // For defragmentation @@ -5449,22 +5449,22 @@ class VmaBlockMetadata_Linear : public VmaBlockMetadata public: VmaBlockMetadata_Linear(VmaAllocator hAllocator); virtual ~VmaBlockMetadata_Linear(); - virtual void Init(VkDeviceSize size); + void Init(VkDeviceSize size) override; - virtual bool Validate() const; - virtual size_t GetAllocationCount() const; - virtual VkDeviceSize GetSumFreeSize() const { return m_SumFreeSize; } - virtual VkDeviceSize GetUnusedRangeSizeMax() const; - virtual bool IsEmpty() const { return GetAllocationCount() == 0; } + bool Validate() const override; + size_t GetAllocationCount() const override; + VkDeviceSize GetSumFreeSize() const override { return m_SumFreeSize; } + VkDeviceSize GetUnusedRangeSizeMax() const override; + bool IsEmpty() const override { return GetAllocationCount() == 0; } - virtual void CalcAllocationStatInfo(VmaStatInfo& outInfo) const; - virtual void AddPoolStats(VmaPoolStats& inoutStats) const; + void CalcAllocationStatInfo(VmaStatInfo& outInfo) const override; + void AddPoolStats(VmaPoolStats& inoutStats) const override; #if VMA_STATS_STRING_ENABLED - virtual void PrintDetailedMap(class VmaJsonWriter& json) const; + void PrintDetailedMap(class VmaJsonWriter& json) const override; #endif - virtual bool CreateAllocationRequest( + bool CreateAllocationRequest( uint32_t currentFrameIndex, uint32_t frameInUseCount, VkDeviceSize bufferImageGranularity, @@ -5474,26 +5474,26 @@ public: VmaSuballocationType allocType, bool canMakeOtherLost, uint32_t strategy, - VmaAllocationRequest* pAllocationRequest); + VmaAllocationRequest* pAllocationRequest) override; - virtual bool MakeRequestedAllocationsLost( + bool MakeRequestedAllocationsLost( uint32_t currentFrameIndex, uint32_t frameInUseCount, - VmaAllocationRequest* pAllocationRequest); + VmaAllocationRequest* pAllocationRequest) override; - virtual uint32_t MakeAllocationsLost(uint32_t currentFrameIndex, uint32_t frameInUseCount); + uint32_t MakeAllocationsLost(uint32_t currentFrameIndex, uint32_t frameInUseCount) override; - virtual VkResult CheckCorruption(const void* pBlockData); + VkResult CheckCorruption(const void* pBlockData) override; - virtual void Alloc( + void Alloc( const VmaAllocationRequest& request, VmaSuballocationType type, VkDeviceSize allocSize, bool upperAddress, - VmaAllocation hAllocation); + VmaAllocation hAllocation) override; - virtual void Free(const VmaAllocation allocation); - virtual void FreeAtOffset(VkDeviceSize offset); + void Free(const VmaAllocation allocation) override; + void FreeAtOffset(VkDeviceSize offset) override; private: /* @@ -5559,22 +5559,22 @@ class VmaBlockMetadata_Buddy : public VmaBlockMetadata public: VmaBlockMetadata_Buddy(VmaAllocator hAllocator); virtual ~VmaBlockMetadata_Buddy(); - virtual void Init(VkDeviceSize size); + void Init(VkDeviceSize size) override; - virtual bool Validate() const; - virtual size_t GetAllocationCount() const { return m_AllocationCount; } - virtual VkDeviceSize GetSumFreeSize() const { return m_SumFreeSize + GetUnusableSize(); } - virtual VkDeviceSize GetUnusedRangeSizeMax() const; - virtual bool IsEmpty() const { return m_Root->type == Node::TYPE_FREE; } + bool Validate() const override; + size_t GetAllocationCount() const override { return m_AllocationCount; } + VkDeviceSize GetSumFreeSize() const override { return m_SumFreeSize + GetUnusableSize(); } + VkDeviceSize GetUnusedRangeSizeMax() const override; + bool IsEmpty() const override { return m_Root->type == Node::TYPE_FREE; } - virtual void CalcAllocationStatInfo(VmaStatInfo& outInfo) const; - virtual void AddPoolStats(VmaPoolStats& inoutStats) const; + void CalcAllocationStatInfo(VmaStatInfo& outInfo) const override; + void AddPoolStats(VmaPoolStats& inoutStats) const override; #if VMA_STATS_STRING_ENABLED - virtual void PrintDetailedMap(class VmaJsonWriter& json) const; + void PrintDetailedMap(class VmaJsonWriter& json) const override; #endif - virtual bool CreateAllocationRequest( + bool CreateAllocationRequest( uint32_t currentFrameIndex, uint32_t frameInUseCount, VkDeviceSize bufferImageGranularity, @@ -5584,26 +5584,26 @@ public: VmaSuballocationType allocType, bool canMakeOtherLost, uint32_t strategy, - VmaAllocationRequest* pAllocationRequest); + VmaAllocationRequest* pAllocationRequest) override; - virtual bool MakeRequestedAllocationsLost( + bool MakeRequestedAllocationsLost( uint32_t currentFrameIndex, uint32_t frameInUseCount, - VmaAllocationRequest* pAllocationRequest); + VmaAllocationRequest* pAllocationRequest) override; - virtual uint32_t MakeAllocationsLost(uint32_t currentFrameIndex, uint32_t frameInUseCount); + uint32_t MakeAllocationsLost(uint32_t currentFrameIndex, uint32_t frameInUseCount) override; - virtual VkResult CheckCorruption(const void* /*pBlockData*/) { return VK_ERROR_FEATURE_NOT_PRESENT; } + VkResult CheckCorruption(const void* /*pBlockData*/) override { return VK_ERROR_FEATURE_NOT_PRESENT; } - virtual void Alloc( + void Alloc( const VmaAllocationRequest& request, VmaSuballocationType type, VkDeviceSize allocSize, bool upperAddress, - VmaAllocation hAllocation); + VmaAllocation hAllocation) override; - virtual void Free(const VmaAllocation allocation) { FreeAtOffset(allocation, allocation->GetOffset()); } - virtual void FreeAtOffset(VkDeviceSize offset) { FreeAtOffset(VMA_NULL, offset); } + void Free(const VmaAllocation allocation) override { FreeAtOffset(allocation, allocation->GetOffset()); } + void FreeAtOffset(VkDeviceSize offset) override { FreeAtOffset(VMA_NULL, offset); } private: static const VkDeviceSize MIN_NODE_SIZE = 32; @@ -6025,16 +6025,16 @@ public: bool overlappingMoveSupported); virtual ~VmaDefragmentationAlgorithm_Generic(); - virtual void AddAllocation(VmaAllocation hAlloc, VkBool32* pChanged); - virtual void AddAll() { m_AllAllocations = true; } + void AddAllocation(VmaAllocation hAlloc, VkBool32* pChanged) override; + void AddAll() override { m_AllAllocations = true; } - virtual VkResult Defragment( + VkResult Defragment( VmaVector< VmaDefragmentationMove, VmaStlAllocator >& moves, VkDeviceSize maxBytesToMove, - uint32_t maxAllocationsToMove); + uint32_t maxAllocationsToMove) override; - virtual VkDeviceSize GetBytesMoved() const { return m_BytesMoved; } - virtual uint32_t GetAllocationsMoved() const { return m_AllocationsMoved; } + VkDeviceSize GetBytesMoved() const override { return m_BytesMoved; } + uint32_t GetAllocationsMoved() const override { return m_AllocationsMoved; } private: uint32_t m_AllocationCount; @@ -6152,16 +6152,16 @@ public: bool overlappingMoveSupported); virtual ~VmaDefragmentationAlgorithm_Fast(); - virtual void AddAllocation(VmaAllocation /*hAlloc*/, VkBool32* /*pChanged*/) { ++m_AllocationCount; } - virtual void AddAll() { m_AllAllocations = true; } + void AddAllocation(VmaAllocation /*hAlloc*/, VkBool32* /*pChanged*/) override { ++m_AllocationCount; } + void AddAll() override { m_AllAllocations = true; } - virtual VkResult Defragment( + VkResult Defragment( VmaVector< VmaDefragmentationMove, VmaStlAllocator >& moves, VkDeviceSize maxBytesToMove, - uint32_t maxAllocationsToMove); + uint32_t maxAllocationsToMove) override; - virtual VkDeviceSize GetBytesMoved() const { return m_BytesMoved; } - virtual uint32_t GetAllocationsMoved() const { return m_AllocationsMoved; } + VkDeviceSize GetBytesMoved() const override { return m_BytesMoved; } + uint32_t GetAllocationsMoved() const override { return m_AllocationsMoved; } private: struct BlockInfo diff --git a/src/network/ssl/qdtls_openssl_p.h b/src/network/ssl/qdtls_openssl_p.h index 35e9f29a5d..302cb0d4b5 100644 --- a/src/network/ssl/qdtls_openssl_p.h +++ b/src/network/ssl/qdtls_openssl_p.h @@ -187,7 +187,7 @@ private: void doubleTimeout(); void resetTimeout() {timeoutMs = 1000;} void stop(); - void timerEvent(QTimerEvent *event); + void timerEvent(QTimerEvent *event) override; int timerId = -1; int timeoutMs = 1000; diff --git a/src/platformsupport/eventdispatchers/qunixeventdispatcher_qpa_p.h b/src/platformsupport/eventdispatchers/qunixeventdispatcher_qpa_p.h index 8157b8793d..24f270851b 100644 --- a/src/platformsupport/eventdispatchers/qunixeventdispatcher_qpa_p.h +++ b/src/platformsupport/eventdispatchers/qunixeventdispatcher_qpa_p.h @@ -64,10 +64,10 @@ public: explicit QUnixEventDispatcherQPA(QObject *parent = nullptr); ~QUnixEventDispatcherQPA(); - bool processEvents(QEventLoop::ProcessEventsFlags flags); - bool hasPendingEvents(); + bool processEvents(QEventLoop::ProcessEventsFlags flags) override; + bool hasPendingEvents() override; - void flush(); + void flush() override; }; QT_END_NAMESPACE diff --git a/src/platformsupport/input/integrityhid/qintegrityhidmanager.h b/src/platformsupport/input/integrityhid/qintegrityhidmanager.h index fde5fd7dbb..e46cb75dc1 100644 --- a/src/platformsupport/input/integrityhid/qintegrityhidmanager.h +++ b/src/platformsupport/input/integrityhid/qintegrityhidmanager.h @@ -55,7 +55,7 @@ public: QIntegrityHIDManager(const QString &key, const QString &specification, QObject *parent = nullptr); ~QIntegrityHIDManager(); - void run(void); + void run(void) override; private: void open_devices(void); diff --git a/src/platformsupport/linuxaccessibility/application_p.h b/src/platformsupport/linuxaccessibility/application_p.h index 9c053b253c..e980232bbf 100644 --- a/src/platformsupport/linuxaccessibility/application_p.h +++ b/src/platformsupport/linuxaccessibility/application_p.h @@ -79,7 +79,7 @@ Q_SIGNALS: void windowActivated(QObject* window, bool active); protected: - bool eventFilter(QObject *obj, QEvent *event); + bool eventFilter(QObject *obj, QEvent *event) override; private Q_SLOTS: void notifyKeyboardListenerCallback(const QDBusMessage& message); diff --git a/src/platformsupport/linuxaccessibility/atspiadaptor_p.h b/src/platformsupport/linuxaccessibility/atspiadaptor_p.h index 0b624389a3..97d302a779 100644 --- a/src/platformsupport/linuxaccessibility/atspiadaptor_p.h +++ b/src/platformsupport/linuxaccessibility/atspiadaptor_p.h @@ -80,8 +80,8 @@ public: ~AtSpiAdaptor(); void registerApplication(); - QString introspect(const QString &path) const; - bool handleMessage(const QDBusMessage &message, const QDBusConnection &connection); + QString introspect(const QString &path) const override; + bool handleMessage(const QDBusMessage &message, const QDBusConnection &connection) override; void notify(QAccessibleEvent *event); void init(); diff --git a/src/plugins/generic/libinput/main.cpp b/src/plugins/generic/libinput/main.cpp index 6d1e76c0f0..703a9b1a3e 100644 --- a/src/plugins/generic/libinput/main.cpp +++ b/src/plugins/generic/libinput/main.cpp @@ -48,7 +48,7 @@ class QLibInputPlugin : public QGenericPlugin Q_PLUGIN_METADATA(IID QGenericPluginFactoryInterface_iid FILE "libinput.json") public: - QObject *create(const QString &key, const QString &specification); + QObject *create(const QString &key, const QString &specification) override; }; QObject *QLibInputPlugin::create(const QString &key, const QString &specification) diff --git a/src/plugins/generic/tuiotouch/main.cpp b/src/plugins/generic/tuiotouch/main.cpp index b424458e9f..628ccc8947 100644 --- a/src/plugins/generic/tuiotouch/main.cpp +++ b/src/plugins/generic/tuiotouch/main.cpp @@ -53,7 +53,7 @@ class QTuioTouchPlugin : public QGenericPlugin public: QTuioTouchPlugin(); - QObject* create(const QString &key, const QString &specification); + QObject* create(const QString &key, const QString &specification) override; }; QTuioTouchPlugin::QTuioTouchPlugin() diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglcontext.h b/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglcontext.h index fda53f17a1..af394d12ed 100644 --- a/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglcontext.h +++ b/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglcontext.h @@ -56,7 +56,7 @@ public: { } - void swapBuffers(QPlatformSurface *surface) + void swapBuffers(QPlatformSurface *surface) override { QEGLPlatformContext::swapBuffers(surface); if (surface->surface()->surfaceClass() == QSurface::Window) { @@ -69,17 +69,17 @@ public: } } - bool makeCurrent(QPlatformSurface *surface) + bool makeCurrent(QPlatformSurface *surface) override { return QEGLPlatformContext::makeCurrent(surface); } - void doneCurrent() + void doneCurrent() override { QEGLPlatformContext::doneCurrent(); } - EGLSurface eglSurfaceForPlatformSurface(QPlatformSurface *surface) + EGLSurface eglSurfaceForPlatformSurface(QPlatformSurface *surface) override { if (surface->surface()->surfaceClass() == QSurface::Window) return static_cast(surface)->eglSurface(); diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglmain.cpp b/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglmain.cpp index 2de6d800e4..8979c0371b 100644 --- a/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglmain.cpp +++ b/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglmain.cpp @@ -48,7 +48,7 @@ class QXcbEglIntegrationPlugin : public QXcbGlIntegrationPlugin Q_OBJECT Q_PLUGIN_METADATA(IID QXcbGlIntegrationFactoryInterface_iid FILE "xcb_egl.json") public: - QXcbGlIntegration *create() + QXcbGlIntegration *create() override { return new QXcbEglIntegration(); } diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxmain.cpp b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxmain.cpp index 1883d1bc52..898ee3dcf8 100644 --- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxmain.cpp +++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxmain.cpp @@ -48,7 +48,7 @@ class QXcbGlxIntegrationPlugin : public QXcbGlIntegrationPlugin Q_OBJECT Q_PLUGIN_METADATA(IID QXcbGlIntegrationFactoryInterface_iid FILE "xcb_glx.json") public: - QXcbGlIntegration *create() + QXcbGlIntegration *create() override { return new QXcbGlxIntegration(); } diff --git a/src/plugins/sqldrivers/odbc/main.cpp b/src/plugins/sqldrivers/odbc/main.cpp index e712514a88..92478ecbd1 100644 --- a/src/plugins/sqldrivers/odbc/main.cpp +++ b/src/plugins/sqldrivers/odbc/main.cpp @@ -51,7 +51,7 @@ class QODBCDriverPlugin : public QSqlDriverPlugin public: QODBCDriverPlugin(); - QSqlDriver* create(const QString &); + QSqlDriver* create(const QString &) override; }; QODBCDriverPlugin::QODBCDriverPlugin() -- cgit v1.2.3