!55 update src/findresultwin.cpp.

Merge pull request !55 from XiaoPb/N/A
This commit is contained in:
爬山虎 2023-02-24 11:29:46 +00:00 committed by Gitee
commit 5e351bd1a2
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 7 additions and 7 deletions

View File

@ -1,4 +1,4 @@
#include "findresultwin.h"
#include "findresultwin.h"
#include "findwin.h"
#include "common.h"
#include "styleset.h"
@ -208,12 +208,12 @@ void FindResultWin::slot_selectAll()
//遍历下面的子节点
int i = 0;
QModelIndex childMi;
childMi = sectionItem.child(i, 0);
childMi = sectionItem.model()->index(i, 0, sectionItem);
while (childMi.isValid())
{
++i;
ui.resultTreeView->selectionModel()->select(childMi, QItemSelectionModel::Select);
childMi = sectionItem.child(i, 0);
childMi = sectionItem.model()->index(i, 0, sectionItem);
}
return i+1;
};
@ -226,12 +226,12 @@ void FindResultWin::slot_selectAll()
//遍历根节点下面每一个section
{
int i = 0;
QModelIndex section = rootItem.child(i, 0);
QModelIndex section = rootItem.model()->index(i, 0, rootItem);
while (section.isValid() && !section.data(ResultItemEditor).isNull())
{
++i;
selectCount += selectSection(section);
section = firstRootItem.child(i, 0);
section = firstRootItem.model()->index(i, 0, firstRootItem);
}
}
@ -255,12 +255,12 @@ void FindResultWin::slot_selectSection()
//遍历下面的子节点
int i = 0;
QModelIndex childMi;
childMi = sectionItem.child(i, 0);
childMi = sectionItem.model()->index(i, 0, sectionItem);
while (childMi.isValid())
{
++i;
ui.resultTreeView->selectionModel()->select(childMi, QItemSelectionModel::Select);
childMi = sectionItem.child(i, 0);
childMi = sectionItem.model()->index(i, 0, sectionItem);
}
return i+1;
};