diff options
author | Olivier Goffart <olivier.goffart@nokia.com> | 2010-08-17 13:38:33 (GMT) |
---|---|---|
committer | Olivier Goffart <olivier.goffart@nokia.com> | 2010-08-19 08:47:11 (GMT) |
commit | f894befedf669fb864a500b0aa395157ff0fb929 (patch) | |
tree | c5bc53dcd98dbce2471e23e7014c2a30247e8941 /src/declarative/qml/qdeclarativeimageprovider.cpp | |
parent | f6cfafde26b4735965be8df0d11e9d7c297c75b9 (diff) | |
download | Qt-f894befedf669fb864a500b0aa395157ff0fb929.zip Qt-f894befedf669fb864a500b0aa395157ff0fb929.tar.gz Qt-f894befedf669fb864a500b0aa395157ff0fb929.tar.bz2 |
QDeclarativeImageProvider: Do not keep the global declarative mutex locked when processing.
The point is to be able to process images in a thread. If the mutex
is locked, this is useless.
Use case is a slow QDeclarativeImageProvider that generates thumbmails
from large files. Even with the asynchronous attribute set to true, the
gui thread would be blocked by the mutex.
By using QSharedPointer, I also fix the leak of the providers (which
were not deleted)
Reviewed-by: Martin Jones
Diffstat (limited to 'src/declarative/qml/qdeclarativeimageprovider.cpp')
-rw-r--r-- | src/declarative/qml/qdeclarativeimageprovider.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/declarative/qml/qdeclarativeimageprovider.cpp b/src/declarative/qml/qdeclarativeimageprovider.cpp index ea68327..ef31be7 100644 --- a/src/declarative/qml/qdeclarativeimageprovider.cpp +++ b/src/declarative/qml/qdeclarativeimageprovider.cpp @@ -161,7 +161,9 @@ QDeclarativeImageProvider::QDeclarativeImageProvider(ImageType type) } /*! - \internal + Destroys the QDeclarativeImageProvider + + \note The destructor of your derived class need to be thread safe. */ QDeclarativeImageProvider::~QDeclarativeImageProvider() { |