You are not logged in.

Krasu

Intermediate

  • "Krasu" is male
  • "Krasu" started this thread

Posts: 234

Location: Republic of Belarus

  • Send private message

1

Saturday, November 26th 2005, 10:10pm

KDirOperator::finishedLoading()

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 ?