| 422 | } |
| 423 | |
| 424 | bool NotepadNextApplication::event(QEvent *event) |
| 425 | { |
| 426 | // Handle the QFileOpenEvent to open files on MacOS X. |
| 427 | if (event->type() == QEvent::FileOpen) { |
| 428 | QFileOpenEvent *fileOpenEvent = static_cast<QFileOpenEvent*>(event); |
| 429 | |
| 430 | qInfo("QFileOpenEvent %s", qUtf8Printable(fileOpenEvent->file())); |
| 431 | |
| 432 | openFiles(QStringList() << fileOpenEvent->file()); |
| 433 | |
| 434 | return true; |
| 435 | } |
| 436 | |
| 437 | return SingleApplication::event(event); |
| 438 | } |
| 439 | |
| 440 | void NotepadNextApplication::openFiles(const QStringList &files) |
| 441 | { |
nothing calls this directly
no outgoing calls
no test coverage detected