| 350 | } |
| 351 | |
| 352 | QuickOpenPlugin::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 | |
| 399 | QuickOpenPlugin::~QuickOpenPlugin() |
| 400 | { |
nothing calls this directly
no test coverage detected