]> cloud.milkyroute.net Git - dolphin.git/commit
Use only one "directory contents counting" thread per process
authorFrank Reininghaus <frank78ac@googlemail.com>
Tue, 21 Jan 2014 18:07:58 +0000 (19:07 +0100)
committerFrank Reininghaus <frank78ac@googlemail.com>
Tue, 21 Jan 2014 18:08:07 +0000 (19:08 +0100)
commit55678afcc17fe987cb67588e34cff807dd64ad5d
treeb2618b0d14209863257521ed61687d26426e5157
parent419c7578f0ffec27737deafd2abd9d1356095216
Use only one "directory contents counting" thread per process

The pointer to QThread object is stored in a global variable, and each
view increments/decrements a reference count when it starts/stops using
the thread. If this thread reaches zero, the thread is stopped.

Note that we cannot just use a smart pointer, like QSharedPointer, to
manage the thread, because we must make sure that the thread is not
running any more before the QThread is deleted.

REVIEW: 115064
src/kitemviews/private/kdirectorycontentscounter.cpp
src/kitemviews/private/kdirectorycontentscounter.h