| 75 | #ifdef Q_OS_MAC |
| 76 | |
| 77 | static void openfile(QString filePath) |
| 78 | { |
| 79 | |
| 80 | qlonglong winId; |
| 81 | shared.lock(); |
| 82 | memcpy(&winId,shared.data(),sizeof(qlonglong)); |
| 83 | shared.unlock(); |
| 84 | |
| 85 | QWidget *pMain = QWidget::find((WId)winId); |
| 86 | CCNotePad* pNotePad = dynamic_cast<CCNotePad*>(pMain); |
| 87 | if(pNotePad != nullptr) |
| 88 | { |
| 89 | if(!filePath.isEmpty()) |
| 90 | { |
| 91 | pNotePad->openFile(filePath); |
| 92 | } |
| 93 | pNotePad->activateWindow(); |
| 94 | pNotePad->showNormal(); |
| 95 | } |
| 96 | } |
| 97 | |
| 98 | class MyApplication : public QApplication |
| 99 | { |