mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-03-06 13:46:11 -05:00
another try to fix that damn bug
This commit is contained in:
parent
74663509dc
commit
e34ed72ff7
@ -123,22 +123,40 @@ CreateCircleDialog::CreateCircleDialog()
|
|||||||
CreateCircleDialog::~CreateCircleDialog()
|
CreateCircleDialog::~CreateCircleDialog()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
void CreateCircleDialog::closeEvent(QCloseEvent *e)
|
|
||||||
|
bool CreateCircleDialog::tryClose()
|
||||||
{
|
{
|
||||||
if(mIdentitiesLoading || mCircleLoading)
|
if(mIdentitiesLoading || mCircleLoading)
|
||||||
{
|
{
|
||||||
std::cerr << "Close() called. Identities or circle currently loading => not actually closing." << std::endl;
|
std::cerr << "Close() called. Identities or circle currently loading => not actually closing." << std::endl;
|
||||||
mCloseRequested = true;
|
mCloseRequested = true;
|
||||||
e->ignore();
|
return false;
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::cerr << "Close() called. Identities not currently loading => closing." << std::endl;
|
std::cerr << "Close() called. Identities not currently loading => closing." << std::endl;
|
||||||
QDialog::closeEvent(e);
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CreateCircleDialog::accept()
|
||||||
|
{
|
||||||
|
if(tryClose())
|
||||||
|
QDialog::accept();
|
||||||
|
}
|
||||||
|
void CreateCircleDialog::reject()
|
||||||
|
{
|
||||||
|
if(tryClose())
|
||||||
|
QDialog::reject();
|
||||||
|
}
|
||||||
|
|
||||||
|
void CreateCircleDialog::keyPressEvent(QKeyEvent *e)
|
||||||
|
{
|
||||||
|
if(e->key() != Qt::Key_Escape)
|
||||||
|
QDialog::keyPressEvent(e);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void CreateCircleDialog::editExistingId(const RsGxsGroupId &circleId, const bool &clearList /*= true*/,bool readonly)
|
void CreateCircleDialog::editExistingId(const RsGxsGroupId &circleId, const bool &clearList /*= true*/,bool readonly)
|
||||||
{
|
{
|
||||||
/* load this circle */
|
/* load this circle */
|
||||||
|
@ -62,8 +62,11 @@ private slots:
|
|||||||
void MembershipListCustomPopupMenu( QPoint point);
|
void MembershipListCustomPopupMenu( QPoint point);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void closeEvent(QCloseEvent *) override;
|
virtual void keyPressEvent(QKeyEvent *e) override;
|
||||||
|
virtual void accept() override;
|
||||||
|
virtual void reject() override;
|
||||||
|
|
||||||
|
bool tryClose();
|
||||||
private:
|
private:
|
||||||
|
|
||||||
void updateCircleGUI();
|
void updateCircleGUI();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user