What about C++ you want I should learn? I learned about C++ a lot, but without practical application, it is nothing, especially in C++.
You are not correct in some way. Endless recursion happened when I pass walk() as slot in connect(), but when simply call walk() in main() of Lister.cpp it works well. And when I put simply walk() in single thread() in walkwiththread() it doesnt induce infinite loop. But with big folders it really could not stand, but when simply walk() put in Lister::main() it could -- you can even check, and I have write about it 1 or 2 weeks ago.
int s=sizeof(Lister::listed) - maybe it is excess here - but I simply wanted to know the size of listed Qlist, despite it really
return the sizeof Qlist type, despite I hardly conceive about size of Qlist type (what is it? it return always 4), and I need the size of listed as object. There is also such line, seems to be borrowed from my java code where it was used for testing.
Maybe, Qdiriterator should works - as whatsoever purpose did it craeted but here it is said it is slow - http://www.qtcentre.org/threads/5790...es-recursively.
But how should it works here?
Example from QtAssistant -
QDirIterator it("/etc", QDirIterator::Subdirectories);
while (it.hasNext()) {
qDebug() << it.next();
// /etc/.
// /etc/..
// /etc/X11
// /etc/X11/fs
// ...
}
QDirIterator it("/etc", QDirIterator::Subdirectories);
while (it.hasNext()) {
qDebug() << it.next();
// /etc/.
// /etc/..
// /etc/X11
// /etc/X11/fs
// ...
}
To copy to clipboard, switch view to plain text mode
Should I remake for such kind:
QDirIterator it("/etc", QDirIterator::Subdirectories);
while (it.hasNext()) {
if(it.next().fileInfo().isDir())...I need here again the QDirIteratot -- so recursion???
else {
couе<<it.next().fileInfo().fileName ()<<it.next().fileInfo().size ()<<it.next().fileInfo().absolutePath();
}
}
QDirIterator it("/etc", QDirIterator::Subdirectories);
while (it.hasNext()) {
if(it.next().fileInfo().isDir())...I need here again the QDirIteratot -- so recursion???
else {
couе<<it.next().fileInfo().fileName ()<<it.next().fileInfo().size ()<<it.next().fileInfo().absolutePath();
}
}
To copy to clipboard, switch view to plain text mode
Or maybe I misunderstand how this iterator works? Should it walk every folder recursively by itself - or how absolve the recursion here?
Or I should create whole list of folders?? Then process just files there?
Bookmarks