|
|
@ -37,8 +37,9 @@ extern void qt_mac_set_dock_menu(QMenu*); |
|
|
|
Q_UNUSED(event) |
|
|
|
Q_UNUSED(event) |
|
|
|
Q_UNUSED(replyEvent) |
|
|
|
Q_UNUSED(replyEvent) |
|
|
|
|
|
|
|
|
|
|
|
if (dockIconHandler) |
|
|
|
if (dockIconHandler) { |
|
|
|
dockIconHandler->handleDockIconClickEvent(); |
|
|
|
dockIconHandler->handleDockIconClickEvent(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@end |
|
|
|
@end |
|
|
@ -54,10 +55,15 @@ MacDockIconHandler::MacDockIconHandler() : QObject() |
|
|
|
[pool release]; |
|
|
|
[pool release]; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void MacDockIconHandler::setMainWindow(QMainWindow *window) { |
|
|
|
|
|
|
|
this->mainWindow = window; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
MacDockIconHandler::~MacDockIconHandler() |
|
|
|
MacDockIconHandler::~MacDockIconHandler() |
|
|
|
{ |
|
|
|
{ |
|
|
|
[this->m_dockIconClickEventHandler release]; |
|
|
|
[this->m_dockIconClickEventHandler release]; |
|
|
|
delete this->m_dummyWidget; |
|
|
|
delete this->m_dummyWidget; |
|
|
|
|
|
|
|
this->setMainWindow(NULL); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
QMenu *MacDockIconHandler::dockMenu() |
|
|
|
QMenu *MacDockIconHandler::dockMenu() |
|
|
@ -94,5 +100,8 @@ MacDockIconHandler *MacDockIconHandler::instance() |
|
|
|
|
|
|
|
|
|
|
|
void MacDockIconHandler::handleDockIconClickEvent() |
|
|
|
void MacDockIconHandler::handleDockIconClickEvent() |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
this->mainWindow->activateWindow(); |
|
|
|
|
|
|
|
this->mainWindow->show(); |
|
|
|
|
|
|
|
|
|
|
|
emit this->dockIconClicked(); |
|
|
|
emit this->dockIconClicked(); |
|
|
|
} |
|
|
|
} |
|
|
|