From 73e93f43003cfa48aebbce408d13400bdd88514d Mon Sep 17 00:00:00 2001 From: Peter Hartmann Date: Tue, 5 Feb 2013 18:40:56 +0100 Subject: QtNetwork: give started threads more verbose naming i.e. make it obvious that they come from Qt. This helps when debugging and trying to differ user created threads from Qt threads. Change-Id: Idd6804246d6676b17cf15de6b644a5be629aa023 Reviewed-by: Rafael Roquetto Reviewed-by: Thiago Macieira --- src/network/access/qnetworkreplyhttpimpl.cpp | 4 ++-- src/network/bearer/qnetworkconfigmanager_p.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/network/access/qnetworkreplyhttpimpl.cpp b/src/network/access/qnetworkreplyhttpimpl.cpp index 480598918f..4699d7cd99 100644 --- a/src/network/access/qnetworkreplyhttpimpl.cpp +++ b/src/network/access/qnetworkreplyhttpimpl.cpp @@ -610,14 +610,14 @@ void QNetworkReplyHttpImplPrivate::postRequest() if (synchronous) { // A synchronous HTTP request uses its own thread thread = new QThread(); - thread->setObjectName(QStringLiteral("httpReply")); + thread->setObjectName(QStringLiteral("Qt HTTP synchronous thread")); QObject::connect(thread, SIGNAL(finished()), thread, SLOT(deleteLater())); thread->start(); } else if (!managerPrivate->httpThread) { // We use the manager-global thread. // At some point we could switch to having multiple threads if it makes sense. managerPrivate->httpThread = new QThread(); - managerPrivate->httpThread->setObjectName(QStringLiteral("httpThread")); + managerPrivate->httpThread->setObjectName(QStringLiteral("Qt HTTP thread")); managerPrivate->httpThread->start(); thread = managerPrivate->httpThread; diff --git a/src/network/bearer/qnetworkconfigmanager_p.cpp b/src/network/bearer/qnetworkconfigmanager_p.cpp index c710556f1c..192bf15b50 100644 --- a/src/network/bearer/qnetworkconfigmanager_p.cpp +++ b/src/network/bearer/qnetworkconfigmanager_p.cpp @@ -70,7 +70,7 @@ void QNetworkConfigurationManagerPrivate::initialize() { //Two stage construction, because we only want to do this heavyweight work for the winner of the Q_GLOBAL_STATIC race. bearerThread = new QThread(); - bearerThread->setObjectName(QStringLiteral("bearerThread")); + bearerThread->setObjectName(QStringLiteral("Qt bearer thread")); bearerThread->moveToThread(QCoreApplicationPrivate::mainThread()); // because cleanup() is called in main thread context. moveToThread(bearerThread); -- cgit v1.2.3