vcl/inc/qt5/QtFrame.hxx | 4 ++-- vcl/inc/qt5/QtGraphicsBase.hxx | 2 +- vcl/inc/qt5/QtInstanceAssistant.hxx | 2 +- vcl/inc/qt5/QtInstanceButton.hxx | 2 +- vcl/inc/qt5/QtInstanceDialog.hxx | 2 +- vcl/inc/qt5/QtInstanceIconView.hxx | 2 +- vcl/inc/qt5/QtWidget.hxx | 4 ++-- vcl/qt5/QtFrame.cxx | 4 ++-- vcl/qt5/QtGraphicsBase.cxx | 2 +- vcl/qt5/QtInstanceAssistant.cxx | 2 +- vcl/qt5/QtInstanceButton.cxx | 2 +- vcl/qt5/QtInstanceDialog.cxx | 2 +- vcl/qt5/QtInstanceIconView.cxx | 2 +- vcl/qt5/QtWidget.cxx | 5 +++-- 14 files changed, 19 insertions(+), 18 deletions(-)
New commits: commit fa1ce426bd578d0f20468cf4e864f69e2de4bcf1 Author: Noel Grandin <[email protected]> AuthorDate: Fri Mar 28 11:48:54 2025 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Fri Mar 28 17:02:55 2025 +0100 loplugin:constparam in vcl Change-Id: Iec5eb0c8179a8f84c24c9987fe7054bc7cb3a85d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183442 Tested-by: Jenkins Reviewed-by: Noel Grandin <[email protected]> diff --git a/vcl/inc/qt5/QtFrame.hxx b/vcl/inc/qt5/QtFrame.hxx index 4d1c0fd02cd5..0b3997f748b2 100644 --- a/vcl/inc/qt5/QtFrame.hxx +++ b/vcl/inc/qt5/QtFrame.hxx @@ -170,8 +170,8 @@ public: void handleDragMove(QDragMoveEvent* pEvent); void handleDrop(QDropEvent* pEvent); void handleMoveEvent(QMoveEvent* pEvent); - void handlePaintEvent(QPaintEvent* pEvent, QWidget* pWidget); - void handleResizeEvent(QResizeEvent* pEvent); + void handlePaintEvent(const QPaintEvent* pEvent, QWidget* pWidget); + void handleResizeEvent(const QResizeEvent* pEvent); virtual void SetExtendedFrameStyle(SalExtStyle nExtStyle) override; virtual void Show(bool bVisible, bool bNoActivate = false) override; diff --git a/vcl/inc/qt5/QtGraphicsBase.hxx b/vcl/inc/qt5/QtGraphicsBase.hxx index 55f97cf47872..9ca0f4fc9bff 100644 --- a/vcl/inc/qt5/QtGraphicsBase.hxx +++ b/vcl/inc/qt5/QtGraphicsBase.hxx @@ -33,7 +33,7 @@ public: qreal devicePixelRatioF() const { return m_fDPR; } protected: - static void ImplGetResolution(QtFrame* pFrame, sal_Int32& rDPIX, sal_Int32& rDPIY); + static void ImplGetResolution(const QtFrame* pFrame, sal_Int32& rDPIX, sal_Int32& rDPIY); }; /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/vcl/inc/qt5/QtInstanceAssistant.hxx b/vcl/inc/qt5/QtInstanceAssistant.hxx index dbdac1445870..31644c2a6abe 100644 --- a/vcl/inc/qt5/QtInstanceAssistant.hxx +++ b/vcl/inc/qt5/QtInstanceAssistant.hxx @@ -61,7 +61,7 @@ private: QWizardPage* page(int nPageIndex) const; // get/set the page index as used in the weld::Assistant API - static int pageIndex(QWizardPage& rPage); + static int pageIndex(const QWizardPage& rPage); static void setPageIndex(QWizardPage& rPage, int nIndex); }; diff --git a/vcl/inc/qt5/QtInstanceButton.hxx b/vcl/inc/qt5/QtInstanceButton.hxx index d79be468c4c0..09c797d557fd 100644 --- a/vcl/inc/qt5/QtInstanceButton.hxx +++ b/vcl/inc/qt5/QtInstanceButton.hxx @@ -34,7 +34,7 @@ public: // whether a custom click handler is set for the given button // (s.a. weld::Button::is_custom_handler_set which would give the // same result if called on the corresponding QtInstanceButton) - static bool hasCustomClickHandler(QAbstractButton& rButton); + static bool hasCustomClickHandler(const QAbstractButton& rButton); protected: QAbstractButton& getButton() const; diff --git a/vcl/inc/qt5/QtInstanceDialog.hxx b/vcl/inc/qt5/QtInstanceDialog.hxx index dfc2ae8cdf9f..72f97ef0f1ac 100644 --- a/vcl/inc/qt5/QtInstanceDialog.hxx +++ b/vcl/inc/qt5/QtInstanceDialog.hxx @@ -62,7 +62,7 @@ public: virtual std::unique_ptr<weld::Container> weld_content_area() override; - static QDialogButtonBox* findButtonBox(QDialog* pDialog); + static QDialogButtonBox* findButtonBox(const QDialog* pDialog); static void handleButtonClick(QDialog& rDialog, QAbstractButton& rButton); /** diff --git a/vcl/inc/qt5/QtInstanceIconView.hxx b/vcl/inc/qt5/QtInstanceIconView.hxx index 6bc4aed56a7b..274d92ab8886 100644 --- a/vcl/inc/qt5/QtInstanceIconView.hxx +++ b/vcl/inc/qt5/QtInstanceIconView.hxx @@ -79,7 +79,7 @@ private: QModelIndex modelIndex(const weld::TreeIter& rIter) const; static int position(const weld::TreeIter& rIter); - bool handleToolTipEvent(QHelpEvent* pEvent); + bool handleToolTipEvent(const QHelpEvent* pEvent); private Q_SLOTS: void handleActivated(); diff --git a/vcl/inc/qt5/QtWidget.hxx b/vcl/inc/qt5/QtWidget.hxx index 9284cf401f2d..0f7029d5482d 100644 --- a/vcl/inc/qt5/QtWidget.hxx +++ b/vcl/inc/qt5/QtWidget.hxx @@ -44,9 +44,9 @@ class QtWidget : public QWidget int m_nDeltaY; static void commitText(QtFrame&, const QString& aText); - static void deleteReplacementText(QtFrame& rFrame, int nReplacementStart, + static void deleteReplacementText(const QtFrame& rFrame, int nReplacementStart, int nReplacementLength); - static bool handleGestureEvent(QtFrame& rFrame, QGestureEvent* pGestureEvent); + static bool handleGestureEvent(const QtFrame& rFrame, QGestureEvent* pGestureEvent); static bool handleKeyEvent(QtFrame&, const QWidget&, QKeyEvent*); static void handleMouseEnterLeaveEvents(const QtFrame&, QEvent*); static void fillSalAbstractMouseEvent(const QtFrame& rFrame, const QInputEvent* pQEvent, diff --git a/vcl/qt5/QtFrame.cxx b/vcl/qt5/QtFrame.cxx index ff20afa94363..4511ca814814 100644 --- a/vcl/qt5/QtFrame.cxx +++ b/vcl/qt5/QtFrame.cxx @@ -1556,7 +1556,7 @@ void QtFrame::handleDragLeave() void QtFrame::handleMoveEvent(QMoveEvent*) { CallCallback(SalEvent::Move, nullptr); } -void QtFrame::handlePaintEvent(QPaintEvent* pEvent, QWidget* pWidget) +void QtFrame::handlePaintEvent(const QPaintEvent* pEvent, QWidget* pWidget) { QPainter p(pWidget); if (!m_bNullRegion) @@ -1581,7 +1581,7 @@ void QtFrame::handlePaintEvent(QPaintEvent* pEvent, QWidget* pWidget) p.drawImage(pEvent->rect(), aImage, source); } -void QtFrame::handleResizeEvent(QResizeEvent* pEvent) +void QtFrame::handleResizeEvent(const QResizeEvent* pEvent) { const qreal fRatio = devicePixelRatioF(); const int nWidth = ceil(pEvent->size().width() * fRatio); diff --git a/vcl/qt5/QtGraphicsBase.cxx b/vcl/qt5/QtGraphicsBase.cxx index e285e2af4e9e..d3fd462e605a 100644 --- a/vcl/qt5/QtGraphicsBase.cxx +++ b/vcl/qt5/QtGraphicsBase.cxx @@ -14,7 +14,7 @@ #include <o3tl/string_view.hxx> -void QtGraphicsBase::ImplGetResolution(QtFrame* pFrame, sal_Int32& rDPIX, sal_Int32& rDPIY) +void QtGraphicsBase::ImplGetResolution(const QtFrame* pFrame, sal_Int32& rDPIX, sal_Int32& rDPIY) { char* pForceDpi; if ((pForceDpi = getenv("SAL_FORCEDPI"))) diff --git a/vcl/qt5/QtInstanceAssistant.cxx b/vcl/qt5/QtInstanceAssistant.cxx index 2f04d0887f89..92f3ddfde3d8 100644 --- a/vcl/qt5/QtInstanceAssistant.cxx +++ b/vcl/qt5/QtInstanceAssistant.cxx @@ -247,7 +247,7 @@ QWizardPage* QtInstanceAssistant::page(int nPageIndex) const return nullptr; } -int QtInstanceAssistant::pageIndex(QWizardPage& rPage) +int QtInstanceAssistant::pageIndex(const QWizardPage& rPage) { const QVariant aPageProperty = rPage.property(PROPERTY_PAGE_INDEX); assert(aPageProperty.isValid() && aPageProperty.canConvert<int>()); diff --git a/vcl/qt5/QtInstanceButton.cxx b/vcl/qt5/QtInstanceButton.cxx index 67b457174326..5766e1aa02bd 100644 --- a/vcl/qt5/QtInstanceButton.cxx +++ b/vcl/qt5/QtInstanceButton.cxx @@ -87,7 +87,7 @@ void QtInstanceButton::connect_clicked(const Link<Button&, void>& rLink) m_pButton->setProperty(PROPERTY_CLICK_HANDLER_SET, QVariant::fromValue(rLink.IsSet())); } -bool QtInstanceButton::hasCustomClickHandler(QAbstractButton& rButton) +bool QtInstanceButton::hasCustomClickHandler(const QAbstractButton& rButton) { QVariant aProp = rButton.property(PROPERTY_CLICK_HANDLER_SET); if (!aProp.isValid()) diff --git a/vcl/qt5/QtInstanceDialog.cxx b/vcl/qt5/QtInstanceDialog.cxx index 3c49333a9af4..6ee4ca2bdff3 100644 --- a/vcl/qt5/QtInstanceDialog.cxx +++ b/vcl/qt5/QtInstanceDialog.cxx @@ -217,7 +217,7 @@ void QtInstanceDialog::dialogFinished(int nResult) xRunAsyncDialog.reset(); } -QDialogButtonBox* QtInstanceDialog::findButtonBox(QDialog* pDialog) +QDialogButtonBox* QtInstanceDialog::findButtonBox(const QDialog* pDialog) { assert(pDialog); QLayout* pLayout = pDialog->layout(); diff --git a/vcl/qt5/QtInstanceIconView.cxx b/vcl/qt5/QtInstanceIconView.cxx index 068dded10330..d943b508652d 100644 --- a/vcl/qt5/QtInstanceIconView.cxx +++ b/vcl/qt5/QtInstanceIconView.cxx @@ -313,7 +313,7 @@ int QtInstanceIconView::position(const weld::TreeIter& rIter) return aModelIndex.row(); } -bool QtInstanceIconView::handleToolTipEvent(QHelpEvent* pHelpEvent) +bool QtInstanceIconView::handleToolTipEvent(const QHelpEvent* pHelpEvent) { QModelIndex aIndex = m_pListView->indexAt(pHelpEvent->pos()); if (!aIndex.isValid()) diff --git a/vcl/qt5/QtWidget.cxx b/vcl/qt5/QtWidget.cxx index d3cc46d34e05..26276abd3e73 100644 --- a/vcl/qt5/QtWidget.cxx +++ b/vcl/qt5/QtWidget.cxx @@ -429,7 +429,8 @@ void QtWidget::commitText(QtFrame& rFrame, const QString& aText) rFrame.CallCallback(SalEvent::EndExtTextInput, nullptr); } -void QtWidget::deleteReplacementText(QtFrame& rFrame, int nReplacementStart, int nReplacementLength) +void QtWidget::deleteReplacementText(const QtFrame& rFrame, int nReplacementStart, + int nReplacementLength) { // get the surrounding text SolarMutexGuard aGuard; @@ -456,7 +457,7 @@ void QtWidget::deleteReplacementText(QtFrame& rFrame, int nReplacementStart, int rFrame.CallCallback(SalEvent::DeleteSurroundingTextRequest, &aEvt); } -bool QtWidget::handleGestureEvent(QtFrame& rFrame, QGestureEvent* pGestureEvent) +bool QtWidget::handleGestureEvent(const QtFrame& rFrame, QGestureEvent* pGestureEvent) { if (QGesture* pGesture = pGestureEvent->gesture(Qt::PinchGesture)) {
