forked from qt-creator/qt-creator
AndroidAvdModel: Code cosmetics, make ::avdName const
Change-Id: I3b5ea968732cf3b69d37e6bc4c0bd514be1ceb05 Reviewed-by: BogDan Vatra <bogdan@kde.org>
This commit is contained in:
@@ -64,9 +64,9 @@ void AvdModel::setAvdList(const QVector<AndroidDeviceInfo> &list)
|
|||||||
endResetModel();
|
endResetModel();
|
||||||
}
|
}
|
||||||
|
|
||||||
QString AvdModel::avdName(const QModelIndex &index)
|
QString AvdModel::avdName(const QModelIndex &index) const
|
||||||
{
|
{
|
||||||
return m_list[index.row()].serialNumber;
|
return m_list.at(index.row()).serialNumber;
|
||||||
}
|
}
|
||||||
|
|
||||||
QVariant AvdModel::data(const QModelIndex &index, int role) const
|
QVariant AvdModel::data(const QModelIndex &index, int role) const
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ class AvdModel: public QAbstractTableModel
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
void setAvdList(const QVector<AndroidDeviceInfo> &list);
|
void setAvdList(const QVector<AndroidDeviceInfo> &list);
|
||||||
QString avdName(const QModelIndex &index);
|
QString avdName(const QModelIndex &index) const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
|
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
|
||||||
|
|||||||
Reference in New Issue
Block a user