emit statusChanged when it closes

This commit is contained in:
Marco Martin 2014-04-08 19:02:33 +02:00
parent a0dc83699d
commit 9a9d85c5e9

View File

@ -32,6 +32,10 @@ QMenuProxy::QMenuProxy (QObject *parent)
{
m_menu = new QMenu(0);
connect(m_menu, &QMenu::triggered, this, &QMenuProxy::itemTriggered);
connect(m_menu, &QMenu::aboutToHide, [=]() {
m_status = DialogStatus::Closed;
emit statusChanged();
});
}
QMenuProxy::~QMenuProxy()
@ -200,8 +204,6 @@ void QMenuProxy::open(int x, int y)
void QMenuProxy::close()
{
m_menu->hide();
m_status = DialogStatus::Closed;
emit statusChanged();
}
#include "qmenu.moc"