The icon dialog can now be closed on request
This commit is contained in:
parent
f53a976ae7
commit
04bf0ddaed
@ -57,6 +57,14 @@ QString IconDialog::openDialog()
|
||||
return dialog->openDialog();
|
||||
}
|
||||
|
||||
void IconDialog::closeDialog()
|
||||
{
|
||||
if (d->dialog) {
|
||||
auto dialog = d->dialog.instance();
|
||||
dialog->close();
|
||||
}
|
||||
}
|
||||
|
||||
IconDialog::~IconDialog()
|
||||
{
|
||||
}
|
||||
|
@ -47,6 +47,7 @@ public:
|
||||
~IconDialog();
|
||||
|
||||
Q_INVOKABLE QString openDialog();
|
||||
Q_INVOKABLE void closeDialog();
|
||||
|
||||
private:
|
||||
D_PTR;
|
||||
|
@ -41,6 +41,11 @@ public:
|
||||
return ptr;
|
||||
}
|
||||
|
||||
operator bool() const
|
||||
{
|
||||
return !s_instance.expired();
|
||||
}
|
||||
|
||||
private:
|
||||
static std::weak_ptr<Target> s_instance;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user