Changeset View
Changeset View
Standalone View
Standalone View
src/kbookmarkmenu.cpp
Show First 20 Lines • Show All 64 Lines • ▼ Show 20 Line(s) | 64 | : QObject(), | |||
---|---|---|---|---|---|
65 | m_actionCollection(actionCollection), | 65 | m_actionCollection(actionCollection), | ||
66 | d(new KBookmarkMenuPrivate()), | 66 | d(new KBookmarkMenuPrivate()), | ||
67 | m_bIsRoot(true), | 67 | m_bIsRoot(true), | ||
68 | m_pManager(mgr), | 68 | m_pManager(mgr), | ||
69 | m_pOwner(_owner), | 69 | m_pOwner(_owner), | ||
70 | m_parentMenu(_parentMenu), | 70 | m_parentMenu(_parentMenu), | ||
71 | m_parentAddress(QLatin1String("")) //TODO KBookmarkAdress::root | 71 | m_parentAddress(QLatin1String("")) //TODO KBookmarkAdress::root | ||
72 | { | 72 | { | ||
73 | // TODO KDE5 find a QMenu equvalnet for this one | | |||
74 | //m_parentMenu->setKeyboardShortcutsEnabled( true ); | | |||
75 | | ||||
76 | // qCDebug(KBOOKMARKS_LOG) << "KBookmarkMenu::KBookmarkMenu " << this << " address : " << m_parentAddress; | 73 | // qCDebug(KBOOKMARKS_LOG) << "KBookmarkMenu::KBookmarkMenu " << this << " address : " << m_parentAddress; | ||
77 | 74 | | |||
78 | connect(_parentMenu, &QMenu::aboutToShow, | 75 | connect(_parentMenu, &QMenu::aboutToShow, | ||
79 | this, &KBookmarkMenu::slotAboutToShow); | 76 | this, &KBookmarkMenu::slotAboutToShow); | ||
80 | 77 | | |||
81 | if (KBookmarkSettings::self()->m_contextmenu) { | 78 | if (KBookmarkSettings::self()->m_contextmenu) { | ||
82 | m_parentMenu->setContextMenuPolicy(Qt::CustomContextMenu); | 79 | m_parentMenu->setContextMenuPolicy(Qt::CustomContextMenu); | ||
83 | connect(m_parentMenu, &QWidget::customContextMenuRequested, this, &KBookmarkMenu::slotCustomContextMenu); | 80 | connect(m_parentMenu, &QWidget::customContextMenuRequested, this, &KBookmarkMenu::slotCustomContextMenu); | ||
Show All 33 Lines | 113 | : QObject(), | |||
117 | m_actionCollection(new KActionCollection(this)), | 114 | m_actionCollection(new KActionCollection(this)), | ||
118 | d(new KBookmarkMenuPrivate()), | 115 | d(new KBookmarkMenuPrivate()), | ||
119 | m_bIsRoot(false), | 116 | m_bIsRoot(false), | ||
120 | m_pManager(mgr), | 117 | m_pManager(mgr), | ||
121 | m_pOwner(_owner), | 118 | m_pOwner(_owner), | ||
122 | m_parentMenu(_parentMenu), | 119 | m_parentMenu(_parentMenu), | ||
123 | m_parentAddress(parentAddress) | 120 | m_parentAddress(parentAddress) | ||
124 | { | 121 | { | ||
125 | // TODO KDE5 find a QMenu equvalnet for this one | | |||
126 | //m_parentMenu->setKeyboardShortcutsEnabled( true ); | | |||
127 | connect(_parentMenu, &QMenu::aboutToShow, this, &KBookmarkMenu::slotAboutToShow); | 122 | connect(_parentMenu, &QMenu::aboutToShow, this, &KBookmarkMenu::slotAboutToShow); | ||
128 | if (KBookmarkSettings::self()->m_contextmenu) { | 123 | if (KBookmarkSettings::self()->m_contextmenu) { | ||
129 | m_parentMenu->setContextMenuPolicy(Qt::CustomContextMenu); | 124 | m_parentMenu->setContextMenuPolicy(Qt::CustomContextMenu); | ||
130 | connect(m_parentMenu, &QWidget::customContextMenuRequested, this, &KBookmarkMenu::slotCustomContextMenu); | 125 | connect(m_parentMenu, &QWidget::customContextMenuRequested, this, &KBookmarkMenu::slotCustomContextMenu); | ||
131 | } | 126 | } | ||
132 | m_bDirty = true; | 127 | m_bDirty = true; | ||
133 | } | 128 | } | ||
134 | 129 | | |||
▲ Show 20 Lines • Show All 322 Lines • Show Last 20 Lines |