MCPcopy Create free account
hub / github.com/OpenMS/OpenMS / add

Method add

src/openms_gui/source/VISUAL/RecentFilesMenu.cpp:95–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93 }
94
95 void RecentFilesMenu::add(const String& filename)
96 {
97 // find out absolute path
98 String tmp = File::absolutePath(filename);
99
100 // remove the new file if already in the recent list and prepend it
101 recent_files_.removeAll(tmp.toQString());
102 recent_files_.prepend(tmp.toQString());
103
104 // remove those files exceeding the defined number
105 while (recent_files_.size() > max_entries_)
106 {
107 recent_files_.removeLast();
108 }
109 sync_();
110 }
111
112 void RecentFilesMenu::itemClicked_()
113 {

Callers

nothing calls this directly

Calls 3

removeAllMethod · 0.45
toQStringMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected