diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2017-04-12 11:58:21 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2017-04-21 11:10:13 +0000 |
commit | a5c1754faa7bd9491fcf64dda34b479cdf62c9bd (patch) | |
tree | 61a093917f9c8308d2153335d49c58acc3836981 /src/core/content_browser_client_qt.cpp | |
parent | d08524fbfbb78eca09bbab58d5a9840387d2d0e7 (diff) |
Standardize override declaration
Update our overrides to Qt coding standard getting rid of
Q_DECL_OVERRIDE and redundant virtual declarations.
Change-Id: Id8b0750eb05c51fc8f50cac4000a811eebcbf918
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src/core/content_browser_client_qt.cpp')
-rw-r--r-- | src/core/content_browser_client_qt.cpp | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/src/core/content_browser_client_qt.cpp b/src/core/content_browser_client_qt.cpp index de6e29de6..d446d8ff4 100644 --- a/src/core/content_browser_client_qt.cpp +++ b/src/core/content_browser_client_qt.cpp @@ -159,7 +159,7 @@ public: { } - virtual void Run(Delegate *delegate) Q_DECL_OVERRIDE + void Run(Delegate *delegate) override { Q_ASSERT(delegate == m_delegate); // This is used only when MessagePumpForUIQt is used outside of the GUI thread. @@ -169,18 +169,18 @@ public: m_explicitLoop = 0; } - virtual void Quit() Q_DECL_OVERRIDE + void Quit() override { Q_ASSERT(m_explicitLoop); m_explicitLoop->quit(); } - virtual void ScheduleWork() Q_DECL_OVERRIDE + void ScheduleWork() override { QCoreApplication::postEvent(this, new QEvent(QEvent::User)); } - virtual void ScheduleDelayedWork(const base::TimeTicks &delayed_work_time) Q_DECL_OVERRIDE + void ScheduleDelayedWork(const base::TimeTicks &delayed_work_time) override { if (delayed_work_time.is_null()) { killTimer(m_timerId); @@ -194,13 +194,13 @@ public: } protected: - virtual void customEvent(QEvent *ev) Q_DECL_OVERRIDE + void customEvent(QEvent *ev) override { if (handleScheduledWork()) QCoreApplication::postEvent(this, new QEvent(QEvent::User)); } - virtual void timerEvent(QTimerEvent *ev) Q_DECL_OVERRIDE + void timerEvent(QTimerEvent *ev) override { Q_ASSERT(m_timerId == ev->timerId()); killTimer(m_timerId); @@ -271,24 +271,24 @@ public: : content::BrowserMainParts() { } - void PreMainMessageLoopStart() Q_DECL_OVERRIDE + void PreMainMessageLoopStart() override { base::MessageLoop::InitMessagePumpForUIFactory(messagePumpFactory); } - void PreMainMessageLoopRun() Q_DECL_OVERRIDE + void PreMainMessageLoopRun() override { device::GeolocationProvider::SetGeolocationDelegate(new GeolocationDelegateQt()); } - void PostMainMessageLoopRun() + void PostMainMessageLoopRun() override { // The BrowserContext's destructor uses the MessageLoop so it should be deleted // right before the RenderProcessHostImpl's destructor destroys it. WebEngineContext::current()->destroyBrowserContext(); } - int PreCreateThreads() Q_DECL_OVERRIDE + int PreCreateThreads() override { base::ThreadRestrictions::SetIOAllowed(true); // Like ChromeBrowserMainExtraPartsViews::PreCreateThreads does. @@ -333,17 +333,17 @@ public: } } - virtual void* GetHandle() Q_DECL_OVERRIDE { return m_handle; } + void* GetHandle() override { return m_handle; } // Qt currently never creates contexts using robustness attributes. - virtual bool WasAllocatedUsingRobustnessExtension() { return false; } + bool WasAllocatedUsingRobustnessExtension() override { return false; } // We don't care about the rest, this context shouldn't be used except for its handle. - virtual bool Initialize(gl::GLSurface *, const gl::GLContextAttribs &) Q_DECL_OVERRIDE { Q_UNREACHABLE(); return false; } - virtual bool MakeCurrent(gl::GLSurface *) Q_DECL_OVERRIDE { Q_UNREACHABLE(); return false; } - virtual void ReleaseCurrent(gl::GLSurface *) Q_DECL_OVERRIDE { Q_UNREACHABLE(); } - virtual bool IsCurrent(gl::GLSurface *) Q_DECL_OVERRIDE { Q_UNREACHABLE(); return false; } - virtual void OnSetSwapInterval(int) Q_DECL_OVERRIDE { Q_UNREACHABLE(); } - virtual scoped_refptr<gl::GPUTimingClient> CreateGPUTimingClient() Q_DECL_OVERRIDE + bool Initialize(gl::GLSurface *, const gl::GLContextAttribs &) override { Q_UNREACHABLE(); return false; } + bool MakeCurrent(gl::GLSurface *) override { Q_UNREACHABLE(); return false; } + void ReleaseCurrent(gl::GLSurface *) override { Q_UNREACHABLE(); } + bool IsCurrent(gl::GLSurface *) override { Q_UNREACHABLE(); return false; } + void OnSetSwapInterval(int) override { Q_UNREACHABLE(); } + scoped_refptr<gl::GPUTimingClient> CreateGPUTimingClient() override { return nullptr; } @@ -354,8 +354,8 @@ private: class ShareGroupQtQuick : public gl::GLShareGroup { public: - virtual gl::GLContext* GetContext() Q_DECL_OVERRIDE { return m_shareContextQtQuick.get(); } - virtual void AboutToAddFirstContext() Q_DECL_OVERRIDE; + gl::GLContext* GetContext() override { return m_shareContextQtQuick.get(); } + void AboutToAddFirstContext() override; private: scoped_refptr<QtShareGLContext> m_shareContextQtQuick; @@ -375,7 +375,7 @@ void ShareGroupQtQuick::AboutToAddFirstContext() class QuotaPermissionContextQt : public content::QuotaPermissionContext { public: - virtual void RequestQuotaPermission(const content::StorageQuotaParams ¶ms, int render_process_id, const PermissionCallback &callback) Q_DECL_OVERRIDE + void RequestQuotaPermission(const content::StorageQuotaParams ¶ms, int render_process_id, const PermissionCallback &callback) override { Q_UNUSED(params); Q_UNUSED(render_process_id); |