diff options
author | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2013-09-04 12:27:05 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-09 17:51:11 +0200 |
commit | 7fb3906d4e7cec7c69feee007b8393c9c2a3a316 (patch) | |
tree | 0f603aec381ddeeeda4289adceee6a54a9f2e481 /src/corelib/kernel/qcoreapplication_win.cpp | |
parent | e5734c2f08ba629d9d6bffbb1b5504f78cb71ca6 (diff) |
Windows logging: Fix check for console applications.
The old code used to check for usingWinMain, which is not set when
Qt is used within a DLL. Try to check for presence of stderr
by checking for a console window or a redirected stderr-handle.
Task-number: QTBUG-32044
Change-Id: I87893c3438f5e92d73488e9c25b95cbfeaacc1f6
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'src/corelib/kernel/qcoreapplication_win.cpp')
-rw-r--r-- | src/corelib/kernel/qcoreapplication_win.cpp | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/corelib/kernel/qcoreapplication_win.cpp b/src/corelib/kernel/qcoreapplication_win.cpp index 93e45d3984..3e2fd6a689 100644 --- a/src/corelib/kernel/qcoreapplication_win.cpp +++ b/src/corelib/kernel/qcoreapplication_win.cpp @@ -54,7 +54,6 @@ QT_BEGIN_NAMESPACE -bool usingWinMain = false; // whether the qWinMain() is used or not int appCmdShow = 0; Q_CORE_EXPORT HINSTANCE qWinAppInst() // get Windows app handle @@ -147,7 +146,6 @@ void qWinMain(HINSTANCE instance, HINSTANCE prevInstance, LPSTR cmdParam, return; } already_called = true; - usingWinMain = true; // Create command line argv = qWinCmdLine<char>(cmdParam, int(strlen(cmdParam)), argc); |