mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Fix circle settings crash regression
This commit is contained in:
parent
334bc1ab17
commit
d4acf29fc0
|
@ -25,7 +25,7 @@
|
|||
#include "src/core/corestructs.h"
|
||||
#include "core/toxid.h"
|
||||
|
||||
struct FriendWidget;
|
||||
class FriendWidget;
|
||||
class ChatForm;
|
||||
|
||||
class Friend : public QObject
|
||||
|
|
|
@ -368,7 +368,7 @@ private:
|
|||
QString alias;
|
||||
QString addr;
|
||||
QString autoAcceptDir;
|
||||
int circleIndex;
|
||||
int circleIndex = -1;
|
||||
};
|
||||
|
||||
struct circleProp
|
||||
|
|
|
@ -60,14 +60,11 @@ void FriendListWidget::addGroupWidget(GroupWidget *widget)
|
|||
|
||||
void FriendListWidget::addFriendWidget(FriendWidget *w, Status s, int circleIndex)
|
||||
{
|
||||
if (circleIndex == -1)
|
||||
CircleWidget* circleWidget = CircleWidget::getFromID(circleIndex);
|
||||
if (circleWidget == nullptr)
|
||||
moveWidget(w, s, true);
|
||||
else
|
||||
{
|
||||
CircleWidget::getFromID(circleIndex)->addFriendWidget(w, s);
|
||||
CircleWidget::getFromID(circleIndex)->show();
|
||||
//w->setParent(CircleWidget::getFromID(circleIndex));
|
||||
}
|
||||
circleWidget->addFriendWidget(w, s);
|
||||
}
|
||||
|
||||
void FriendListWidget::addCircleWidget(int id)
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
class QPixmap;
|
||||
class MaskablePixmapWidget;
|
||||
|
||||
struct FriendWidget final : public GenericChatroomWidget
|
||||
class FriendWidget : public GenericChatroomWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
@ -51,8 +51,8 @@ public slots:
|
|||
void setAlias(const QString& alias);
|
||||
|
||||
protected:
|
||||
virtual void mousePressEvent(QMouseEvent* ev) final override;
|
||||
virtual void mouseMoveEvent(QMouseEvent* ev) final override;
|
||||
virtual void mousePressEvent(QMouseEvent* ev) override;
|
||||
virtual void mouseMoveEvent(QMouseEvent* ev) override;
|
||||
void setFriendAlias();
|
||||
void showEvent(QShowEvent *)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user