You are not logged in.

Dear visitor, welcome to KDE-Forum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

Keiko

Unregistered

1

Wednesday, December 1st 2004, 6:09pm

KDirOperator problem

I can't sometimes select first item:

SQ_DirOperator::SQ_DirOperator(const KURL &url, VV type_, QWidget *parent, const char *name) :
SQ_DirOperatorBase(url, type_, parent, name)
{
connect(this, SIGNAL(finishedLoading()), SLOT(slotFinishedLoading()));
connect(this, SIGNAL(updateInformation(int,int)), SLOT(slotUpdateInformation(int,int)));
}

// delayed init
void SQ_DirOperator::slotFinishedLoading()
{
QTimer::singleShot(0, this, SLOT(slotDelayedFinishedLoading()));
}

void SQ_DirOperator::slotDelayedFinishedLoading()
{
KFileItemList *list = (KFileItemList *)fileview->items();
KFileItem *first = list->first();

printf("first: %d,%s\n", first, (first)?first->name().ascii():"null");
}

*******************

Well, sometimes 'first' is 'gridtest.gif' while the very first visible item is 'gentoo-new.gif'. Whats wrong ?