1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

refactor(callconfirm): Remove unused friend parameter

This commit is contained in:
Diadlo 2017-10-26 09:00:38 +03:00
parent 25ab974f1e
commit 3c8bf628bd
No known key found for this signature in database
GPG Key ID: 5AF9F2E29107C727
3 changed files with 4 additions and 10 deletions

View File

@ -335,7 +335,7 @@ void ChatForm::onAvInvite(uint32_t friendId, bool video)
return; return;
} }
callConfirm = new CallConfirmWidget(video ? videoButton : callButton, *f); callConfirm = new CallConfirmWidget(video ? videoButton : callButton);
QString displayedName = f->getDisplayedName(); QString displayedName = f->getDisplayedName();
insertChatMessage(ChatMessage::createChatInfoMessage(tr("%1 calling").arg(displayedName), insertChatMessage(ChatMessage::createChatInfoMessage(tr("%1 calling").arg(displayedName),
ChatMessage::INFO, ChatMessage::INFO,

View File

@ -41,9 +41,6 @@
* @var const QWidget* CallConfirmWidget::anchor * @var const QWidget* CallConfirmWidget::anchor
* @brief The widget we're going to be tracking * @brief The widget we're going to be tracking
* *
* @var const Friend& CallConfirmWidget::f
* @brief The friend on whose chat form we should appear
*
* @var const int CallConfirmWidget::roundedFactor * @var const int CallConfirmWidget::roundedFactor
* @brief By how much are the corners of the main rect rounded * @brief By how much are the corners of the main rect rounded
* *
@ -51,10 +48,9 @@
* @brief Used to correct the rounding factors on non-square rects * @brief Used to correct the rounding factors on non-square rects
*/ */
CallConfirmWidget::CallConfirmWidget(const QWidget* Anchor, const Friend& f) CallConfirmWidget::CallConfirmWidget(const QWidget* anchor)
: QWidget() : QWidget()
, anchor(Anchor) , anchor(anchor)
, f(f)
, rectW{120} , rectW{120}
, rectH{85} , rectH{85}
, spikeW{30} , spikeW{30}

View File

@ -28,13 +28,12 @@
class QPaintEvent; class QPaintEvent;
class QShowEvent; class QShowEvent;
class Friend;
class CallConfirmWidget final : public QWidget class CallConfirmWidget final : public QWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
explicit CallConfirmWidget(const QWidget* Anchor, const Friend& f); explicit CallConfirmWidget(const QWidget* anchor);
signals: signals:
void accepted(); void accepted();
@ -51,7 +50,6 @@ protected:
private: private:
const QWidget* anchor; const QWidget* anchor;
const Friend& f;
QRect mainRect; QRect mainRect;
QPolygon spikePoly; QPolygon spikePoly;