Changeset View
Changeset View
Standalone View
Standalone View
addons/openheader/plugin_kateopenheader.cpp
Show First 20 Lines • Show All 46 Lines • ▼ Show 20 Line(s) | 44 | PluginViewKateOpenHeader::PluginViewKateOpenHeader(PluginKateOpenHeader *plugin, KTextEditor::MainWindow *mainwindow) | |||
---|---|---|---|---|---|
47 | , m_plugin(plugin) | 47 | , m_plugin(plugin) | ||
48 | , m_mainWindow(mainwindow) | 48 | , m_mainWindow(mainwindow) | ||
49 | { | 49 | { | ||
50 | KXMLGUIClient::setComponentName (QStringLiteral("kateopenheaderplugin"), i18n ("Open Header")); | 50 | KXMLGUIClient::setComponentName (QStringLiteral("kateopenheaderplugin"), i18n ("Open Header")); | ||
51 | setXMLFile( QStringLiteral("ui.rc") ); | 51 | setXMLFile( QStringLiteral("ui.rc") ); | ||
52 | QAction *a = actionCollection()->addAction(QStringLiteral("file_openheader")); | 52 | QAction *a = actionCollection()->addAction(QStringLiteral("file_openheader")); | ||
53 | a->setText(i18n("Open .h/.cpp/.c")); | 53 | a->setText(i18n("Open .h/.cpp/.c")); | ||
54 | actionCollection()->setDefaultShortcut(a, Qt::Key_F12 ); | 54 | actionCollection()->setDefaultShortcut(a, Qt::Key_F12 ); | ||
55 | connect( a, SIGNAL(triggered(bool)), plugin, SLOT(slotOpenHeader()) ); | 55 | connect(a, &QAction::triggered, plugin, &PluginKateOpenHeader::slotOpenHeader); | ||
56 | | ||||
57 | mainwindow->guiFactory()->addClient (this); | 56 | mainwindow->guiFactory()->addClient (this); | ||
58 | } | 57 | } | ||
59 | 58 | | |||
60 | PluginViewKateOpenHeader::~PluginViewKateOpenHeader() | 59 | PluginViewKateOpenHeader::~PluginViewKateOpenHeader() | ||
61 | { | 60 | { | ||
62 | m_mainWindow->guiFactory()->removeClient (this); | 61 | m_mainWindow->guiFactory()->removeClient (this); | ||
63 | } | 62 | } | ||
64 | 63 | | |||
▲ Show 20 Lines • Show All 171 Lines • Show Last 20 Lines |