From b4dd48aaa81e0b7656b1fa7342a918313e192584 Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Tue, 13 Jan 2009 23:08:20 +0000 Subject: some menu improvements git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@744 90c681e8-e032-0410-971d-27865f9a5e38 --- src/qmmpui/generalhandler.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/qmmpui/generalhandler.cpp') diff --git a/src/qmmpui/generalhandler.cpp b/src/qmmpui/generalhandler.cpp index d46c0e0e5..f047745a1 100644 --- a/src/qmmpui/generalhandler.cpp +++ b/src/qmmpui/generalhandler.cpp @@ -110,6 +110,7 @@ void GeneralHandler::executeCommand(const QString &opt_str) void GeneralHandler::addAction(QAction *action, MenuType type) { + connect(action, SIGNAL(destroyed (QObject *)), SLOT(removeAction(QObject*))); switch ((int) type) { case TOOLS_MENU: @@ -175,3 +176,7 @@ GeneralHandler* GeneralHandler::instance() return m_instance; } +void GeneralHandler::removeAction(QObject *action) +{ + removeAction((QAction *) action); +} -- cgit v1.2.3-13-gbd6f