qdbusmenuadaptor.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/platformsupport/dbusmenu/qdbusmenuadaptor.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4QDBusMenuAdaptor::QDBusMenuAdaptor(QDBusPlatformMenu *topLevelMenu)-
5 : QDBusAbstractAdaptor(topLevelMenu)-
6 , m_topLevelMenu(topLevelMenu)-
7{-
8 setAutoRelaySignals(true);-
9}
never executed: end of block
0
10-
11QDBusMenuAdaptor::~QDBusMenuAdaptor()-
12{-
13}-
14-
15QString QDBusMenuAdaptor::status() const-
16{-
17 for (bool qt_category_enabled = qLcMenu().isDebugEnabled(); qt_category_enabled
qt_category_enabledDescription
TRUEnever evaluated
FALSEnever evaluated
; qt_category_enabled = false) QMessageLogger(__FILE__, 73, __PRETTY_FUNCTION__, qLcMenu().categoryName()).debug();
never executed: QMessageLogger(__FILE__, 73, __PRETTY_FUNCTION__, qLcMenu().categoryName()).debug();
0
18 return
never executed: return QLatin1String("normal");
QLatin1String("normal");
never executed: return QLatin1String("normal");
0
19}-
20-
21QString QDBusMenuAdaptor::textDirection() const-
22{-
23 return
never executed: return QLocale().textDirection() == Qt::RightToLeft ? QLatin1String("rtl") : QLatin1String("ltr");
QLocale().textDirection() == Qt::RightToLeft ? QLatin1String("rtl") : QLatin1String("ltr");
never executed: return QLocale().textDirection() == Qt::RightToLeft ? QLatin1String("rtl") : QLatin1String("ltr");
0
24}-
25-
26uint QDBusMenuAdaptor::version() const-
27{-
28 return
never executed: return 4;
4;
never executed: return 4;
0
29}-
30-
31bool QDBusMenuAdaptor::AboutToShow(int id)-
32{-
33 for (bool qt_category_enabled = qLcMenu().isDebugEnabled(); qt_category_enabled
qt_category_enabledDescription
TRUEnever evaluated
FALSEnever evaluated
; qt_category_enabled = false) QMessageLogger(__FILE__, 89, __PRETTY_FUNCTION__, qLcMenu().categoryName()).debug() << id;
never executed: QMessageLogger(__FILE__, 89, __PRETTY_FUNCTION__, qLcMenu().categoryName()).debug() << id;
0
34 if (id == 0
id == 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
35 m_topLevelMenu->aboutToShow();-
36 }
never executed: end of block
else {
0
37 QDBusPlatformMenuItem *item = QDBusPlatformMenuItem::byId(id);-
38 if (item
itemDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
39 const QDBusPlatformMenu *menu = static_cast<const QDBusPlatformMenu *>(item->menu());-
40 if (menu
menuDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
41 const_cast<
never executed: const_cast<QDBusPlatformMenu *>(menu)->aboutToShow();
QDBusPlatformMenu *>(menu)->aboutToShow();
never executed: const_cast<QDBusPlatformMenu *>(menu)->aboutToShow();
0
42 }
never executed: end of block
0
43 }
never executed: end of block
0
44 return
never executed: return false;
false;
never executed: return false;
0
45}-
46-
47QList<int> QDBusMenuAdaptor::AboutToShowGroup(const QList<int> &ids, QList<int> &idErrors)-
48{-
49 for (bool qt_category_enabled = qLcMenu().isDebugEnabled(); qt_category_enabled
qt_category_enabledDescription
TRUEnever evaluated
FALSEnever evaluated
; qt_category_enabled = false) QMessageLogger(__FILE__, 105, __PRETTY_FUNCTION__, qLcMenu().categoryName()).debug() << ids;
never executed: QMessageLogger(__FILE__, 105, __PRETTY_FUNCTION__, qLcMenu().categoryName()).debug() << ids;
0
50 (void)idErrors;-
51 idErrors.clear();-
52 for (QForeachContainer<typename QtPrivate::remove_reference<decltype(ids)>::type> _container_((ids)); _container_.control && _container_.i != _container_.e; ++_container_.i, _container_.control ^= 1) for (int id = *_container_.i; _container_.control; _container_.control = 0)-
53 AboutToShow(id);
never executed: AboutToShow(id);
0
54 return
never executed: return QList<int>();
QList<int>();
never executed: return QList<int>();
0
55}-
56-
57void QDBusMenuAdaptor::Event(int id, const QString &eventId, const QDBusVariant &data, uint timestamp)-
58{-
59 (void)data;-
60 (void)timestamp;-
61 QDBusPlatformMenuItem *item = QDBusPlatformMenuItem::byId(id);-
62 for (bool qt_category_enabled = qLcMenu().isDebugEnabled(); qt_category_enabled
qt_category_enabledDescription
TRUEnever evaluated
FALSEnever evaluated
; qt_category_enabled = false) QMessageLogger(__FILE__, 118, __PRETTY_FUNCTION__, qLcMenu().categoryName()).debug() << id << (item ? item->text() : QLatin1String("")) << eventId;
never executed: QMessageLogger(__FILE__, 118, __PRETTY_FUNCTION__, qLcMenu().categoryName()).debug() << id << (item ? item->text() : QLatin1String("")) << eventId;
0
63 if (item
itemDescription
TRUEnever evaluated
FALSEnever evaluated
&& eventId == QLatin1String("clicked")
eventId == QLa...ing("clicked")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
64 item->trigger();
never executed: item->trigger();
0
65 if (item
itemDescription
TRUEnever evaluated
FALSEnever evaluated
&& eventId == QLatin1String("hovered")
eventId == QLa...ing("hovered")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
66 item->hovered();
never executed: item->hovered();
0
67 if (eventId == QLatin1String("closed")
eventId == QLa...ring("closed")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
68-
69 const QDBusPlatformMenu *menu = nullptr;-
70 if (item
itemDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
71 menu = static_cast<const QDBusPlatformMenu *>(item->menu());
never executed: menu = static_cast<const QDBusPlatformMenu *>(item->menu());
0
72 else if (id == 0
id == 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
73 menu = m_topLevelMenu;
never executed: menu = m_topLevelMenu;
0
74 if (menu
menuDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
75 const_cast<
never executed: const_cast<QDBusPlatformMenu *>(menu)->aboutToHide();
QDBusPlatformMenu *>(menu)->aboutToHide();
never executed: const_cast<QDBusPlatformMenu *>(menu)->aboutToHide();
0
76 }
never executed: end of block
0
77}
never executed: end of block
0
78-
79QList<int> QDBusMenuAdaptor::EventGroup(const QDBusMenuEventList &events)-
80{-
81 for (QForeachContainer<typename QtPrivate::remove_reference<decltype(events)>::type> _container_((events)); _container_.control && _container_.i != _container_.e; ++_container_.i, _container_.control ^= 1) for (const QDBusMenuEvent &ev = *_container_.i; _container_.control; _container_.control = 0)-
82 Event(ev.m_id, ev.m_eventId, ev.m_data, ev.m_timestamp);
never executed: Event(ev.m_id, ev.m_eventId, ev.m_data, ev.m_timestamp);
0
83 return
never executed: return QList<int>();
QList<int>();
never executed: return QList<int>();
0
84}-
85-
86QDBusMenuItemList QDBusMenuAdaptor::GetGroupProperties(const QList<int> &ids, const QStringList &propertyNames)-
87{-
88 for (bool qt_category_enabled = qLcMenu().isDebugEnabled(); qt_category_enabled
qt_category_enabledDescription
TRUEnever evaluated
FALSEnever evaluated
; qt_category_enabled = false) QMessageLogger(__FILE__, 144, __PRETTY_FUNCTION__, qLcMenu().categoryName()).debug() << ids << propertyNames << "=>" << QDBusMenuItem::items(ids, propertyNames);
never executed: QMessageLogger(__FILE__, 144, __PRETTY_FUNCTION__, qLcMenu().categoryName()).debug() << ids << propertyNames << "=>" << QDBusMenuItem::items(ids, propertyNames);
0
89 return
never executed: return QDBusMenuItem::items(ids, propertyNames);
QDBusMenuItem::items(ids, propertyNames);
never executed: return QDBusMenuItem::items(ids, propertyNames);
0
90}-
91-
92uint QDBusMenuAdaptor::GetLayout(int parentId, int recursionDepth, const QStringList &propertyNames, QDBusMenuLayoutItem &layout)-
93{-
94 uint ret = layout.populate(parentId, recursionDepth, propertyNames, m_topLevelMenu);-
95 for (bool qt_category_enabled = qLcMenu().isDebugEnabled(); qt_category_enabled
qt_category_enabledDescription
TRUEnever evaluated
FALSEnever evaluated
; qt_category_enabled = false) QMessageLogger(__FILE__, 151, __PRETTY_FUNCTION__, qLcMenu().categoryName()).debug() << parentId << "depth" << recursionDepth << propertyNames << layout.m_id << layout.m_properties << "revision" << ret << layout;
never executed: QMessageLogger(__FILE__, 151, __PRETTY_FUNCTION__, qLcMenu().categoryName()).debug() << parentId << "depth" << recursionDepth << propertyNames << layout.m_id << layout.m_properties << "revision" << ret << layout;
0
96 return
never executed: return ret;
ret;
never executed: return ret;
0
97}-
98-
99QDBusVariant QDBusMenuAdaptor::GetProperty(int id, const QString &name)-
100{-
101 for (bool qt_category_enabled = qLcMenu().isDebugEnabled(); qt_category_enabled
qt_category_enabledDescription
TRUEnever evaluated
FALSEnever evaluated
; qt_category_enabled = false) QMessageLogger(__FILE__, 157, __PRETTY_FUNCTION__, qLcMenu().categoryName()).debug() << id << name;
never executed: QMessageLogger(__FILE__, 157, __PRETTY_FUNCTION__, qLcMenu().categoryName()).debug() << id << name;
0
102-
103 QDBusVariant value;-
104 return
never executed: return value;
value;
never executed: return value;
0
105}-
106-
107-
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial 4.3.0-BETA-master-30-08-2018-4cb69e9