mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
fixed infinite recursion under certain conditions
This commit is contained in:
parent
c4529d4062
commit
87132389aa
|
@ -52,6 +52,11 @@ Widget::Widget(QWidget *parent)
|
|||
: QMainWindow(parent),
|
||||
ui(new Ui::MainWindow),
|
||||
activeChatroomWidget{nullptr}
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void Widget::init()
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
|
@ -214,7 +219,10 @@ Widget::~Widget()
|
|||
Widget* Widget::getInstance()
|
||||
{
|
||||
if (!instance)
|
||||
{
|
||||
instance = new Widget();
|
||||
instance->init();
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
@ -465,7 +473,6 @@ void Widget::setUsername(const QString& username)
|
|||
{
|
||||
ui->nameLabel->setText(username);
|
||||
ui->nameLabel->setToolTip(username); // for overlength names
|
||||
settingsWidget->getIdentityForm()->setUserName(username);
|
||||
}
|
||||
|
||||
void Widget::onStatusMessageChanged(const QString& newStatusMessage, const QString& oldStatusMessage)
|
||||
|
@ -479,7 +486,6 @@ void Widget::setStatusMessage(const QString &statusMessage)
|
|||
{
|
||||
ui->statusLabel->setText(statusMessage);
|
||||
ui->statusLabel->setToolTip(statusMessage); // for overlength messsages
|
||||
settingsWidget->getIdentityForm()->setStatusMessage(statusMessage);
|
||||
}
|
||||
|
||||
void Widget::addFriend(int friendId, const QString &userId)
|
||||
|
|
|
@ -54,6 +54,7 @@ public:
|
|||
QThread* getCoreThread();
|
||||
Camera* getCamera();
|
||||
static Widget* getInstance();
|
||||
void init();
|
||||
void newMessageAlert();
|
||||
bool isFriendWidgetCurActiveWidget(Friend* f);
|
||||
bool getIsWindowMinimized();
|
||||
|
|
Loading…
Reference in New Issue
Block a user