const Qt::SortOrder current = (m_model->sortOrder() == Qt::AscendingOrder) ?
Qt::DescendingOrder : Qt::AscendingOrder;
m_model->setSortOrder(current);
- emit sortOrderChanged(current, previous);
+ Q_EMIT sortOrderChanged(current, previous);
} else {
// Change the sort role and reset to the ascending order
const QByteArray previous = m_model->sortRole();
const QByteArray current = m_columns[m_pressedRoleIndex];
const bool resetSortOrder = m_model->sortOrder() == Qt::DescendingOrder;
m_model->setSortRole(current, !resetSortOrder);
- emit sortRoleChanged(current, previous);
+ Q_EMIT sortRoleChanged(current, previous);
if (resetSortOrder) {
m_model->setSortOrder(Qt::AscendingOrder);
- emit sortOrderChanged(Qt::AscendingOrder, Qt::DescendingOrder);
+ Q_EMIT sortOrderChanged(Qt::AscendingOrder, Qt::DescendingOrder);
}
}
break;
case ResizeRoleOperation: {
const QByteArray pressedRole = m_columns[m_pressedRoleIndex];
const qreal currentWidth = m_columnWidths.value(pressedRole);
- emit columnWidthChangeFinished(pressedRole, currentWidth);
+ Q_EMIT columnWidthChangeFinished(pressedRole, currentWidth);
break;
}
m_columnWidths.insert(pressedRole, currentWidth);
update();
- emit columnWidthChanged(pressedRole, currentWidth, previousWidth);
+ Q_EMIT columnWidthChanged(pressedRole, currentWidth, previousWidth);
break;
}
const QByteArray role = m_columns[m_movingRole.index];
const int previousIndex = m_movingRole.index;
m_movingRole.index = targetIndex;
- emit columnMoved(role, targetIndex, previousIndex);
+ Q_EMIT columnMoved(role, targetIndex, previousIndex);
m_movingRole.xDec = event->pos().x() - roleXPosition(role);
}
setColumnWidth(role, preferredColumnWidth(role));
qreal currentWidth = columnWidth(role);
- emit columnWidthChanged(role, currentWidth, previousWidth);
- emit columnWidthChangeFinished(role, currentWidth);
+ Q_EMIT columnWidthChanged(role, currentWidth, previousWidth);
+ Q_EMIT columnWidthChangeFinished(role, currentWidth);
}
}