diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-09-28 10:32:30 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-09-28 13:47:35 +0200 |
commit | 1141b6b0ce6581b587e174c9bbdddb88d36ea8c2 (patch) | |
tree | 5aa47d46ff3af3941681307ec3ce079c7d352673 /vcl | |
parent | e75a545f2869a4406bb434c356d481745f000271 (diff) |
loplugin:constmethod in vcl
Change-Id: I6a456979a6cfcd7920dc468baf9b23013cb701a4
Reviewed-on: https://gerrit.libreoffice.org/79783
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/TypeSerializer.hxx | 2 | ||||
-rw-r--r-- | vcl/inc/bitmap/Octree.hxx | 2 | ||||
-rw-r--r-- | vcl/inc/qt5/Qt5FilePicker.hxx | 2 | ||||
-rw-r--r-- | vcl/inc/qt5/Qt5Menu.hxx | 4 | ||||
-rw-r--r-- | vcl/inc/qt5/Qt5Widget.hxx | 10 | ||||
-rw-r--r-- | vcl/qt5/Qt5FilePicker.cxx | 2 | ||||
-rw-r--r-- | vcl/qt5/Qt5Menu.cxx | 2 | ||||
-rw-r--r-- | vcl/qt5/Qt5Widget.cxx | 2 | ||||
-rw-r--r-- | vcl/source/bitmap/Octree.cxx | 2 | ||||
-rw-r--r-- | vcl/source/control/wizardmachine.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/TypeSerializer.cxx | 2 |
11 files changed, 16 insertions, 16 deletions
diff --git a/vcl/inc/TypeSerializer.hxx b/vcl/inc/TypeSerializer.hxx index 99d4609d5d2a..45f7219300d6 100644 --- a/vcl/inc/TypeSerializer.hxx +++ b/vcl/inc/TypeSerializer.hxx @@ -30,7 +30,7 @@ public: TypeSerializer(SvStream& rStream); void readGradient(Gradient& rGradient); - void writeGradient(Gradient& rGradient); + void writeGradient(const Gradient& rGradient); }; #endif diff --git a/vcl/inc/bitmap/Octree.hxx b/vcl/inc/bitmap/Octree.hxx index 0bc060d450d9..86a911fa4adf 100644 --- a/vcl/inc/bitmap/Octree.hxx +++ b/vcl/inc/bitmap/Octree.hxx @@ -41,7 +41,7 @@ class VCL_PLUGIN_PUBLIC Octree { private: void CreatePalette(OctreeNode* pNode); - void GetPalIndex(OctreeNode* pNode); + void GetPalIndex(const OctreeNode* pNode); SAL_DLLPRIVATE void add(std::unique_ptr<OctreeNode>& rpNode); SAL_DLLPRIVATE void reduce(); diff --git a/vcl/inc/qt5/Qt5FilePicker.hxx b/vcl/inc/qt5/Qt5FilePicker.hxx index d4e74b92ba15..35ca687f8dcb 100644 --- a/vcl/inc/qt5/Qt5FilePicker.hxx +++ b/vcl/inc/qt5/Qt5FilePicker.hxx @@ -155,7 +155,7 @@ public: virtual void SAL_CALL setDescription(const OUString& rDescription) override; protected: - static css::uno::Any handleGetListValue(QComboBox* pWidget, sal_Int16 nControlAction); + static css::uno::Any handleGetListValue(const QComboBox* pWidget, sal_Int16 nControlAction); static void handleSetListValue(QComboBox* pQComboBox, sal_Int16 nAction, const css::uno::Any& rValue); virtual void addCustomControl(sal_Int16 controlId); diff --git a/vcl/inc/qt5/Qt5Menu.hxx b/vcl/inc/qt5/Qt5Menu.hxx index cf60ee2c0bb7..efcfb8eeb81c 100644 --- a/vcl/inc/qt5/Qt5Menu.hxx +++ b/vcl/inc/qt5/Qt5Menu.hxx @@ -45,7 +45,7 @@ private: void ReinitializeActionGroup(unsigned nPos); void ResetAllActionGroups(); - void UpdateActionGroupItem(Qt5MenuItem* pSalMenuItem); + void UpdateActionGroupItem(const Qt5MenuItem* pSalMenuItem); public: Qt5Menu(bool bMenuBar); @@ -74,7 +74,7 @@ public: void SetMenu(Menu* pMenu) { mpVCLMenu = pMenu; } Menu* GetMenu() { return mpVCLMenu; } - unsigned GetItemCount() { return maItems.size(); } + unsigned GetItemCount() const { return maItems.size(); } Qt5MenuItem* GetItemAtPos(unsigned nPos) { return maItems[nPos]; } private slots: diff --git a/vcl/inc/qt5/Qt5Widget.hxx b/vcl/inc/qt5/Qt5Widget.hxx index 457fc8b78612..159794b2d2a3 100644 --- a/vcl/inc/qt5/Qt5Widget.hxx +++ b/vcl/inc/qt5/Qt5Widget.hxx @@ -45,7 +45,7 @@ class Qt5Widget : public QWidget static void commitText(Qt5Frame&, const QString& aText); static bool handleKeyEvent(Qt5Frame&, const QWidget&, QKeyEvent*, const ButtonKeyState); - static void handleMouseButtonEvent(const Qt5Frame&, QMouseEvent*, const ButtonKeyState); + static void handleMouseButtonEvent(const Qt5Frame&, const QMouseEvent*, const ButtonKeyState); virtual bool event(QEvent*) override; @@ -81,8 +81,8 @@ public: // key events might be propagated further down => call base on false static inline bool handleKeyReleaseEvent(Qt5Frame&, const QWidget&, QKeyEvent*); // mouse events are always accepted - static inline void handleMousePressEvent(const Qt5Frame&, QMouseEvent*); - static inline void handleMouseReleaseEvent(const Qt5Frame&, QMouseEvent*); + static inline void handleMousePressEvent(const Qt5Frame&, const QMouseEvent*); + static inline void handleMouseReleaseEvent(const Qt5Frame&, const QMouseEvent*); }; bool Qt5Widget::handleKeyReleaseEvent(Qt5Frame& rFrame, const QWidget& rWidget, QKeyEvent* pEvent) @@ -90,12 +90,12 @@ bool Qt5Widget::handleKeyReleaseEvent(Qt5Frame& rFrame, const QWidget& rWidget, return handleKeyEvent(rFrame, rWidget, pEvent, ButtonKeyState::Released); } -void Qt5Widget::handleMousePressEvent(const Qt5Frame& rFrame, QMouseEvent* pEvent) +void Qt5Widget::handleMousePressEvent(const Qt5Frame& rFrame, const QMouseEvent* pEvent) { handleMouseButtonEvent(rFrame, pEvent, ButtonKeyState::Pressed); } -void Qt5Widget::handleMouseReleaseEvent(const Qt5Frame& rFrame, QMouseEvent* pEvent) +void Qt5Widget::handleMouseReleaseEvent(const Qt5Frame& rFrame, const QMouseEvent* pEvent) { handleMouseButtonEvent(rFrame, pEvent, ButtonKeyState::Released); } diff --git a/vcl/qt5/Qt5FilePicker.cxx b/vcl/qt5/Qt5FilePicker.cxx index 1573f95dd6b5..730d7f142df0 100644 --- a/vcl/qt5/Qt5FilePicker.cxx +++ b/vcl/qt5/Qt5FilePicker.cxx @@ -363,7 +363,7 @@ void SAL_CALL Qt5FilePicker::appendFilterGroup(const OUString& rGroupTitle, } } -uno::Any Qt5FilePicker::handleGetListValue(QComboBox* pWidget, sal_Int16 nControlAction) +uno::Any Qt5FilePicker::handleGetListValue(const QComboBox* pWidget, sal_Int16 nControlAction) { uno::Any aAny; switch (nControlAction) diff --git a/vcl/qt5/Qt5Menu.cxx b/vcl/qt5/Qt5Menu.cxx index 418bda56281f..dd5c9895273e 100644 --- a/vcl/qt5/Qt5Menu.cxx +++ b/vcl/qt5/Qt5Menu.cxx @@ -287,7 +287,7 @@ void Qt5Menu::ResetAllActionGroups() } } -void Qt5Menu::UpdateActionGroupItem(Qt5MenuItem* pSalMenuItem) +void Qt5Menu::UpdateActionGroupItem(const Qt5MenuItem* pSalMenuItem) { QAction* pAction = pSalMenuItem->getAction(); if (!pAction) diff --git a/vcl/qt5/Qt5Widget.cxx b/vcl/qt5/Qt5Widget.cxx index 3450f433a808..8ae77b1a7ed5 100644 --- a/vcl/qt5/Qt5Widget.cxx +++ b/vcl/qt5/Qt5Widget.cxx @@ -120,7 +120,7 @@ void Qt5Widget::resizeEvent(QResizeEvent* pEvent) m_rFrame.CallCallback(SalEvent::Resize, nullptr); } -void Qt5Widget::handleMouseButtonEvent(const Qt5Frame& rFrame, QMouseEvent* pEvent, +void Qt5Widget::handleMouseButtonEvent(const Qt5Frame& rFrame, const QMouseEvent* pEvent, const ButtonKeyState eState) { SalMouseEvent aEvent; diff --git a/vcl/source/bitmap/Octree.cxx b/vcl/source/bitmap/Octree.cxx index 42da9dd2ae7a..e89b1d8c9404 100644 --- a/vcl/source/bitmap/Octree.cxx +++ b/vcl/source/bitmap/Octree.cxx @@ -184,7 +184,7 @@ void Octree::CreatePalette(OctreeNode* pNode) } } -void Octree::GetPalIndex(OctreeNode* pNode) +void Octree::GetPalIndex(const OctreeNode* pNode) { if (pNode->bLeaf) mnPalIndex = pNode->nPalIndex; diff --git a/vcl/source/control/wizardmachine.cxx b/vcl/source/control/wizardmachine.cxx index 5936b0b52bf4..8944725b996b 100644 --- a/vcl/source/control/wizardmachine.cxx +++ b/vcl/source/control/wizardmachine.cxx @@ -1606,7 +1606,7 @@ namespace vcl } } - void WizardMachine::RemovePage(BuilderPage* pPage) + void WizardMachine::RemovePage(const BuilderPage* pPage) { WizPageData* pPrevPageData = nullptr; WizPageData* pPageData = m_pFirstPage; diff --git a/vcl/source/gdi/TypeSerializer.cxx b/vcl/source/gdi/TypeSerializer.cxx index 264a25096756..a54f3558c7ef 100644 --- a/vcl/source/gdi/TypeSerializer.cxx +++ b/vcl/source/gdi/TypeSerializer.cxx @@ -63,7 +63,7 @@ void TypeSerializer::readGradient(Gradient& rGradient) rGradient.SetSteps(nStepCount); } -void TypeSerializer::writeGradient(Gradient& rGradient) +void TypeSerializer::writeGradient(const Gradient& rGradient) { VersionCompat aCompat(mrStream, StreamMode::WRITE, 1); |