MCPcopy Index your code
hub / github.com/Audio4Linux/JDSP4Linux / updateTrayMenu

Method updateTrayMenu

src/interface/TrayIcon.cpp:228–250  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

226}
227
228void TrayIcon::updateTrayMenu(QMenu *menu)
229{
230 if (menu == nullptr)
231 {
232 Log::error("Menu is null");
233 return;
234 }
235
236 trayIcon->hide();
237 trayIcon->deleteLater();
238 // menuOwner->deleteLater();
239 createTrayIcon();
240
241 trayIcon->show();
242 trayIcon->setContextMenu(menu);
243 connect(trayIcon->contextMenu(), &QMenu::aboutToShow, [this]
244 {
245 updatePresetList();
246 updateConvolverList();
247 });
248
249 AppConfig::instance().set(AppConfig::TrayIconMenu, MenuIO::buildString(menu));
250}
251
252bool TrayIcon::isVisible() const
253{

Callers 2

onTrayEditorCommittedMethod · 0.80
onTrayEditorResetMethod · 0.80

Calls 4

connectFunction · 0.85
buildStringFunction · 0.85
hideMethod · 0.80
setMethod · 0.45

Tested by

no test coverage detected