Changeset View
Changeset View
Standalone View
Standalone View
addons/filebrowser/katefilebrowserplugin.cpp
Show All 37 Lines | |||||
38 | KateFileBrowserPlugin::KateFileBrowserPlugin(QObject* parent, const QList<QVariant>&) | 38 | KateFileBrowserPlugin::KateFileBrowserPlugin(QObject* parent, const QList<QVariant>&) | ||
39 | : KTextEditor::Plugin (parent) | 39 | : KTextEditor::Plugin (parent) | ||
40 | { | 40 | { | ||
41 | } | 41 | } | ||
42 | 42 | | |||
43 | QObject *KateFileBrowserPlugin::createView (KTextEditor::MainWindow *mainWindow) | 43 | QObject *KateFileBrowserPlugin::createView (KTextEditor::MainWindow *mainWindow) | ||
44 | { | 44 | { | ||
45 | KateFileBrowserPluginView* view = new KateFileBrowserPluginView (this, mainWindow); | 45 | KateFileBrowserPluginView* view = new KateFileBrowserPluginView (this, mainWindow); | ||
46 | connect(view, SIGNAL(destroyed(QObject*)), this, SLOT(viewDestroyed(QObject*))); | 46 | connect(view, &KateFileBrowserPluginView::destroyed, this, &KateFileBrowserPlugin::viewDestroyed); | ||
47 | m_views.append(view); | 47 | m_views.append(view); | ||
48 | return view; | 48 | return view; | ||
49 | } | 49 | } | ||
50 | 50 | | |||
51 | void KateFileBrowserPlugin::viewDestroyed(QObject* view) | 51 | void KateFileBrowserPlugin::viewDestroyed(QObject* view) | ||
52 | { | 52 | { | ||
53 | // do not access the view pointer, since it is partially destroyed already | 53 | // do not access the view pointer, since it is partially destroyed already | ||
54 | m_views.removeAll(static_cast<KateFileBrowserPluginView *>(view)); | 54 | m_views.removeAll(static_cast<KateFileBrowserPluginView *>(view)); | ||
▲ Show 20 Lines • Show All 69 Lines • Show Last 20 Lines |