MCPcopy Create free account
hub / github.com/PlotJuggler/PlotJuggler / rebuildMenu

Method rebuildMenu

pj_widgets/src/RecentFilesMenu.cpp:61–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59}
60
61void RecentFilesMenu::rebuildMenu() {
62 menu_->clear();
63 for (const QString& path : files_) {
64 QAction* action = menu_->addAction(path);
65 connect(action, &QAction::triggered, this, [this, path]() { emit activated(path); });
66 }
67 if (!files_.isEmpty()) {
68 menu_->addSeparator();
69 menu_->addAction(clear_action_);
70 }
71}
72
73void RecentFilesMenu::persist() const {
74 QSettings().setValue(kSettingsKey, files_);

Callers

nothing calls this directly

Calls 2

clearMethod · 0.45
isEmptyMethod · 0.45

Tested by

no test coverage detected