MCPcopy Create free account
hub / github.com/FreeCAD/FreeCAD / activateFile

Method activateFile

src/Gui/Action.cpp:1015–1032  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1013}
1014
1015void RecentFilesAction::activateFile(int id)
1016{
1017 // restore the list of recent files
1018 QStringList files = this->files();
1019 if (id < 0 || id >= files.count()) {
1020 return; // no valid item
1021 }
1022
1023 QString filename = files[id];
1024 if (!ModuleIO::verifyFile(filename)) {
1025 files.removeAll(filename);
1026 setFiles(files);
1027 save();
1028 }
1029 else {
1030 ModuleIO::openFile(filename);
1031 }
1032}
1033
1034void RecentFilesAction::resizeList(int size)
1035{

Callers 1

activatedMethod · 0.80

Calls 15

filesMethod · 0.95
iconFromThemeMethod · 0.80
appendRecentMacroMethod · 0.80
macroManagerMethod · 0.80
activeDocumentMethod · 0.80
getMainWindowFunction · 0.70
saveFunction · 0.50
countMethod · 0.45
removeAllMethod · 0.45
setDisplayNameMethod · 0.45
openMethod · 0.45
resizeMethod · 0.45

Tested by

no test coverage detected