diff --git a/mapeditor/inspector.cpp b/mapeditor/inspector.cpp index 6344425c0..2ad82c49d 100644 --- a/mapeditor/inspector.cpp +++ b/mapeditor/inspector.cpp @@ -46,6 +46,7 @@ CGTownInstance * initialize(CGTownInstance * o) if(!spell->isSpecial() && !spell->isCreatureAbility()) o->possibleSpells.push_back(spell->id); } + return o; } Initializer::Initializer(CGObjectInstance * o) @@ -162,8 +163,8 @@ void PlayerColorDelegate::setEditorData(QWidget *editor, const QModelIndex &inde if (index.data().canConvert()) { PlayerColor player(qvariant_cast(index.data())); - QComboBox *editor = qobject_cast(editor); - editor->addItem(QString::number(player.getNum())); + QComboBox *ed = qobject_cast(editor); + ed->addItem(QString::number(player.getNum())); } else { @@ -175,8 +176,8 @@ void PlayerColorDelegate::setModelData(QWidget *editor, QAbstractItemModel *mode { if (index.data().canConvert()) { - QComboBox *editor = qobject_cast(editor); - model->setData(index, QVariant::fromValue(editor->currentText())); + QComboBox *ed = qobject_cast(editor); + model->setData(index, QVariant::fromValue(ed->currentText())); } else {