Changeset View
Changeset View
Standalone View
Standalone View
klipper/klipperpopup.cpp
Show First 20 Lines • Show All 64 Lines • ▼ Show 20 Line(s) | |||||
65 | } | 65 | } | ||
66 | #endif | 66 | #endif | ||
67 | 67 | | |||
68 | KlipperPopup::KlipperPopup( History* history ) | 68 | KlipperPopup::KlipperPopup( History* history ) | ||
69 | : m_dirty( true ), | 69 | : m_dirty( true ), | ||
70 | m_textForEmptyHistory( i18n( "<empty clipboard>" ) ), | 70 | m_textForEmptyHistory( i18n( "<empty clipboard>" ) ), | ||
71 | m_textForNoMatch( i18n( "<no matches>" ) ), | 71 | m_textForNoMatch( i18n( "<no matches>" ) ), | ||
72 | m_history( history ), | 72 | m_history( history ), | ||
73 | m_helpMenu( new KHelpMenu( this, i18n("KDE cut & paste history utility"), false ) ), | 73 | m_helpMenu( nullptr ), | ||
74 | m_popupProxy( nullptr ), | 74 | m_popupProxy( nullptr ), | ||
75 | m_filterWidget( nullptr ), | 75 | m_filterWidget( nullptr ), | ||
76 | m_filterWidgetAction( nullptr ), | 76 | m_filterWidgetAction( nullptr ), | ||
77 | m_nHistoryItems( 0 ), | 77 | m_nHistoryItems( 0 ), | ||
78 | m_showHelp(true), | 78 | m_showHelp(true), | ||
79 | m_lastEvent(nullptr) | 79 | m_lastEvent(nullptr) | ||
80 | { | 80 | { | ||
81 | ensurePolished(); | 81 | ensurePolished(); | ||
▲ Show 20 Lines • Show All 41 Lines • ▼ Show 20 Line(s) | 117 | void KlipperPopup::buildFromScratch() { | |||
123 | m_filterWidgetAction = new QWidgetAction(this); | 123 | m_filterWidgetAction = new QWidgetAction(this); | ||
124 | m_filterWidgetAction->setDefaultWidget(m_filterWidget); | 124 | m_filterWidgetAction->setDefaultWidget(m_filterWidget); | ||
125 | addAction(m_filterWidgetAction); | 125 | addAction(m_filterWidgetAction); | ||
126 | 126 | | |||
127 | addSeparator(); | 127 | addSeparator(); | ||
128 | for (int i = 0; i < m_actions.count(); i++) { | 128 | for (int i = 0; i < m_actions.count(); i++) { | ||
129 | 129 | | |||
130 | if (i + 1 == m_actions.count() && m_showHelp) { | 130 | if (i + 1 == m_actions.count() && m_showHelp) { | ||
131 | if (!m_helpMenu) { | ||||
132 | m_helpMenu = new KHelpMenu( this, i18n("KDE cut & paste history utility"), false ); | ||||
133 | } | ||||
131 | addMenu(m_helpMenu->menu())->setIcon(QIcon::fromTheme(QStringLiteral("help-contents"))); | 134 | addMenu(m_helpMenu->menu())->setIcon(QIcon::fromTheme(QStringLiteral("help-contents"))); | ||
132 | addSeparator(); | 135 | addSeparator(); | ||
133 | } | 136 | } | ||
134 | 137 | | |||
135 | addAction(m_actions.at(i)); | 138 | addAction(m_actions.at(i)); | ||
136 | } | 139 | } | ||
137 | } | 140 | } | ||
138 | 141 | | |||
▲ Show 20 Lines • Show All 143 Lines • Show Last 20 Lines |