Remove circular dependency in testlib logging
Remove one of the circular dependencies between QPlainTestLogger and QTestLog by directly checking whether we're writing to stdout rather than inferring the same by examining whether the output file name is null. Change-Id: I798288482c9e2e071e17a8622e8a8f8d5016dc7e Reviewed-on: http://codereview.qt.nokia.com/4052 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
This commit is contained in:
parent
592d53a17c
commit
f1af291d49
@ -98,7 +98,7 @@ public:
|
||||
|
||||
void outputString(const char *msg);
|
||||
|
||||
private:
|
||||
protected:
|
||||
FILE *stream;
|
||||
};
|
||||
|
||||
|
@ -211,7 +211,7 @@ void QPlainTestLogger::outputMessage(const char *str)
|
||||
OutputDebugString((wchar_t*)tmp.utf16());
|
||||
strUtf16.remove(0, maxOutputLength);
|
||||
} while (!strUtf16.isEmpty());
|
||||
if (QTestLog::outputFileName())
|
||||
if (stream != stdout)
|
||||
#elif defined(Q_OS_WIN)
|
||||
EnterCriticalSection(&QTest::outputCriticalSection);
|
||||
// OutputDebugString is not threadsafe
|
||||
|
Loading…
Reference in New Issue
Block a user