MCPcopy Create free account
hub / github.com/KDE/kdevelop / QuickOpenPlugin

Method QuickOpenPlugin

plugins/quickopen/quickopenplugin.cpp:352–397  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

350}
351
352QuickOpenPlugin::QuickOpenPlugin(QObject* parent, const KPluginMetaData& metaData, const QVariantList&)
353 : KDevelop::IPlugin(QStringLiteral("kdevquickopen"), parent, metaData)
354{
355 staticQuickOpenPlugin = this;
356 m_model = new QuickOpenModel(nullptr);
357
358 KConfigGroup quickopengrp = KSharedConfig::openConfig()->group(QStringLiteral("QuickOpen"));
359 lastUsedScopes = quickopengrp.readEntry("SelectedScopes", QStringList{
360 Strings::scopeProjectName(),
361 Strings::scopeIncludesName(),
362 Strings::scopeIncludersName(),
363 Strings::scopeCurrentlyOpenName(),
364 });
365 lastUsedItems = quickopengrp.readEntry("SelectedItems", QStringList());
366
367 {
368 m_openFilesData = new OpenFilesDataProvider();
369 const QStringList scopes(Strings::scopeCurrentlyOpenName());
370 const QStringList types(Strings::typeFilesName());
371 m_model->registerProvider(scopes, types, m_openFilesData);
372 }
373 {
374 m_projectFileData = new ProjectFileDataProvider();
375 const QStringList scopes(Strings::scopeProjectName());
376 const QStringList types(Strings::typeFilesName());
377 m_model->registerProvider(scopes, types, m_projectFileData);
378 }
379 {
380 m_projectItemData = new ProjectItemDataProvider(this);
381 const QStringList scopes(Strings::scopeProjectName());
382 const QStringList types = ProjectItemDataProvider::supportedItemTypes();
383 m_model->registerProvider(scopes, types, m_projectItemData);
384 }
385 {
386 m_documentationItemData = new DocumentationQuickOpenProvider;
387 const QStringList scopes(Strings::scopeIncludesName());
388 const QStringList types(Strings::typeDocumentationName());
389 m_model->registerProvider(scopes, types, m_documentationItemData);
390 }
391 {
392 m_actionsItemData = new ActionsQuickOpenProvider;
393 const QStringList scopes(Strings::scopeIncludesName());
394 const QStringList types(Strings::typeActionsName());
395 m_model->registerProvider(scopes, types, m_actionsItemData);
396 }
397}
398
399QuickOpenPlugin::~QuickOpenPlugin()
400{

Callers

nothing calls this directly

Calls 10

scopeProjectNameFunction · 0.85
scopeIncludesNameFunction · 0.85
scopeIncludersNameFunction · 0.85
scopeCurrentlyOpenNameFunction · 0.85
QStringListClass · 0.85
typeFilesNameFunction · 0.85
typeDocumentationNameFunction · 0.85
typeActionsNameFunction · 0.85
readEntryMethod · 0.80
registerProviderMethod · 0.45

Tested by

no test coverage detected