Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit c27f701

Browse files
committedSep 22, 2023··
fix: assertion error caused by beginRemoveRows
系统监视器在v23 bate2系统中启动时会报错: ASSERT: "last < rowCount(parent)" in file itemmodels/qabstractitemmodel.cpp Log:
1 parent 7a178d6 commit c27f701

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed
 

‎deepin-system-monitor-main/model/process_table_model.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,10 @@ void ProcessTableModel::updateProcessListWithUserSpecified()
8787
ProcessSet *processSet = ProcessDB::instance()->processSet();
8888
const QList<pid_t> &newpidlst = processSet->getPIDList();
8989

90-
beginRemoveRows({}, 0, m_procIdList.size());
91-
endRemoveRows();
90+
if (rowCount() > 0) {
91+
beginRemoveRows({}, 0, rowCount() - 1);
92+
endRemoveRows();
93+
}
9294
m_procIdList.clear();
9395
m_processList.clear();
9496
int raw;

0 commit comments

Comments
 (0)
Please sign in to comment.