-void IrcListModel::setChannelList(const QList<IrcListHelper::ChannelDescription> &channelList) {
- if(rowCount() > 0) {
- beginRemoveRows(QModelIndex(), 0, _channelList.count() - 1);
- _channelList.clear();
- endRemoveRows();
- }
-
- if(channelList.count() > 0) {
- beginInsertRows(QModelIndex(), 0, channelList.count() - 1);
- _channelList = channelList;
- endInsertRows();
- }
+
+void IrcListModel::setChannelList(const QList<IrcListHelper::ChannelDescription> &channelList)
+{
+ if (rowCount() > 0) {
+ beginRemoveRows(QModelIndex(), 0, _channelList.count() - 1);
+ _channelList.clear();
+ endRemoveRows();
+ }
+
+ if (channelList.count() > 0) {
+ beginInsertRows(QModelIndex(), 0, channelList.count() - 1);
+ _channelList = channelList;
+ endInsertRows();
+ }