diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2009-01-13 23:08:20 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2009-01-13 23:08:20 +0000 |
| commit | b4dd48aaa81e0b7656b1fa7342a918313e192584 (patch) | |
| tree | b8700de5c9de1775aeb856250256d565ff09e5b2 /src | |
| parent | b7f11a31b836f33c9ed680a04973cdecad605b44 (diff) | |
| download | qmmp-b4dd48aaa81e0b7656b1fa7342a918313e192584.tar.gz qmmp-b4dd48aaa81e0b7656b1fa7342a918313e192584.tar.bz2 qmmp-b4dd48aaa81e0b7656b1fa7342a918313e192584.zip | |
some menu improvements
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@744 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src')
| -rw-r--r-- | src/qmmpui/generalhandler.cpp | 5 | ||||
| -rw-r--r-- | src/qmmpui/generalhandler.h | 3 |
2 files changed, 8 insertions, 0 deletions
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); +} diff --git a/src/qmmpui/generalhandler.h b/src/qmmpui/generalhandler.h index 73386ac0a..5e99bff80 100644 --- a/src/qmmpui/generalhandler.h +++ b/src/qmmpui/generalhandler.h @@ -69,6 +69,9 @@ signals: void exitCalled(); void toggleVisibilityCalled(); +private slots: + void removeAction(QObject *action); + private: QMap <GeneralFactory*, General*> m_generals; CommandLineManager *m_commandLineManager; |
