diff options
author | Martin Jones <martin.jones@nokia.com> | 2010-03-26 07:17:37 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2010-03-26 07:17:37 (GMT) |
commit | d432123cec9ac927ec9162fa8b3d16684483f994 (patch) | |
tree | d1f1ff847b0ddbcf4436e7eee5a65ffdb78d99bf | |
parent | b8952aef84c78949959728674db39eafb19efee7 (diff) | |
download | Qt-d432123cec9ac927ec9162fa8b3d16684483f994.zip Qt-d432123cec9ac927ec9162fa8b3d16684483f994.tar.gz Qt-d432123cec9ac927ec9162fa8b3d16684483f994.tar.bz2 |
Use QThread IdlePriority rather than linux platform code.
Task-number: QTBUG-9032
-rw-r--r-- | src/declarative/util/qdeclarativepixmapcache.cpp | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/src/declarative/util/qdeclarativepixmapcache.cpp b/src/declarative/util/qdeclarativepixmapcache.cpp index bbe86e7..54dccce 100644 --- a/src/declarative/util/qdeclarativepixmapcache.cpp +++ b/src/declarative/util/qdeclarativepixmapcache.cpp @@ -60,11 +60,6 @@ #include <private/qobject_p.h> #include <QSslError> -#ifdef Q_OS_LINUX -#include <pthread.h> -#include <linux/sched.h> -#endif - // Maximum number of simultaneous image requests to send. static const int maxImageRequestCount = 8; @@ -364,7 +359,7 @@ void QDeclarativeImageRequestHandler::networkRequestDone() QDeclarativeImageReader::QDeclarativeImageReader(QDeclarativeEngine *eng) : QThread(eng), engine(eng), handler(0) { - start(QThread::LowPriority); + start(QThread::IdlePriority); } QDeclarativeImageReader::~QDeclarativeImageReader() @@ -417,14 +412,6 @@ void QDeclarativeImageReader::cancel(QDeclarativePixmapReply *reply) void QDeclarativeImageReader::run() { -#if defined(Q_OS_LINUX) && defined(SCHED_IDLE) - struct sched_param param; - int policy; - - pthread_getschedparam(pthread_self(), &policy, ¶m); - pthread_setschedparam(pthread_self(), SCHED_IDLE, ¶m); -#endif - handler = new QDeclarativeImageRequestHandler(this, engine); exec(); |