Commit adff6dcf authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇

[Klipper] Only create KHelpMenu when used

The entry is only shown when run standalone anyway.

Differential Revision: https://phabricator.kde.org/D14487
parent 70d0f32d
......@@ -70,7 +70,7 @@ KlipperPopup::KlipperPopup( History* history )
m_textForEmptyHistory( i18n( "<empty clipboard>" ) ),
m_textForNoMatch( i18n( "<no matches>" ) ),
m_history( history ),
m_helpMenu( new KHelpMenu( this, i18n("KDE cut & paste history utility"), false ) ),
m_helpMenu( nullptr ),
m_popupProxy( nullptr ),
m_filterWidget( nullptr ),
m_filterWidgetAction( nullptr ),
......@@ -128,6 +128,9 @@ void KlipperPopup::buildFromScratch() {
for (int i = 0; i < m_actions.count(); i++) {
if (i + 1 == m_actions.count() && m_showHelp) {
if (!m_helpMenu) {
m_helpMenu = new KHelpMenu( this, i18n("KDE cut & paste history utility"), false );
}
addMenu(m_helpMenu->menu())->setIcon(QIcon::fromTheme(QStringLiteral("help-contents")));
addSeparator();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment