Saturday, July 5th 2008, 2:25pm UTC+1

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to QtForum.org. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Thursday, November 15th 2007, 4:47pm

KIO::listDir() and listRecursive() problem

Hello,

I have a problem with KIO::listDir() and listRecursive(). I do this:

Source code

1
2
3
4
5
6
7
8
9
if(m_directoryOptions.recursiveSearch)
	m_listJob = KIO::listRecursive(dirUrl, KIO::HideProgressInfo, m_directoryOptions.includeHidden);
else
	m_listJob = KIO::listDir(dirUrl, KIO::HideProgressInfo, m_directoryOptions.includeHidden);

connect(m_listJob, SIGNAL(entries(KIO::Job *, const KIO::UDSEntryList &)),
	this, SLOT(scanDirectory(KIO::Job *, const KIO::UDSEntryList &)));
connect(m_listJob, SIGNAL(result(KJob *)),
	this, SLOT(slotListJobResult(KJob *)));


I also have two slots:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
void FileSearch::slotListJobResult(KJob *job){
	kDebug() << "!!!!!!!!!!!!!!!!!!!!!!!! slotResult() !!!!!!!!!!!!!!!!!!!!!!!!";
	m_listJobRunning = false;
	m_listJob = 0;
}

bool FileSearch::scanDirectory(KIO::Job *job, const KIO::UDSEntryList &entryList){
	kDebug() << "!!!!!!!!!!!!!!!!!!!!!!!! scanDirectory() !!!!!!!!!!!!!!!!!!!!!!!!";
	for(int i = 0; i < entryList.count(); i++){
		kDebug() << "Test" << i;
	}
	
	return true;
}


The problem is that the program never arrives at one of the two slots. Is there something else I need to do to make this work? I checked the output and I don't get any connecting errors. Oh yeah, I'm using the KDE4 Beta 3 libs. Could it be that this function isn't finished yet?

And another question: I use KTextEditor in my program. It generates a LOT of output. Is there any way I can turn this off?

Kind Regards,
Vincent den Boer
  • Go to the top of the page

2

Saturday, November 17th 2007, 4:22pm

Ok... I solved it. It was a stupid mistake in another part of my program :S. If a moderator comes by this thread he can close/delete it.
  • Go to the top of the page

Rate this thread