Hi.
It seemed that finishedLoading() signal doesn't guarantee that all items already been sorted.
|
Source code
|
1
2
3
4
5
6
7
8
9
10
11
12
|
MyDirOperator::MyDirOperator(const KURL &url, QWidget *parent, const char *name) :
KDirOperator(url, parent, name)
{
connect(this, SIGNAL(finishedLoading()), this, SLOT(slotFinishedLoading()));
}
void MyDirOperator::slotFinishedLoading()
{
KFileItemList *list = const_cast<KFileItemList *>(items());
KFileItem *first = list->first();
}
|
Now "first" will point to some file, which is
not the first file. Why ? How to determine the first file ?