Several fixes of warnings/clang tidy
This commit is contained in:
parent
2f527a8380
commit
880903db5f
15 changed files with 58 additions and 67 deletions
|
|
@ -43,7 +43,7 @@ int EditColumnTableModel::columnCount(const QModelIndex &) const
|
|||
|
||||
QVariant EditColumnTableModel::data(const QModelIndex &index, int role) const
|
||||
{
|
||||
size_t rij = static_cast<size_t>(index.row());
|
||||
auto rij = static_cast<size_t>(index.row());
|
||||
auto && d = m_data.at(rij);
|
||||
if (role == Qt::EditRole || role == Qt::DisplayRole) {
|
||||
switch (index.column()) {
|
||||
|
|
@ -90,7 +90,7 @@ Qt::ItemFlags EditColumnTableModel::flags(const QModelIndex &) const
|
|||
|
||||
bool EditColumnTableModel::setData(const QModelIndex &index, const QVariant &value, int role)
|
||||
{
|
||||
size_t rij = static_cast<size_t>(index.row());
|
||||
auto rij = static_cast<size_t>(index.row());
|
||||
auto && d = m_data.at(rij);
|
||||
if (role == Qt::EditRole) {
|
||||
const int col = index.column();
|
||||
|
|
@ -98,39 +98,39 @@ bool EditColumnTableModel::setData(const QModelIndex &index, const QVariant &val
|
|||
d.name = value.toString();
|
||||
return true;
|
||||
}
|
||||
else if (col == TypeCol) {
|
||||
if (col == TypeCol) {
|
||||
d.type = value.toUInt();
|
||||
return true;
|
||||
}
|
||||
else if (col == LengthCol) {
|
||||
if (col == LengthCol) {
|
||||
d.length = value.toInt();
|
||||
return true;
|
||||
}
|
||||
else if (col == ScaleCol) {
|
||||
if (col == ScaleCol) {
|
||||
d.scale = value.toInt();
|
||||
return true;
|
||||
}
|
||||
else if (col == CollateCol) {
|
||||
if (col == CollateCol) {
|
||||
d.collate = value.toUInt();
|
||||
return true;
|
||||
}
|
||||
else if (col == NotNullCol) {
|
||||
if (col == NotNullCol) {
|
||||
d.notNull = value.toBool();
|
||||
return true;
|
||||
}
|
||||
else if (col == DefaultCol) {
|
||||
if (col == DefaultCol) {
|
||||
d.def = value.toString();
|
||||
return true;
|
||||
}
|
||||
else if (col == PrimaryKeyCol) {
|
||||
if (col == PrimaryKeyCol) {
|
||||
d.primaryKey = value.toInt();
|
||||
return true;
|
||||
}
|
||||
else if (col == UniqueCol) {
|
||||
if (col == UniqueCol) {
|
||||
d.notNull = value.toBool();
|
||||
return true;
|
||||
}
|
||||
else if (col == CommentCol) {
|
||||
if (col == CommentCol) {
|
||||
d.comment = value.toString();
|
||||
return true;
|
||||
}
|
||||
|
|
@ -138,7 +138,7 @@ bool EditColumnTableModel::setData(const QModelIndex &index, const QVariant &val
|
|||
return false;
|
||||
}
|
||||
|
||||
bool EditColumnTableModel::removeRows(int row, int count, const QModelIndex &parent)
|
||||
bool EditColumnTableModel::removeRows(int , int , const QModelIndex &)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue