| Summary: | KDirWatch stopDirScan affects outside KDirWatch instances also - signal missing | ||
|---|---|---|---|
| Product: | [Unmaintained] kio | Reporter: | Dirk Stoecker <kde> |
| Component: | general | Assignee: | David Faure <faure> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Unlisted Binaries | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: |
The testcase C File.
The testcase H-File. |
||
|
Description
Dirk Stoecker
2006-01-01 17:47:47 UTC
Created attachment 14097 [details]
The testcase C File.
Created attachment 14098 [details]
The testcase H-File.
Would be nice to hear something about this. It took me 3 days to compile the bug report and the problem is really annoying in the application I extracted the report from. SVN commit 496601 by dfaure:
Use re-entrant iteration so that stopDirScan/restartDirScan from a slot connected
to one of our signals, doesn't break receiving the signal in other instances of KDirWatch.
Thanks to Dirk Stoecker <kde dstoecker.de> for his great testcase.
BUG: 119341
M +5 -2 kdirwatch.cpp
--- branches/KDE/3.5/kdelibs/kio/kio/kdirwatch.cpp #496600:496601
@@ -1220,8 +1220,11 @@
#endif
}
- Client* c = e->m_clients.first();
- for(;c;c=e->m_clients.next()) {
+ QPtrListIterator<Client> cit( e->m_clients );
+ for ( ; cit.current(); ++cit )
+ {
+ Client* c = cit.current();
+
if (c->instance==0 || c->count==0) continue;
if (c->watchingStopped) {
Do you agree with your test program being licensed under the LGPL and added to kdelibs/kio/tests? (with a better naming for the files;) I'd like to keep it around, not only for this bug. (I just tested it on KDE4/Qt4 too, it only needed s/KMainWindow/QWidget/ since kmainwindow already has a layout.) Thanks. It is public domain. Do with it whatever you want. Well, the layout warning was on QT3 as well, but I did not figure out, how to fix it :-) And I didn't want to spend more time than necessary on a test tool. On Wednesday 11 January 2006 08:59, Dirk Stoecker wrote:
> Well, the layout warning was on QT3 as well, but I did not figure out, how to fix it :-) And I didn't want to spend more time than necessary on a test tool.
Sure - it's just that in QT4 Q_ASSERT is fatal so I had to fix this problem before the program would start ;-)
|