MCPcopy Create free account
hub / github.com/Martchus/syncthingtray / SyncthingMenuAction

Method SyncthingMenuAction

fileitemactionplugin/syncthingmenuaction.cpp:22–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20using namespace Data;
21
22SyncthingMenuAction::SyncthingMenuAction(const KFileItemListProperties &properties, const QList<QAction *> &actions, QWidget *parentWidget)
23 : QAction(parentWidget)
24 , m_properties(properties)
25 , m_notifier(SyncthingFileItemAction::staticData().connection())
26 , m_parentWidget(parentWidget)
27{
28#ifdef CPP_UTILITIES_DEBUG_BUILD
29 std::cerr << EscapeCodes::Phrases::Info << "Creating SyncthingMenuAction: " << this << EscapeCodes::Phrases::EndFlush;
30#endif
31
32 // init according to current state
33 createMenu(actions);
34 updateActionStatus();
35
36 // setup handling future state change
37 m_notifier.setEnabledNotifications(SyncthingHighLevelNotification::ConnectedDisconnected);
38 connect(&m_notifier, &SyncthingNotifier::connected, this, &SyncthingMenuAction::handleConnectedChanged);
39 connect(&m_notifier, &SyncthingNotifier::disconnected, this, &SyncthingMenuAction::handleConnectedChanged);
40}
41
42#ifdef CPP_UTILITIES_DEBUG_BUILD
43SyncthingMenuAction::~SyncthingMenuAction()

Callers

nothing calls this directly

Calls 2

connectionMethod · 0.80

Tested by

no test coverage detected