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;
}
callConfirm = new CallConfirmWidget(video ? videoButton : callButton, *f);
callConfirm = new CallConfirmWidget(video ? videoButton : callButton);
QString displayedName = f->getDisplayedName();
insertChatMessage(ChatMessage::createChatInfoMessage(tr("%1 calling").arg(displayedName),
ChatMessage::INFO,

View File

@ -41,9 +41,6 @@
* @var const QWidget* CallConfirmWidget::anchor
* @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
* @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
*/
CallConfirmWidget::CallConfirmWidget(const QWidget* Anchor, const Friend& f)
CallConfirmWidget::CallConfirmWidget(const QWidget* anchor)
: QWidget()
, anchor(Anchor)
, f(f)
, anchor(anchor)
, rectW{120}
, rectH{85}
, spikeW{30}

View File

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