mirror of https://gitee.com/cxasm/notepad--.git
update src/findresultwin.cpp.
Item.model()->index(i, 0, Item)代替Item.child(i, 0) 消除警告,更新用法。
This commit is contained in:
parent
da61adb9a2
commit
2eae8163e0
|
@ -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;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue