- QCheckBox* checkBox = new QCheckBox(pluginName, m_vcsGroupBox);
- checkBox->setChecked(enabledPlugins.contains(pluginName));
- connect(checkBox, SIGNAL(clicked()), this, SIGNAL(changed()));
- m_vcsPluginsMap.insert(pluginName, checkBox);
- }
-
- // Add the checkboxes into a grid layout of 2 columns
- QGridLayout* layout = new QGridLayout(m_vcsGroupBox);
- const int maxRows = (m_vcsPluginsMap.count() + 1) / 2;
-
- int index = 0;
- QMap<QString, QCheckBox*>::const_iterator it = m_vcsPluginsMap.constBegin();
- while (it != m_vcsPluginsMap.constEnd()) {
- const int column = index / maxRows;
- const int row = index % maxRows;
- layout->addWidget(it.value(), row, column);
- ++it;
- ++index;
+ addRow("code-class",
+ pluginName,
+ VersionControlServicePrefix + pluginName,
+ enabledPlugins.contains(pluginName));