Integrating github/staging through commit ab87ed9
This commit is contained in:
@@ -185,10 +185,18 @@ int QLensFlareAtomicListModel::rowCount(const QModelIndex& parent) const
|
||||
QVariant QLensFlareAtomicListModel::data(const QModelIndex& index, int role) const
|
||||
{
|
||||
Item* item;
|
||||
if (!index.isValid() || !(item = ItemFromIndex(index)))
|
||||
if (!index.isValid())
|
||||
{
|
||||
return QVariant();
|
||||
}
|
||||
else
|
||||
{
|
||||
item = ItemFromIndex(index);
|
||||
if (!item)
|
||||
{
|
||||
return QVariant();
|
||||
}
|
||||
}
|
||||
|
||||
switch (role)
|
||||
{
|
||||
@@ -212,10 +220,18 @@ QVariant QLensFlareAtomicListModel::data(const QModelIndex& index, int role) con
|
||||
bool QLensFlareAtomicListModel::setData(const QModelIndex& index, const QVariant& value, int role)
|
||||
{
|
||||
Item* item;
|
||||
if (!index.isValid() || !(item = ItemFromIndex(index)))
|
||||
if (index.isValid())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
item = ItemFromIndex(index);
|
||||
if (!item)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
switch (role)
|
||||
{
|
||||
@@ -247,10 +263,18 @@ Qt::ItemFlags QLensFlareAtomicListModel::flags(const QModelIndex& index) const
|
||||
EFlareType QLensFlareAtomicListModel::FlareTypeFromIndex(QModelIndex index) const
|
||||
{
|
||||
Item* item;
|
||||
if (!index.isValid() || !(item = ItemFromIndex(index)))
|
||||
if (!index.isValid())
|
||||
{
|
||||
return eFT_Max;
|
||||
}
|
||||
else
|
||||
{
|
||||
item = ItemFromIndex(index);
|
||||
if (!item)
|
||||
{
|
||||
return eFT_Max;
|
||||
}
|
||||
}
|
||||
|
||||
return item->flareType;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user