| 2143 | } |
| 2144 | |
| 2145 | void MainWindow::closeEvent(QCloseEvent *event) |
| 2146 | { |
| 2147 | const SessionManager *sessionManager = app->getSessionManager(); |
| 2148 | QVector<ScintillaNext *> e; |
| 2149 | |
| 2150 | // Check all editors to see if the session manager will not handle it |
| 2151 | for (auto editor : editors()) { |
| 2152 | if (!sessionManager->willFileGetStoredInSession(editor)) { |
| 2153 | e.append(editor); |
| 2154 | } |
| 2155 | } |
| 2156 | |
| 2157 | if (!checkEditorsBeforeClose(e)) { |
| 2158 | event->ignore(); |
| 2159 | return; |
| 2160 | } |
| 2161 | |
| 2162 | emit aboutToClose(); |
| 2163 | |
| 2164 | event->accept(); |
| 2165 | |
| 2166 | QMainWindow::closeEvent(event); |
| 2167 | } |
| 2168 | |
| 2169 | void MainWindow::dragEnterEvent(QDragEnterEvent *event) |
| 2170 | { |
nothing calls this directly
no test coverage detected