Changeset View
Changeset View
Standalone View
Standalone View
kate/kateconfigplugindialogpage.cpp
Show First 20 Lines • Show All 74 Lines • ▼ Show 20 Line(s) | 69 | { | |||
---|---|---|---|---|---|
75 | layout->addWidget(listView); | 75 | layout->addWidget(listView); | ||
76 | 76 | | |||
77 | QStringList headers; | 77 | QStringList headers; | ||
78 | headers << i18n("Name") << i18n("Description"); | 78 | headers << i18n("Name") << i18n("Description"); | ||
79 | listView->setHeaderLabels(headers); | 79 | listView->setHeaderLabels(headers); | ||
80 | listView->setWhatsThis(i18n("Here you can see all available Kate plugins. Those with a check mark are loaded, and will be loaded again the next time Kate is started.")); | 80 | listView->setWhatsThis(i18n("Here you can see all available Kate plugins. Those with a check mark are loaded, and will be loaded again the next time Kate is started.")); | ||
81 | 81 | | |||
82 | KatePluginList &pluginList(KateApp::self()->pluginManager()->pluginList()); | 82 | KatePluginList &pluginList(KateApp::self()->pluginManager()->pluginList()); | ||
83 | for (KatePluginList::iterator it = pluginList.begin(); it != pluginList.end(); ++it) { | 83 | for (auto& pluginInfo : pluginList) { | ||
84 | QTreeWidgetItem *item = new KatePluginListItem(it->load, &(*it)); | 84 | QTreeWidgetItem *item = new KatePluginListItem(pluginInfo.load, &pluginInfo); | ||
85 | item->setText(0, it->metaData.name()); | 85 | item->setText(0, pluginInfo.metaData.name()); | ||
86 | item->setText(1, it->metaData.description()); | 86 | item->setText(1, pluginInfo.metaData.description()); | ||
87 | listView->addTopLevelItem(item); | 87 | listView->addTopLevelItem(item); | ||
88 | } | 88 | } | ||
89 | 89 | | |||
90 | listView->resizeColumnToContents(0); | 90 | listView->resizeColumnToContents(0); | ||
91 | listView->sortByColumn(0, Qt::AscendingOrder); | 91 | listView->sortByColumn(0, Qt::AscendingOrder); | ||
92 | connect(listView, &KatePluginListView::stateChange, this, &KateConfigPluginPage::stateChange); | 92 | connect(listView, &KatePluginListView::stateChange, this, &KateConfigPluginPage::stateChange); | ||
93 | } | 93 | } | ||
94 | 94 | | |||
Show All 31 Lines |