Changeset View
Changeset View
Standalone View
Standalone View
addons/project/kateprojectpluginview.cpp
Show First 20 Lines • Show All 89 Lines • ▼ Show 20 Line(s) | 54 | { | |||
---|---|---|---|---|---|
90 | a = actionCollection()->addAction(KStandardAction::Goto, QStringLiteral("projects_goto_index"), this, SLOT(slotProjectIndex())); | 90 | a = actionCollection()->addAction(KStandardAction::Goto, QStringLiteral("projects_goto_index"), this, SLOT(slotProjectIndex())); | ||
91 | actionCollection()->setDefaultShortcut(a, QKeySequence(Qt::ALT | Qt::Key_1)); | 91 | actionCollection()->setDefaultShortcut(a, QKeySequence(Qt::ALT | Qt::Key_1)); | ||
92 | 92 | | |||
93 | // popup menu | 93 | // popup menu | ||
94 | auto popup = new KActionMenu(i18n("Project"), this); | 94 | auto popup = new KActionMenu(i18n("Project"), this); | ||
95 | actionCollection()->addAction(QLatin1String("popup_project"), popup); | 95 | actionCollection()->addAction(QLatin1String("popup_project"), popup); | ||
96 | 96 | | |||
97 | m_lookupAction = popup->menu()->addAction(i18n("Lookup: %1", QString()), this, SLOT(slotProjectIndex())); | 97 | m_lookupAction = popup->menu()->addAction(i18n("Lookup: %1", QString()), this, SLOT(slotProjectIndex())); | ||
98 | m_lookupAction = popup->menu()->addAction(i18n("Analyse C++ file with cppcheck")); | ||||
99 | m_lookupAction = popup->menu()->addAction(i18n("Analyse Python file with flake8")); | ||||
100 | m_lookupAction = popup->menu()->addAction(i18n("Analyse Bash file with ShellCheck")); | ||||
98 | 101 | | |||
99 | connect(popup->menu(), &QMenu::aboutToShow, this, &KateProjectPluginView::slotContextMenuAboutToShow); | 102 | connect(popup->menu(), &QMenu::aboutToShow, this, &KateProjectPluginView::slotContextMenuAboutToShow); | ||
100 | 103 | | |||
101 | /** | 104 | /** | ||
102 | * add us to gui | 105 | * add us to gui | ||
103 | */ | 106 | */ | ||
104 | m_mainWindow->guiFactory()->addClient(this); | 107 | m_mainWindow->guiFactory()->addClient(this); | ||
105 | } | 108 | } | ||
▲ Show 20 Lines • Show All 418 Lines • Show Last 20 Lines |