| 1202 | } |
| 1203 | |
| 1204 | void MainWindow::reloadFile() |
| 1205 | { |
| 1206 | auto editor = currentEditor(); |
| 1207 | |
| 1208 | if (!editor->isFile() && !editor->isSavedToDisk()) { |
| 1209 | return; |
| 1210 | } |
| 1211 | |
| 1212 | const QString filePath = editor->getFilePath(); |
| 1213 | auto reply = QMessageBox::question(this, tr("Reload File"), tr("Are you sure you want to reload <b>%1</b>? Any unsaved changes will be lost.").arg(filePath)); |
| 1214 | |
| 1215 | if (reply == QMessageBox::Yes) { |
| 1216 | editor->reload(); |
| 1217 | } |
| 1218 | } |
| 1219 | |
| 1220 | void MainWindow::closeCurrentFile() |
| 1221 | { |
nothing calls this directly
no test coverage detected