summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/corelib/global/qlogging.cpp3
-rw-r--r--src/testlib/qplaintestlogger.cpp13
2 files changed, 0 insertions, 16 deletions
diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp
index ca85ad25cb..64bc3b2726 100644
--- a/src/corelib/global/qlogging.cpp
+++ b/src/corelib/global/qlogging.cpp
@@ -710,9 +710,6 @@ static void qDefaultMessageHandler(QtMsgType type, const QMessageLogContext &con
if (usingWinMain)
#endif
{
- // OutputDebugString is not threadsafe.
- static QBasicMutex outputDebugStringMutex;
- QMutexLocker locker(&outputDebugStringMutex);
OutputDebugString(reinterpret_cast<const wchar_t *>(logMessage.utf16()));
return;
}
diff --git a/src/testlib/qplaintestlogger.cpp b/src/testlib/qplaintestlogger.cpp
index 5a451b331d..e4c636cfce 100644
--- a/src/testlib/qplaintestlogger.cpp
+++ b/src/testlib/qplaintestlogger.cpp
@@ -66,10 +66,6 @@ QT_BEGIN_NAMESPACE
namespace QTest {
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
- static CRITICAL_SECTION outputCriticalSection;
-#endif
-
static const char *incidentType2String(QAbstractTestLogger::IncidentTypes type)
{
switch (type) {
@@ -209,10 +205,7 @@ void QPlainTestLogger::outputMessage(const char *str)
} while (!strUtf16.isEmpty());
if (stream != stdout)
#elif defined(Q_OS_WIN)
- EnterCriticalSection(&QTest::outputCriticalSection);
- // OutputDebugString is not threadsafe
OutputDebugStringA(str);
- LeaveCriticalSection(&QTest::outputCriticalSection);
#endif
outputString(str);
}
@@ -310,16 +303,10 @@ void QPlainTestLogger::printBenchmarkResult(const QBenchmarkResult &result)
QPlainTestLogger::QPlainTestLogger(const char *filename)
: QAbstractTestLogger(filename)
{
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
- InitializeCriticalSection(&QTest::outputCriticalSection);
-#endif
}
QPlainTestLogger::~QPlainTestLogger()
{
-#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
- DeleteCriticalSection(&QTest::outputCriticalSection);
-#endif
}
void QPlainTestLogger::startLogging()