MCPcopy Create free account
hub / github.com/dail8859/NotepadNext / reloadFile

Method reloadFile

src/dialogs/MainWindow.cpp:1204–1218  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1202}
1203
1204void 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
1220void MainWindow::closeCurrentFile()
1221{

Callers

nothing calls this directly

Calls 4

isFileMethod · 0.80
isSavedToDiskMethod · 0.80
getFilePathMethod · 0.80
reloadMethod · 0.80

Tested by

no test coverage detected