summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-03-26 07:17:37 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-03-26 07:17:37 (GMT)
commitd432123cec9ac927ec9162fa8b3d16684483f994 (patch)
treed1f1ff847b0ddbcf4436e7eee5a65ffdb78d99bf
parentb8952aef84c78949959728674db39eafb19efee7 (diff)
downloadQt-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.cpp15
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, &param);
- pthread_setschedparam(pthread_self(), SCHED_IDLE, &param);
-#endif
-
handler = new QDeclarativeImageRequestHandler(this, engine);
exec();