From 7c2c6c56d07194daa4e4c3a8b5688283f6274d17 Mon Sep 17 00:00:00 2001 From: laserpants Date: Tue, 29 Mar 2016 23:46:50 +0300 Subject: [PATCH] give sensible names to slots --- components/toggle.cpp | 8 ++++---- components/toggle.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/components/toggle.cpp b/components/toggle.cpp index bae481b..2005130 100644 --- a/components/toggle.cpp +++ b/components/toggle.cpp @@ -108,8 +108,8 @@ Toggle::Toggle(QWidget *parent) _thumb->installEventFilter(this); connect(_thumb, SIGNAL(clicked()), this, SLOT(toggle())); - connect(_thumb, SIGNAL(clicked()), this, SLOT(xx())); - connect(_thumb, SIGNAL(progressChanged(qreal)), this, SLOT(yy())); + connect(_thumb, SIGNAL(clicked()), this, SLOT(addRipple())); + connect(_thumb, SIGNAL(progressChanged(qreal)), this, SLOT(updateOverlayGeometry())); } Toggle::~Toggle() @@ -130,7 +130,7 @@ void Toggle::setOrientation(Qt::Orientation orientation) _orientation = orientation; } -void Toggle::xx() +void Toggle::addRipple() { if (Qt::Horizontal == _orientation) { const int d = height()/2; @@ -143,7 +143,7 @@ void Toggle::xx() } } -void Toggle::yy() +void Toggle::updateOverlayGeometry() { const int d = _thumb->offset(); diff --git a/components/toggle.h b/components/toggle.h index b82e782..32b633e 100644 --- a/components/toggle.h +++ b/components/toggle.h @@ -53,8 +53,8 @@ public: void setOrientation(Qt::Orientation orientation); protected slots: - void xx(); - void yy(); + void addRipple(); + void updateOverlayGeometry(); protected: bool event(QEvent *event) Q_DECL_OVERRIDE;