diff --git a/ui/qt/models/column_list_model.cpp b/ui/qt/models/column_list_model.cpp index 4c9cbefa88..10513b97b9 100644 --- a/ui/qt/models/column_list_model.cpp +++ b/ui/qt/models/column_list_model.cpp @@ -384,9 +384,9 @@ bool ColumnListModel::dropMimeData(const QMimeData *data, if (moveTo >= store_.count()) moveTo = static_cast(store_.count()) - 1; - emit beginResetModel(); + beginResetModel(); store_.move(moveFrom, moveTo); - emit endResetModel(); + endResetModel(); return true; } @@ -466,7 +466,7 @@ void ColumnListModel::saveColumns() void ColumnListModel::addEntry() { - emit beginInsertRows(QModelIndex(), rowCount(), rowCount()); + beginInsertRows(QModelIndex(), rowCount(), rowCount()); ListElement elem; elem.nr = rowCount(); elem.title = tr("New Column"); @@ -475,19 +475,19 @@ void ColumnListModel::addEntry() elem.occurrence = 0; elem.customFields = QString(); store_ << elem; - emit endInsertRows(); + endInsertRows(); } void ColumnListModel::deleteEntry(int row) { - emit beginRemoveRows(QModelIndex(), row, row); + beginRemoveRows(QModelIndex(), row, row); store_.removeAt(row); - emit endRemoveRows(); + endRemoveRows(); } void ColumnListModel::reset() { - emit beginResetModel(); + beginResetModel(); populate(); - emit endResetModel(); + endResetModel(); } diff --git a/ui/qt/models/decode_as_model.cpp b/ui/qt/models/decode_as_model.cpp index 6f85c992e7..10fc089faf 100644 --- a/ui/qt/models/decode_as_model.cpp +++ b/ui/qt/models/decode_as_model.cpp @@ -588,12 +588,12 @@ QString DecodeAsModel::entryString(const gchar *table_name, gconstpointer value) void DecodeAsModel::fillTable() { decode_as_items_.clear(); - emit beginResetModel(); + beginResetModel(); dissector_all_tables_foreach_changed(buildChangedList, this); decode_dcerpc_add_show_list(buildDceRpcChangedList, this); - emit endResetModel(); + endResetModel(); } void DecodeAsModel::setDissectorHandle(const QModelIndex &index, dissector_handle_t dissector_handle) diff --git a/ui/qt/models/dissector_tables_model.cpp b/ui/qt/models/dissector_tables_model.cpp index 0de02ab0b5..282428b94f 100644 --- a/ui/qt/models/dissector_tables_model.cpp +++ b/ui/qt/models/dissector_tables_model.cpp @@ -295,7 +295,7 @@ static void gatherHeurTableNames(const char *table_name, heur_dissector_list *li void DissectorTablesModel::populate() { - emit beginResetModel(); + beginResetModel(); struct tables_root tables; @@ -313,7 +313,7 @@ void DissectorTablesModel::populate() dissector_all_heur_tables_foreach_table(gatherHeurTableNames, heuristic_table, NULL); - emit endResetModel(); + endResetModel(); } diff --git a/ui/qt/models/enabled_protocols_model.cpp b/ui/qt/models/enabled_protocols_model.cpp index 6c9b1fbaaf..020bb482c2 100644 --- a/ui/qt/models/enabled_protocols_model.cpp +++ b/ui/qt/models/enabled_protocols_model.cpp @@ -289,7 +289,7 @@ void EnabledProtocolsModel::populate() void *cookie; protocol_t *protocol; - emit beginResetModel(); + beginResetModel(); // Iterate over all the protocols for (int i = proto_get_first_protocol(&cookie); i != -1; i = proto_get_next_protocol(&cookie)) @@ -304,7 +304,7 @@ void EnabledProtocolsModel::populate() } } - emit endResetModel(); + endResetModel(); } void EnabledProtocolsModel::applyChanges(bool writeChanges) @@ -482,7 +482,7 @@ void EnabledProtocolsProxyModel::setItemsEnable(EnabledProtocolsProxyModel::Enab return; if (! parent.isValid()) - emit beginResetModel(); + beginResetModel(); for (int row = 0; row < rowCount(parent); row++) { @@ -511,5 +511,5 @@ void EnabledProtocolsProxyModel::setItemsEnable(EnabledProtocolsProxyModel::Enab if (! parent.isValid()) - emit endResetModel(); + endResetModel(); } diff --git a/ui/qt/models/expert_info_model.cpp b/ui/qt/models/expert_info_model.cpp index 4033b6baec..e5af7e702f 100644 --- a/ui/qt/models/expert_info_model.cpp +++ b/ui/qt/models/expert_info_model.cpp @@ -105,13 +105,13 @@ ExpertInfoModel::~ExpertInfoModel() void ExpertInfoModel::clear() { - emit beginResetModel(); + beginResetModel(); eventCounts_.clear(); delete root_; root_ = createRootItem(); - emit endResetModel(); + endResetModel(); } ExpertPacketItem* ExpertInfoModel::createRootItem() @@ -305,9 +305,9 @@ QVariant ExpertInfoModel::data(const QModelIndex &index, int role) const //GUI helpers void ExpertInfoModel::setGroupBySummary(bool group_by_summary) { - emit beginResetModel(); + beginResetModel(); group_by_summary_ = group_by_summary; - emit endResetModel(); + endResetModel(); } int ExpertInfoModel::rowCount(const QModelIndex &parent) const @@ -420,6 +420,6 @@ void ExpertInfoModel::tapDraw(void *eid_ptr) if (!model) return; - emit model->beginResetModel(); - emit model->endResetModel(); + model->beginResetModel(); + model->endResetModel(); } diff --git a/ui/qt/models/export_objects_model.cpp b/ui/qt/models/export_objects_model.cpp index c5d4c2a3c6..5cf8196a2c 100644 --- a/ui/qt/models/export_objects_model.cpp +++ b/ui/qt/models/export_objects_model.cpp @@ -200,9 +200,9 @@ void ExportObjectModel::resetObjects() { export_object_gui_reset_cb reset_cb = get_eo_reset_func(eo_); - emit beginResetModel(); + beginResetModel(); objects_.clear(); - emit endResetModel(); + endResetModel(); if (reset_cb) reset_cb(); diff --git a/ui/qt/models/interface_tree_model.cpp b/ui/qt/models/interface_tree_model.cpp index 69ffc12d18..918079573a 100644 --- a/ui/qt/models/interface_tree_model.cpp +++ b/ui/qt/models/interface_tree_model.cpp @@ -356,12 +356,12 @@ bool InterfaceTreeModel::isRemote(int idx) */ void InterfaceTreeModel::interfaceListChanged() { - emit beginResetModel(); + beginResetModel(); points.clear(); active.clear(); - emit endResetModel(); + endResetModel(); } /* @@ -464,9 +464,9 @@ void InterfaceTreeModel::updateStatistic(unsigned int idx) if (active[device->name] != isActive) { - emit beginResetModel(); + beginResetModel(); active[device->name] = isActive; - emit endResetModel(); + endResetModel(); } emit dataChanged(index(idx, IFTREE_COL_STATS), index(idx, IFTREE_COL_STATS)); diff --git a/ui/qt/models/packet_list_model.cpp b/ui/qt/models/packet_list_model.cpp index 206678b9be..2588238553 100644 --- a/ui/qt/models/packet_list_model.cpp +++ b/ui/qt/models/packet_list_model.cpp @@ -162,13 +162,13 @@ guint PacketListModel::recreateVisibleRows() } void PacketListModel::clear() { - emit beginResetModel(); + beginResetModel(); qDeleteAll(physical_rows_); physical_rows_.resize(0); visible_rows_.resize(0); new_visible_rows_.resize(0); number_to_row_.resize(0); - emit endResetModel(); + endResetModel(); max_row_height_ = 0; max_line_count_ = 1; idle_dissection_row_ = 0; @@ -177,7 +177,7 @@ void PacketListModel::clear() { void PacketListModel::invalidateAllColumnStrings() { PacketListRecord::invalidateAllRecords(); - dataChanged(index(0, 0), index(rowCount() - 1, columnCount() - 1), + emit dataChanged(index(0, 0), index(rowCount() - 1, columnCount() - 1), QVector() << Qt::DisplayRole); } @@ -194,7 +194,7 @@ void PacketListModel::resetColumns() void PacketListModel::resetColorized() { PacketListRecord::resetColorization(); - dataChanged(index(0, 0), index(rowCount() - 1, columnCount() - 1), + emit dataChanged(index(0, 0), index(rowCount() - 1, columnCount() - 1), QVector() << Qt::BackgroundRole << Qt::ForegroundRole); } @@ -222,7 +222,7 @@ void PacketListModel::toggleFrameMark(const QModelIndexList &indeces) else cf_mark_frame(cap_file_, fdata); - dataChanged(index.sibling(index.row(), 0), index.sibling(index.row(), sectionMax), + emit dataChanged(index.sibling(index.row(), 0), index.sibling(index.row(), sectionMax), QVector() << Qt::BackgroundRole << Qt::ForegroundRole); } } @@ -264,7 +264,7 @@ void PacketListModel::toggleFrameIgnore(const QModelIndexList &indeces) else cf_ignore_frame(cap_file_, fdata); - dataChanged(index.sibling(index.row(), 0), index.sibling(index.row(), sectionMax), + emit dataChanged(index.sibling(index.row(), 0), index.sibling(index.row(), sectionMax), QVector() << Qt::BackgroundRole << Qt::ForegroundRole << Qt::DisplayRole); } } @@ -365,7 +365,7 @@ void PacketListModel::sort(int column, Qt::SortOrder order) sort_column_is_numeric_ = isNumericColumn(sort_column_); std::sort(physical_rows_.begin(), physical_rows_.end(), recordLessThan); - emit beginResetModel(); + beginResetModel(); visible_rows_.resize(0); number_to_row_.fill(0); foreach (PacketListRecord *record, physical_rows_) { @@ -379,7 +379,7 @@ void PacketListModel::sort(int column, Qt::SortOrder order) number_to_row_[fdata->num] = static_cast(visible_rows_.count()); } } - emit endResetModel(); + endResetModel(); if (!col_title.isEmpty()) { mainApp->popStatus(MainApplication::BusyStatus); diff --git a/ui/qt/models/profile_model.cpp b/ui/qt/models/profile_model.cpp index 7d69b8019b..72ca4218ca 100644 --- a/ui/qt/models/profile_model.cpp +++ b/ui/qt/models/profile_model.cpp @@ -142,7 +142,7 @@ ProfileModel::ProfileModel(QObject * parent) : void ProfileModel::loadProfiles() { - emit beginResetModel(); + beginResetModel(); bool refresh = profiles_.count() > 0; @@ -158,7 +158,7 @@ void ProfileModel::loadProfiles() fl_entry = gxx_list_next(fl_entry); } - emit endResetModel(); + endResetModel(); } GList * ProfileModel::entry(profile_def *ref) const diff --git a/ui/qt/models/supported_protocols_model.cpp b/ui/qt/models/supported_protocols_model.cpp index 86fa988111..68dce3103c 100644 --- a/ui/qt/models/supported_protocols_model.cpp +++ b/ui/qt/models/supported_protocols_model.cpp @@ -159,7 +159,7 @@ void SupportedProtocolsModel::populate() void *proto_cookie; void *field_cookie; - emit beginResetModel(); + beginResetModel(); SupportedProtocolsItem *protoItem, *fieldItem; protocol_t *protocol; @@ -182,7 +182,7 @@ void SupportedProtocolsModel::populate() } } - emit endResetModel(); + endResetModel(); }