| 20 | const QString ShellPool::CLOSE_LISTENER = "close listener"; //$NON-NLS-1$ |
| 21 | |
| 22 | void ShellPool::ShellClosed(const ShellEvent::Pointer& e) |
| 23 | { |
| 24 | |
| 25 | if (e->doit) |
| 26 | { |
| 27 | Shell::Pointer s = e->GetSource(); |
| 28 | IShellListener* l = s->GetExtraShellListener(); |
| 29 | |
| 30 | if (l != nullptr) |
| 31 | { |
| 32 | s->SetExtraShellListener(nullptr); |
| 33 | l->ShellClosed(e); |
| 34 | |
| 35 | // The shell can 'cancel' the close by setting |
| 36 | // the 'doit' to false...if so, do nothing |
| 37 | if (e->doit) |
| 38 | { |
| 39 | availableShells.push_back(s); |
| 40 | s->SetVisible(false); |
| 41 | } |
| 42 | else |
| 43 | { |
| 44 | // Restore the listener |
| 45 | s->SetExtraShellListener(l); |
| 46 | } |
| 47 | } |
| 48 | } |
| 49 | e->doit = false; |
| 50 | } |
| 51 | |
| 52 | ShellPool::ShellPool(Shell::Pointer parentShell, int childFlags) : |
| 53 | flags(childFlags), parentShell(parentShell) |
nothing calls this directly
no test coverage detected