diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-08-11 15:01:21 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-08-11 18:47:15 +0200 |
commit | 69972719542cd686687ddd91f2b5284483513608 (patch) | |
tree | 7d332110d48d199c0dab5532610bad652628427e | |
parent | ac40c3923580e4ec0e738d57ff8b885da93301ef (diff) |
clang-tidy bugprone-parent-virtual-call in vcl
Change-Id: I270bb35f577cc1ee56233c585665478cbaab9085
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155616
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | include/vcl/toolbox.hxx | 1 | ||||
-rw-r--r-- | vcl/source/app/idle.cxx | 2 | ||||
-rw-r--r-- | vcl/source/app/salvtables.cxx | 8 | ||||
-rw-r--r-- | vcl/source/control/PriorityMergedHBox.cxx | 10 | ||||
-rw-r--r-- | vcl/source/control/combobox.cxx | 8 | ||||
-rw-r--r-- | vcl/source/control/imp_listbox.cxx | 2 | ||||
-rw-r--r-- | vcl/source/control/spinfld.cxx | 2 | ||||
-rw-r--r-- | vcl/source/edit/vclmedit.cxx | 4 | ||||
-rw-r--r-- | vcl/source/uitest/uiobject.cxx | 6 | ||||
-rw-r--r-- | vcl/source/window/menubarwindow.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/toolbox.cxx | 5 | ||||
-rw-r--r-- | vcl/unx/gtk3/gtkinst.cxx | 2 |
12 files changed, 23 insertions, 29 deletions
diff --git a/include/vcl/toolbox.hxx b/include/vcl/toolbox.hxx index 6cf448a30b1d..aa24a6d5c2c4 100644 --- a/include/vcl/toolbox.hxx +++ b/include/vcl/toolbox.hxx @@ -291,7 +291,6 @@ public: virtual void Resizing( Size& rSize ) override; virtual Size GetOptimalSize() const override; virtual void doDeferredInit(WinBits nBits) override; - virtual void queue_resize(StateChangedType eReason = StateChangedType::Layout) override; /// Insert a command (like '.uno:Save'). virtual void InsertItem( const OUString& rCommand, diff --git a/vcl/source/app/idle.cxx b/vcl/source/app/idle.cxx index 7e5756537164..0aed942beb79 100644 --- a/vcl/source/app/idle.cxx +++ b/vcl/source/app/idle.cxx @@ -33,7 +33,7 @@ Idle::Idle( const char *pDebugName ) void Idle::Start(const bool bStartTimer) { - Task::Start(false); + Timer::Start(false); sal_uInt64 nPeriod = Scheduler::ImmediateTimeoutMs; if (Scheduler::GetDeterministicMode()) diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index 80772536adeb..1ce6cf936316 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -6227,22 +6227,22 @@ void SalInstanceDrawingArea::queue_draw_area(int x, int y, int width, int height void SalInstanceDrawingArea::connect_size_allocate(const Link<const Size&, void>& rLink) { - weld::Widget::connect_size_allocate(rLink); + SalInstanceWidget::connect_size_allocate(rLink); } void SalInstanceDrawingArea::connect_key_press(const Link<const KeyEvent&, bool>& rLink) { - weld::Widget::connect_key_press(rLink); + SalInstanceWidget::connect_key_press(rLink); } void SalInstanceDrawingArea::connect_key_release(const Link<const KeyEvent&, bool>& rLink) { - weld::Widget::connect_key_release(rLink); + SalInstanceWidget::connect_key_release(rLink); } void SalInstanceDrawingArea::connect_style_updated(const Link<Widget&, void>& rLink) { - weld::Widget::connect_style_updated(rLink); + SalInstanceWidget::connect_style_updated(rLink); } void SalInstanceDrawingArea::set_cursor(PointerStyle ePointerStyle) diff --git a/vcl/source/control/PriorityMergedHBox.cxx b/vcl/source/control/PriorityMergedHBox.cxx index fd5aa5814dac..5d5e6249ed16 100644 --- a/vcl/source/control/PriorityMergedHBox.cxx +++ b/vcl/source/control/PriorityMergedHBox.cxx @@ -46,18 +46,18 @@ PriorityMergedHBox::PriorityMergedHBox(vcl::Window* pParent) void PriorityMergedHBox::Resize() { if (comphelper::LibreOfficeKit::isActive()) - return VclHBox::Resize(); + return PriorityHBox::Resize(); if (!m_bInitialized) Initialize(); if (!m_bInitialized) { - return VclHBox::Resize(); + return PriorityHBox::Resize(); } tools::Long nWidth = GetSizePixel().Width(); - tools::Long nCurrentWidth = VclHBox::calculateRequisition().getWidth() + BUTTON_WIDTH; + tools::Long nCurrentWidth = PriorityHBox::calculateRequisition().getWidth() + BUTTON_WIDTH; // Hide lower priority controls for (int i = GetChildCount() - 1; i >= 0; i--) @@ -104,7 +104,7 @@ void PriorityMergedHBox::Resize() } } - VclHBox::Resize(); + PriorityHBox::Resize(); if (GetHiddenCount()) m_pButton->Show(); @@ -138,7 +138,7 @@ Size PriorityMergedHBox::calculateRequisition() const { if (!m_bInitialized) { - return VclHBox::calculateRequisition(); + return PriorityHBox::calculateRequisition(); } sal_uInt16 nVisibleChildren = 0; diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx index 05b7a50006b9..ac817ce2a426 100644 --- a/vcl/source/control/combobox.cxx +++ b/vcl/source/control/combobox.cxx @@ -575,7 +575,7 @@ void ComboBox::setPosSizePixel( tools::Long nX, tools::Long nY, tools::Long nWid void ComboBox::Resize() { - Control::Resize(); + Edit::Resize(); if (m_pImpl->m_pSubEdit) { @@ -693,7 +693,7 @@ void ComboBox::StateChanged( StateChangedType nType ) void ComboBox::DataChanged( const DataChangedEvent& rDCEvt ) { - Control::DataChanged( rDCEvt ); + Edit::DataChanged( rDCEvt ); if ( !((rDCEvt.GetType() == DataChangedEventType::FONTS) || (rDCEvt.GetType() == DataChangedEventType::FONTSUBSTITUTION) || @@ -1570,7 +1570,7 @@ bool ComboBox::set_property(const OUString &rKey, const OUString &rValue) else if (rKey == "placeholder-text") SetPlaceholderText(rValue); else - return Control::set_property(rKey, rValue); + return Edit::set_property(rKey, rValue); return true; } @@ -1581,7 +1581,7 @@ FactoryFunction ComboBox::GetUITestFactory() const void ComboBox::DumpAsPropertyTree(tools::JsonWriter& rJsonWriter) { - Control::DumpAsPropertyTree(rJsonWriter); + Edit::DumpAsPropertyTree(rJsonWriter); { auto entriesNode = rJsonWriter.startArray("entries"); diff --git a/vcl/source/control/imp_listbox.cxx b/vcl/source/control/imp_listbox.cxx index 1b18498c68fc..780105b32ea3 100644 --- a/vcl/source/control/imp_listbox.cxx +++ b/vcl/source/control/imp_listbox.cxx @@ -2399,7 +2399,7 @@ bool ImplListBox::EventNotify( NotifyEvent& rNEvt ) } } - return bDone || Window::EventNotify( rNEvt ); + return bDone || Control::EventNotify( rNEvt ); } const Wallpaper& ImplListBox::GetDisplayBackground() const diff --git a/vcl/source/control/spinfld.cxx b/vcl/source/control/spinfld.cxx index 973825a3a977..15229b53af3d 100644 --- a/vcl/source/control/spinfld.cxx +++ b/vcl/source/control/spinfld.cxx @@ -718,7 +718,7 @@ void SpinField::Resize() if (!mbSpin) return; - Control::Resize(); + Edit::Resize(); Size aSize = GetOutputSizePixel(); bool bSubEditPositioned = false; diff --git a/vcl/source/edit/vclmedit.cxx b/vcl/source/edit/vclmedit.cxx index 541d6bfc20c8..3048b535c031 100644 --- a/vcl/source/edit/vclmedit.cxx +++ b/vcl/source/edit/vclmedit.cxx @@ -1252,7 +1252,7 @@ void VclMultiLineEdit::StateChanged( StateChangedType nType ) } } - Control::StateChanged( nType ); + Edit::StateChanged( nType ); } void VclMultiLineEdit::DataChanged( const DataChangedEvent& rDCEvt ) @@ -1265,7 +1265,7 @@ void VclMultiLineEdit::DataChanged( const DataChangedEvent& rDCEvt ) Invalidate(); } else - Control::DataChanged( rDCEvt ); + Edit::DataChanged( rDCEvt ); } void VclMultiLineEdit::Draw( OutputDevice* pDev, const Point& rPos, SystemTextColorFlags nFlags ) diff --git a/vcl/source/uitest/uiobject.cxx b/vcl/source/uitest/uiobject.cxx index 623591e7e218..e4f2c63a73c9 100644 --- a/vcl/source/uitest/uiobject.cxx +++ b/vcl/source/uitest/uiobject.cxx @@ -1379,7 +1379,7 @@ OUString SpinFieldUIObject::get_action(VclEventId nEvent) const "' from " + get_top_parent(mxSpinField)->get_id(); } else - return WindowUIObject::get_action(nEvent); + return EditUIObject::get_action(nEvent); } OUString SpinFieldUIObject::get_name() const @@ -1422,7 +1422,7 @@ void MetricFieldUIObject::execute(const OUString& rAction, StringMap MetricFieldUIObject::get_state() { - StringMap aMap = EditUIObject::get_state(); + StringMap aMap = SpinFieldUIObject::get_state(); aMap["Value"] = mxMetricField->GetValueString(); return aMap; @@ -1467,7 +1467,7 @@ void FormattedFieldUIObject::execute(const OUString& rAction, StringMap FormattedFieldUIObject::get_state() { - StringMap aMap = EditUIObject::get_state(); + StringMap aMap = SpinFieldUIObject::get_state(); aMap["Value"] = OUString::number(mxFormattedField->GetFormatter().GetValue()); return aMap; diff --git a/vcl/source/window/menubarwindow.cxx b/vcl/source/window/menubarwindow.cxx index 89e6b9246148..85b1003363c9 100644 --- a/vcl/source/window/menubarwindow.cxx +++ b/vcl/source/window/menubarwindow.cxx @@ -47,7 +47,7 @@ DecoToolBox::DecoToolBox( vcl::Window* pParent ) : void DecoToolBox::DataChanged( const DataChangedEvent& rDCEvt ) { - Window::DataChanged( rDCEvt ); + ToolBox::DataChanged( rDCEvt ); if ( rDCEvt.GetFlags() & AllSettingsFlags::STYLE ) { diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx index fc9effe58065..ef12af602504 100644 --- a/vcl/source/window/toolbox.cxx +++ b/vcl/source/window/toolbox.cxx @@ -1260,11 +1260,6 @@ void ToolBox::doDeferredInit(WinBits nBits) mbIsDeferredInit = false; } -void ToolBox::queue_resize(StateChangedType eReason) -{ - Window::queue_resize(eReason); -} - ToolBox::ToolBox( vcl::Window* pParent, WinBits nStyle ) : DockingWindow( WindowType::TOOLBOX, "vcl::ToolBox maLayoutIdle" ) { diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx index 2cfd0d6b203a..9c3b008c4266 100644 --- a/vcl/unx/gtk3/gtkinst.cxx +++ b/vcl/unx/gtk3/gtkinst.cxx @@ -6528,7 +6528,7 @@ public: { if (!m_nToplevelFocusChangedSignalId) m_nToplevelFocusChangedSignalId = g_signal_connect(m_pWindow, "notify::has-toplevel-focus", G_CALLBACK(signalToplevelFocusChanged), this); - weld::Container::connect_container_focus_changed(rLink); + GtkInstanceContainer::connect_container_focus_changed(rLink); } virtual void disable_notify_events() override |