Changeset View
Changeset View
Standalone View
Standalone View
src/platformtheme/kdeplatformsystemtrayicon.cpp
Show First 20 Lines • Show All 41 Lines • ▼ Show 20 Line(s) | 39 | { | |||
---|---|---|---|---|---|
42 | } | 42 | } | ||
43 | } | 43 | } | ||
44 | 44 | | |||
45 | QPlatformMenuItem *SystemTrayMenu::createMenuItem() const | 45 | QPlatformMenuItem *SystemTrayMenu::createMenuItem() const | ||
46 | { | 46 | { | ||
47 | return new SystemTrayMenuItem(); | 47 | return new SystemTrayMenuItem(); | ||
48 | } | 48 | } | ||
49 | 49 | | |||
50 | QPlatformMenu *SystemTrayMenu::createSubMenu() const | ||||
51 | { | ||||
52 | return new SystemTrayMenu(); | ||||
53 | } | ||||
54 | | ||||
50 | void SystemTrayMenu::insertMenuItem(QPlatformMenuItem *menuItem, QPlatformMenuItem *before) | 55 | void SystemTrayMenu::insertMenuItem(QPlatformMenuItem *menuItem, QPlatformMenuItem *before) | ||
51 | { | 56 | { | ||
52 | if (SystemTrayMenuItem *ours = qobject_cast<SystemTrayMenuItem*>(menuItem)) { | 57 | if (SystemTrayMenuItem *ours = qobject_cast<SystemTrayMenuItem*>(menuItem)) { | ||
53 | bool inserted = false; | 58 | bool inserted = false; | ||
54 | if (SystemTrayMenuItem *oursBefore = qobject_cast<SystemTrayMenuItem*>(before)) { | 59 | if (SystemTrayMenuItem *oursBefore = qobject_cast<SystemTrayMenuItem*>(before)) { | ||
55 | for (auto it = m_items.begin(); it != m_items.end(); ++it) { | 60 | for (auto it = m_items.begin(); it != m_items.end(); ++it) { | ||
56 | if (*it == oursBefore) { | 61 | if (*it == oursBefore) { | ||
57 | m_items.insert(it, ours); | 62 | m_items.insert(it, ours); | ||
▲ Show 20 Lines • Show All 298 Lines • Show Last 20 Lines |