New Dialog: Fix typo

Change-Id: I8c56f50ebb23fc6a0ac84bc24514a19dd5cd8a8a
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
Tobias Hunger
2014-05-02 17:44:34 +02:00
parent 0ea6474262
commit 4635a4009f
2 changed files with 6 additions and 6 deletions

View File

@@ -354,17 +354,17 @@ IWizard *NewDialog::currentWizard() const
return wizardOfItem(m_model->itemFromIndex(index));
}
void NewDialog::addItem(QStandardItem *topLEvelCategoryItem, IWizard *wizard)
void NewDialog::addItem(QStandardItem *topLevelCategoryItem, IWizard *wizard)
{
const QString categoryName = wizard->category();
QStandardItem *categoryItem = 0;
for (int i = 0; i < topLEvelCategoryItem->rowCount(); i++) {
if (topLEvelCategoryItem->child(i, 0)->data(Qt::UserRole) == categoryName)
categoryItem = topLEvelCategoryItem->child(i, 0);
for (int i = 0; i < topLevelCategoryItem->rowCount(); i++) {
if (topLevelCategoryItem->child(i, 0)->data(Qt::UserRole) == categoryName)
categoryItem = topLevelCategoryItem->child(i, 0);
}
if (!categoryItem) {
categoryItem = new QStandardItem();
topLEvelCategoryItem->appendRow(categoryItem);
topLevelCategoryItem->appendRow(categoryItem);
m_categoryItems.append(categoryItem);
categoryItem->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable);
categoryItem->setText(QLatin1String(" ") + wizard->displayCategory());