mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-18 17:40:48 +02:00
Cleaned up some warnings
Signed-off-by: Tomasz Zieliński <tomaszzielinskijedenzwielu@gmail.com>
This commit is contained in:
parent
81ec08b55e
commit
d0a6bf9521
@ -46,6 +46,7 @@ CGTownInstance * initialize(CGTownInstance * o)
|
|||||||
if(!spell->isSpecial() && !spell->isCreatureAbility())
|
if(!spell->isSpecial() && !spell->isCreatureAbility())
|
||||||
o->possibleSpells.push_back(spell->id);
|
o->possibleSpells.push_back(spell->id);
|
||||||
}
|
}
|
||||||
|
return o;
|
||||||
}
|
}
|
||||||
|
|
||||||
Initializer::Initializer(CGObjectInstance * o)
|
Initializer::Initializer(CGObjectInstance * o)
|
||||||
@ -162,8 +163,8 @@ void PlayerColorDelegate::setEditorData(QWidget *editor, const QModelIndex &inde
|
|||||||
if (index.data().canConvert<int>())
|
if (index.data().canConvert<int>())
|
||||||
{
|
{
|
||||||
PlayerColor player(qvariant_cast<int>(index.data()));
|
PlayerColor player(qvariant_cast<int>(index.data()));
|
||||||
QComboBox *editor = qobject_cast<QComboBox *>(editor);
|
QComboBox *ed = qobject_cast<QComboBox *>(editor);
|
||||||
editor->addItem(QString::number(player.getNum()));
|
ed->addItem(QString::number(player.getNum()));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -175,8 +176,8 @@ void PlayerColorDelegate::setModelData(QWidget *editor, QAbstractItemModel *mode
|
|||||||
{
|
{
|
||||||
if (index.data().canConvert<int>())
|
if (index.data().canConvert<int>())
|
||||||
{
|
{
|
||||||
QComboBox *editor = qobject_cast<QComboBox *>(editor);
|
QComboBox *ed = qobject_cast<QComboBox *>(editor);
|
||||||
model->setData(index, QVariant::fromValue(editor->currentText()));
|
model->setData(index, QVariant::fromValue(ed->currentText()));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user