From efe3dc93d6bc3102d7a5d7599df32c1aabc095b0 Mon Sep 17 00:00:00 2001
From: Roberto Raggi <roberto.raggi@nokia.com>
Date: Mon, 13 Sep 2010 11:54:55 +0200
Subject: [PATCH] Increased the number of threads in the global thread pool.

Reviewed-by: dt
---
 src/app/main.cpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/app/main.cpp b/src/app/main.cpp
index 08abe59f0f6..afc08fc4569 100644
--- a/src/app/main.cpp
+++ b/src/app/main.cpp
@@ -42,6 +42,7 @@
 #include <QtCore/QTranslator>
 #include <QtCore/QSettings>
 #include <QtCore/QVariant>
+#include <QtCore/QThreadPool>
 
 #include <QtNetwork/QNetworkProxyFactory>
 
@@ -184,6 +185,10 @@ int main(int argc, char **argv)
 
     SharedTools::QtSingleApplication app((QLatin1String(appNameC)), argc, argv);
 
+    const int threadCount = QThreadPool::globalInstance()->maxThreadCount();
+    QThreadPool::globalInstance()->setMaxThreadCount(qMax(4, 2 * threadCount));
+
+
 #ifdef ENABLE_QT_BREAKPAD
     QtSystemExceptionHandler systemExceptionHandler;
 #endif
-- 
GitLab