plasma: mark launcher applet method as const

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2024-04-18 22:34:00 +03:00
parent c086db63ba
commit bca37f3d5b

View file

@ -192,7 +192,7 @@ protected:
private: private:
void animateFadeIn(Plasma::Animation *animation, Plasma::ToolButton *toolbutton); void animateFadeIn(Plasma::Animation *animation, Plasma::ToolButton *toolbutton);
void animateFadeOut(Plasma::Animation *animation, Plasma::ToolButton *toolbutton); void animateFadeOut(Plasma::Animation *animation, Plasma::ToolButton *toolbutton);
bool handleMouseEvent(QGraphicsSceneMouseEvent *event); bool handleMouseEvent(QGraphicsSceneMouseEvent *event) const;
QGraphicsLinearLayout* m_layout; QGraphicsLinearLayout* m_layout;
Plasma::IconWidget* m_iconwidget; Plasma::IconWidget* m_iconwidget;
@ -470,7 +470,7 @@ void LauncherWidget::animateFadeOut(Plasma::Animation *animation, Plasma::ToolBu
animation->start(QAbstractAnimation::KeepWhenStopped); animation->start(QAbstractAnimation::KeepWhenStopped);
} }
bool LauncherWidget::handleMouseEvent(QGraphicsSceneMouseEvent *event) bool LauncherWidget::handleMouseEvent(QGraphicsSceneMouseEvent *event) const
{ {
if (event->buttons() & Qt::LeftButton && if (event->buttons() & Qt::LeftButton &&
(event->pos() - event->buttonDownPos(Qt::LeftButton)).manhattanLength() > KGlobalSettings::dndEventDelay()) (event->pos() - event->buttonDownPos(Qt::LeftButton)).manhattanLength() > KGlobalSettings::dndEventDelay())