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